I'm currently working on external plugin in Unity3d which uses NVAPI & 3D Vision. In NVAPI there are two API calls to turn on/off active stereo.
NvAPI_Stereo_Deactivate
NvAPI_Stereo_Activate
So whenever I try to toggle on/off stereo it crashes at random time with following exception:
Unity Player [version: Unity 2017.1.0f3 (472613c02cf7)]
nvwgf2umx.dll caused an Access Violation (0xc0000005) in module nvwgf2umx.dll at 0033:6f9981d8.
The crash can happen at third try or any try later sometimes. What I'm assuming currently is it has to do something with some value accessed by the dll. Problem is since its NVIDIA internal I have no access to it.
I have already tried other simple methods such as Vsync off, Change Quality settings to max in Manage 3d settings but all failing.
I did come across similer issue in NVDIA dev forums but there is not answer to it seems. Any suggestions or help regarding this would be greatly appreciated.
Also here is the link to error log
I have managed to fix this above issue using a roundabout way. Instead of using
NvAPI_Stereo_Deactivate
NvAPI_Stereo_Activate
functions to turn on & off 3d vision I'm passing the render texture to mono eye in NvAPI_Stereo_SetActiveEye to mono camera while in active mode I pass it to Left Eye & Right Eye respectively. Toggling seems to work properly although I have also noted using NvAPI_Stereo_IsActivated in a loop seems to cause also same access violation so rather only user NvAPI_Stereo_SetActiveEye function to set eye and not to mess around with NVAPI native functions. One downside of using this is 3d emitter will be kept on unitil the exit of application(for my project this seems ok). Hope this helps anyone in future coming across this problem. Do update the answer if anyone has a better solution. That would be nice.
Related
I'm having a really annoying problem with my application that is a school project. I'm using deferred rendering and I'm trying to add positions from the light's pov as a new g-buffer texture, and the depth buffer texture as a shader resource in the light pass. I handle all of the g-buffer textures in the exact same way.
My problem is that these new shader resources are nowhere to be found on the GPU!
I'm using RenderDoc to debug my application, and there I can see everything being written to these new resources just fine, and the call to bind them as shader resources looks good as well, but I still only have the 4 resources in the light pass that I had before.
My code is an absolute mess, and there's a lot(!) of it. So if you want to see something specific to be able to help me, I can post it.
I'd be really happy if I just got some tips as to how you go about debugging this kind of problem, and even happier if someone knows what the problem is.
Thanks in advance!
There are two essential first steps for debugging DirectX applications:
Make sure that for every function that returns an HRESULT that you check it at runtime. If it is safe to ignore the return, it would return void. When checking the HRESULT don't use == S_OK, but use the FAILED or SUCCEEDED macro instead. A nice option for 'fast fail' errors is to use C++ exception handling via ThrowIfFailed.
Enable the DirectX Debug Device and look for errors, warnings, and other messages in the debug output window. For details on enabling it, see Anatomy of Direct3D 11 Create Device and Direct3D SDK Debug Layer Tricks.
This may not solve your problem, but can really help avoid some silly mistakes that cost you a lot of time to track down.
If you are new to DirectX development, take a look at the DirectX Tool Kit tutorials
For debugging DirectX 11 applications, the Visual Studio Graphics diagnostics feature in VS 2012 or later is a good option. You likely fit the license requirements to use the VS 2013 or VS 2015 Community edition, and it includes all features including the VSGS. See MSDN.
I apologize if I simply am failing with google-fu but I am unable to find the answer to my problem.
I have been working on a project that uses two cameras (and eventually four) to take and analyze data using open cv. The project is updating each frame and does things like movement tracking and object recognition. However, I am using my custom built desktop with a hex core i7-5820k and GTX 980 ti... I can't determine what hardware I need to build a dedicated machine for this project. If someone could reccomend a processor or number of logistical cores needed for something like this, that would be much appreciated!
Thank you!
Here is a possibly unanswerable question...
How do I create a website capable of displaying 3D images on a 3D capable display/monitor without using plugins?
Ignore the issues of bandwidth as they are not an issue. I also wish to avoid the red/green effect (anaglyph) as they have many problems. I figure that I could simply display an 120Hz video but then how do I sync the left and right image up with the screen's timing?
Any help would be appreciated however 'impossible' is never an answer.
Thanks
One solution could be to mimic the red/green 3d effect. You'd pass the left and right eye images through a filter and then display them on top of each other, though I'm not sure how off the top of my head. If you could make the views transparent that might work.
You wouldn't need to display anything at 120 Hz or have any synchronisation or plugins.
Google Streetview uses this 3d mode.
There is no way a browser has access to the graphic adapter specific driver libraries. hence it is not possible to make a website even with a plugin. Not to mention that most graphic adapters cant handle windowed 3D frames except proffesional Quadro cards. Every other 3D capable card has to run under certain resolutions and full screen.
First of all, I'm really not sure that there's a good way to sync output with the screen refresh. This is because anything running in a browser is subject to the browser's compositing and rendering.
You may want to look into WebGL--it's essentially a subset of OpenGL intended to provide hardware accelerated graphics in the browser. It's also supported by all of the beta or upcoming versions of the major browsers. Unfortunately, without any syncing mechanism, I don't know of any way to support the polarization method of 3D.
I come from a C/C++ background and more recently flash. Anyway I wrote a 2D engine in AS3 and would like to get it running on the iPhone. To start with I converted it to C++. As a test I wrote a very simple C++ engine and added the files to a standard view-based application in XCode. I then added a UIImageView that covered the whole iPhone screen.
The way my test engine is set up at the moment is that each frame it renders the result to an image which is then used to update the UIImageView every frame. Assuming I can pass input from the iPhone to the C++ engine this seems like a fairly platform-independent solution. Since I have been coding for iPhone/Mac for less than 1 day I was wondering whether this is the standard approach to getting an existing C++ engine running on the iPhone and if not, what is?
There's no problem in you rendering into an image and refreshing that image, but you get no acceleration from the GPU using this technique. So you'd be burning a lot of CPU cycles, which in turns eats battery.
If the objects you are rendering can be described in normal graphics primitives, be sure to use the drawing APIs which are optimised for the platform and can delegate work to the GPU.
An alternative approach is to make use of OpenGLES, but this has a learning curve
Yes, that is a fairly normal way to handle it. Generally you would either use small Objective C stubs for your events and things like pushing out the frame, or you would setup an OpenGL context and then pass it to your C++ code.
i am trying to get pickigng working in directx 9 and i am having some trouble. it works fine when i am rendering my mesh in software however i do get errors when rendering with a shader.
i can be off of a mesh but it still detects it as a hit (see image for more detail)
i am stopping animation controllers and updating frame matrices but still no joy with the picking.
http://tweetphoto.com/a7vtajzt
any help much apprechiated this has been driving me nuts for two days now.
regards
Mark
not to worry i found out that i was missing a clone function that i was doing in software mode but not hardware