NVIDIA Please, How do I set convergence/depth from custom .NET application? PLEASE help me.
  1 / 2    
NVIDIA, I want to create a custom 3rd party application that will allow different depth/convergence depending on different keystrokes in game. Let me clarify. My application will detect keystrokes while the game is active using GetKeyState API.

[b]Aiming[/b]: When you are aiming in a game the depth & convergence will change to whatever you want.
[b]Traveling[/b]: When you are traveling in game the depth & convergence will change according to the button you press.
[b]Conversation[/b]: When having a conversation in game the depth & convergence will change according to the button you press.
[b]Combat[/b]: When in combat the convergence & depth change according to the button you press.

However I can't seem to find an effective way to change convergence & depth in real time from a .NET application or by changing STEREO3D settings in the registry.
[size="5"]
Simply put:

I need a way to access NVIDIA API that gives me control over convergence & depth of whatever game is being run. THAT IS IT. PLEASE!![/size]
NVIDIA, I want to create a custom 3rd party application that will allow different depth/convergence depending on different keystrokes in game. Let me clarify. My application will detect keystrokes while the game is active using GetKeyState API.



Aiming: When you are aiming in a game the depth & convergence will change to whatever you want.

Traveling: When you are traveling in game the depth & convergence will change according to the button you press.

Conversation: When having a conversation in game the depth & convergence will change according to the button you press.

Combat: When in combat the convergence & depth change according to the button you press.



However I can't seem to find an effective way to change convergence & depth in real time from a .NET application or by changing STEREO3D settings in the registry.



Simply put:



I need a way to access NVIDIA API that gives me control over convergence & depth of whatever game is being run. THAT IS IT. PLEASE!!

#1
Posted 11/22/2010 06:06 AM   
NVIDIA, I want to create a custom 3rd party application that will allow different depth/convergence depending on different keystrokes in game. Let me clarify. My application will detect keystrokes while the game is active using GetKeyState API.

[b]Aiming[/b]: When you are aiming in a game the depth & convergence will change to whatever you want.
[b]Traveling[/b]: When you are traveling in game the depth & convergence will change according to the button you press.
[b]Conversation[/b]: When having a conversation in game the depth & convergence will change according to the button you press.
[b]Combat[/b]: When in combat the convergence & depth change according to the button you press.

However I can't seem to find an effective way to change convergence & depth in real time from a .NET application or by changing STEREO3D settings in the registry.
[size="5"]
Simply put:

I need a way to access NVIDIA API that gives me control over convergence & depth of whatever game is being run. THAT IS IT. PLEASE!![/size]
NVIDIA, I want to create a custom 3rd party application that will allow different depth/convergence depending on different keystrokes in game. Let me clarify. My application will detect keystrokes while the game is active using GetKeyState API.



Aiming: When you are aiming in a game the depth & convergence will change to whatever you want.

Traveling: When you are traveling in game the depth & convergence will change according to the button you press.

Conversation: When having a conversation in game the depth & convergence will change according to the button you press.

Combat: When in combat the convergence & depth change according to the button you press.



However I can't seem to find an effective way to change convergence & depth in real time from a .NET application or by changing STEREO3D settings in the registry.



Simply put:



I need a way to access NVIDIA API that gives me control over convergence & depth of whatever game is being run. THAT IS IT. PLEASE!!

#2
Posted 11/22/2010 06:06 AM   
For anyone wondering, it is possible to access NVIDIA Drivers to set the convergence and depth in VB.NET or C# but it is a complicated process since it's meant to be used with C++.

NVAPI gives you access to the API that allows control over setting depth, convergence and other stereo3d functionality.

http://developer.nvidia.com/object/nvapi.html

I tried all day to get a version working in VB.NET but I couldn't properly DLLimport "nvapi64.dll", it was a huge nightmare. I really wish they had a COM compatible DLL we could just import into our .NET app and get straight to work improving 3D vision. *sigh*

Next week I'm going to try and compile NVAPI.h into a COM compatible library that can be added to a C# or VB.NET application ...
For anyone wondering, it is possible to access NVIDIA Drivers to set the convergence and depth in VB.NET or C# but it is a complicated process since it's meant to be used with C++.



NVAPI gives you access to the API that allows control over setting depth, convergence and other stereo3d functionality.



http://developer.nvidia.com/object/nvapi.html



I tried all day to get a version working in VB.NET but I couldn't properly DLLimport "nvapi64.dll", it was a huge nightmare. I really wish they had a COM compatible DLL we could just import into our .NET app and get straight to work improving 3D vision. *sigh*



Next week I'm going to try and compile NVAPI.h into a COM compatible library that can be added to a C# or VB.NET application ...

#3
Posted 11/22/2010 10:46 PM   
For anyone wondering, it is possible to access NVIDIA Drivers to set the convergence and depth in VB.NET or C# but it is a complicated process since it's meant to be used with C++.

NVAPI gives you access to the API that allows control over setting depth, convergence and other stereo3d functionality.

http://developer.nvidia.com/object/nvapi.html

I tried all day to get a version working in VB.NET but I couldn't properly DLLimport "nvapi64.dll", it was a huge nightmare. I really wish they had a COM compatible DLL we could just import into our .NET app and get straight to work improving 3D vision. *sigh*

Next week I'm going to try and compile NVAPI.h into a COM compatible library that can be added to a C# or VB.NET application ...
For anyone wondering, it is possible to access NVIDIA Drivers to set the convergence and depth in VB.NET or C# but it is a complicated process since it's meant to be used with C++.



NVAPI gives you access to the API that allows control over setting depth, convergence and other stereo3d functionality.



http://developer.nvidia.com/object/nvapi.html



I tried all day to get a version working in VB.NET but I couldn't properly DLLimport "nvapi64.dll", it was a huge nightmare. I really wish they had a COM compatible DLL we could just import into our .NET app and get straight to work improving 3D vision. *sigh*



Next week I'm going to try and compile NVAPI.h into a COM compatible library that can be added to a C# or VB.NET application ...

#4
Posted 11/22/2010 10:46 PM   
depth can be modified thru the monsize registry key . Not sure about convergence but I gave you a hint already, how you can find it . Not sure it'd swap , or its just a recall function.

Please look for my old post.
depth can be modified thru the monsize registry key . Not sure about convergence but I gave you a hint already, how you can find it . Not sure it'd swap , or its just a recall function.



Please look for my old post.

#5
Posted 11/22/2010 11:37 PM   
depth can be modified thru the monsize registry key . Not sure about convergence but I gave you a hint already, how you can find it . Not sure it'd swap , or its just a recall function.

Please look for my old post.
depth can be modified thru the monsize registry key . Not sure about convergence but I gave you a hint already, how you can find it . Not sure it'd swap , or its just a recall function.



Please look for my old post.

#6
Posted 11/22/2010 11:37 PM   
[quote name='tritosine' date='22 November 2010 - 11:37 PM' timestamp='1290469049' post='1150203']
depth can be modified thru the monsize registry key . Not sure about convergence but I gave you a hint already, how you can find it . Not sure it'd swap , or its just a recall function.

Please look for my old post.
[/quote]

Modified in real time?

I tried setting [b]Stereoseparation [/b]in the registry and it didn't work in real time. I had to alt tab out and alt tab in for the new depth to take effect.

Have you actually tried modifying MonitorSize in realtime and having the effect show during gameplay?
[quote name='tritosine' date='22 November 2010 - 11:37 PM' timestamp='1290469049' post='1150203']

depth can be modified thru the monsize registry key . Not sure about convergence but I gave you a hint already, how you can find it . Not sure it'd swap , or its just a recall function.



Please look for my old post.





Modified in real time?



I tried setting Stereoseparation in the registry and it didn't work in real time. I had to alt tab out and alt tab in for the new depth to take effect.



Have you actually tried modifying MonitorSize in realtime and having the effect show during gameplay?

#7
Posted 11/23/2010 02:04 AM   
[quote name='tritosine' date='22 November 2010 - 11:37 PM' timestamp='1290469049' post='1150203']
depth can be modified thru the monsize registry key . Not sure about convergence but I gave you a hint already, how you can find it . Not sure it'd swap , or its just a recall function.

Please look for my old post.
[/quote]

Modified in real time?

I tried setting [b]Stereoseparation [/b]in the registry and it didn't work in real time. I had to alt tab out and alt tab in for the new depth to take effect.

Have you actually tried modifying MonitorSize in realtime and having the effect show during gameplay?
[quote name='tritosine' date='22 November 2010 - 11:37 PM' timestamp='1290469049' post='1150203']

depth can be modified thru the monsize registry key . Not sure about convergence but I gave you a hint already, how you can find it . Not sure it'd swap , or its just a recall function.



Please look for my old post.





Modified in real time?



I tried setting Stereoseparation in the registry and it didn't work in real time. I had to alt tab out and alt tab in for the new depth to take effect.



Have you actually tried modifying MonitorSize in realtime and having the effect show during gameplay?

#8
Posted 11/23/2010 02:04 AM   
[quote name='jenson' date='23 November 2010 - 04:04 AM' timestamp='1290477860' post='1150260']
Modified in real time?

I tried setting [b]Stereoseparation [/b]in the registry and it didn't work in real time. I had to alt tab out and alt tab in for the new depth to take effect.

Have you actually tried modifying MonitorSize in realtime and having the effect show during gameplay?
[/quote]

The registry entries do not have realtime effect. You have to us NVAPI stereo functions for this purpose.
[quote name='jenson' date='23 November 2010 - 04:04 AM' timestamp='1290477860' post='1150260']

Modified in real time?



I tried setting Stereoseparation in the registry and it didn't work in real time. I had to alt tab out and alt tab in for the new depth to take effect.



Have you actually tried modifying MonitorSize in realtime and having the effect show during gameplay?





The registry entries do not have realtime effect. You have to us NVAPI stereo functions for this purpose.

#9
Posted 11/23/2010 09:18 AM   
[quote name='jenson' date='23 November 2010 - 04:04 AM' timestamp='1290477860' post='1150260']
Modified in real time?

I tried setting [b]Stereoseparation [/b]in the registry and it didn't work in real time. I had to alt tab out and alt tab in for the new depth to take effect.

Have you actually tried modifying MonitorSize in realtime and having the effect show during gameplay?
[/quote]

The registry entries do not have realtime effect. You have to us NVAPI stereo functions for this purpose.
[quote name='jenson' date='23 November 2010 - 04:04 AM' timestamp='1290477860' post='1150260']

Modified in real time?



I tried setting Stereoseparation in the registry and it didn't work in real time. I had to alt tab out and alt tab in for the new depth to take effect.



Have you actually tried modifying MonitorSize in realtime and having the effect show during gameplay?





The registry entries do not have realtime effect. You have to us NVAPI stereo functions for this purpose.

#10
Posted 11/23/2010 09:18 AM   
the monitorsize registry settign we use to hack beyond the maximum depth on DLP projectors, ( we go beyond the 100% ) , Definately WORKS in realtime.

I alt tabbed out to change my blue (very nice) crosshair from 20% transparent to 65% transparent, that ALSO works in realtime. ( Using 100% transparent you get rid of poop up. )
[size="5"][font="Impact"]
So you can definately make depth presets and make crosshair poop up unexistant. [/font][/size]

Plus it wouldn't hurt if you fellows would setup a wiki page, I don't think wandal's would ruin it , but it might give birth to a petition or something. Thats the way this should be handled, not angry forum posts.
the monitorsize registry settign we use to hack beyond the maximum depth on DLP projectors, ( we go beyond the 100% ) , Definately WORKS in realtime.



I alt tabbed out to change my blue (very nice) crosshair from 20% transparent to 65% transparent, that ALSO works in realtime. ( Using 100% transparent you get rid of poop up. )



So you can definately make depth presets and make crosshair poop up unexistant.



Plus it wouldn't hurt if you fellows would setup a wiki page, I don't think wandal's would ruin it , but it might give birth to a petition or something. Thats the way this should be handled, not angry forum posts.

#11
Posted 11/23/2010 12:53 PM   
the monitorsize registry settign we use to hack beyond the maximum depth on DLP projectors, ( we go beyond the 100% ) , Definately WORKS in realtime.

I alt tabbed out to change my blue (very nice) crosshair from 20% transparent to 65% transparent, that ALSO works in realtime. ( Using 100% transparent you get rid of poop up. )
[size="5"][font="Impact"]
So you can definately make depth presets and make crosshair poop up unexistant. [/font][/size]

Plus it wouldn't hurt if you fellows would setup a wiki page, I don't think wandal's would ruin it , but it might give birth to a petition or something. Thats the way this should be handled, not angry forum posts.
the monitorsize registry settign we use to hack beyond the maximum depth on DLP projectors, ( we go beyond the 100% ) , Definately WORKS in realtime.



I alt tabbed out to change my blue (very nice) crosshair from 20% transparent to 65% transparent, that ALSO works in realtime. ( Using 100% transparent you get rid of poop up. )



So you can definately make depth presets and make crosshair poop up unexistant.



Plus it wouldn't hurt if you fellows would setup a wiki page, I don't think wandal's would ruin it , but it might give birth to a petition or something. Thats the way this should be handled, not angry forum posts.

#12
Posted 11/23/2010 12:53 PM   
[quote name='tritosine' date='23 November 2010 - 12:53 PM' timestamp='1290516815' post='1150426']
the monitorsize registry settign we use to hack beyond the maximum depth on DLP projectors, ( we go beyond the 100% ) , Definately WORKS in realtime.

I alt tabbed out to change my blue (very nice) crosshair from 20% transparent to 65% transparent, that ALSO works in realtime. ( Using 100% transparent you get rid of poop up. )
[size="5"][font="Impact"]
So you can definately make depth presets and make crosshair poop up unexistant. [/font][/size]

Plus it wouldn't hurt if you fellows would setup a wiki page, I don't think wandal's would ruin it , but it might give birth to a petition or something. Thats the way this should be handled, not angry forum posts.
[/quote]

I'll explain very carefully as to what I'm doing.

1. I have a .net application resident in memory that waits until you hold down right click.

2. In game when you hold down right click it immediately changes StereoSeparation to 90 from 5 [b]in the registry.[/b]

But this DOES not change the depth in real time. You have to literally alt tab out and alt tab back in for the change to take place which defeats the purpose of setting depth & convergence dynamically based upon keypresses in game.

In simpler words. You can't have 4-5 different depth & conv presets tied to different hotkeys since changing values in the registry doesn't reflect in realtime. You have to alt tab out and alt tab back in then turn the 3D back on.

My angry forum posts are 100% justified. Even if I started a wiki page I wouldn't have any relevant information to share. Now if NVIDIA gives me an NVAPI COM DLL I can import into a .NET application then i'd be happy to put up a wiki page.

Regarding MonitorSize. Like you said you can change this to get a higher depth right? But still you can't change the depth instantly during game while modifying the registry. This makes sense, I doubt NVIDIA would put a hook or callback method on a registry setting to detect a change.

Regarding the transparency of the 3d crosshair. This was a very good idea, but I have a feeling if I were to change this property in the registry it wouldn't reflect immediately in game without turning it on then off to refresh with the new setting. Like you said you would have to alt tab out and alt tab back in which defeats the purpose.
[quote name='tritosine' date='23 November 2010 - 12:53 PM' timestamp='1290516815' post='1150426']

the monitorsize registry settign we use to hack beyond the maximum depth on DLP projectors, ( we go beyond the 100% ) , Definately WORKS in realtime.



I alt tabbed out to change my blue (very nice) crosshair from 20% transparent to 65% transparent, that ALSO works in realtime. ( Using 100% transparent you get rid of poop up. )



So you can definately make depth presets and make crosshair poop up unexistant.



Plus it wouldn't hurt if you fellows would setup a wiki page, I don't think wandal's would ruin it , but it might give birth to a petition or something. Thats the way this should be handled, not angry forum posts.





I'll explain very carefully as to what I'm doing.



1. I have a .net application resident in memory that waits until you hold down right click.



2. In game when you hold down right click it immediately changes StereoSeparation to 90 from 5 in the registry.



But this DOES not change the depth in real time. You have to literally alt tab out and alt tab back in for the change to take place which defeats the purpose of setting depth & convergence dynamically based upon keypresses in game.



In simpler words. You can't have 4-5 different depth & conv presets tied to different hotkeys since changing values in the registry doesn't reflect in realtime. You have to alt tab out and alt tab back in then turn the 3D back on.



My angry forum posts are 100% justified. Even if I started a wiki page I wouldn't have any relevant information to share. Now if NVIDIA gives me an NVAPI COM DLL I can import into a .NET application then i'd be happy to put up a wiki page.



Regarding MonitorSize. Like you said you can change this to get a higher depth right? But still you can't change the depth instantly during game while modifying the registry. This makes sense, I doubt NVIDIA would put a hook or callback method on a registry setting to detect a change.



Regarding the transparency of the 3d crosshair. This was a very good idea, but I have a feeling if I were to change this property in the registry it wouldn't reflect immediately in game without turning it on then off to refresh with the new setting. Like you said you would have to alt tab out and alt tab back in which defeats the purpose.

#13
Posted 11/23/2010 06:25 PM   
[quote name='tritosine' date='23 November 2010 - 12:53 PM' timestamp='1290516815' post='1150426']
the monitorsize registry settign we use to hack beyond the maximum depth on DLP projectors, ( we go beyond the 100% ) , Definately WORKS in realtime.

I alt tabbed out to change my blue (very nice) crosshair from 20% transparent to 65% transparent, that ALSO works in realtime. ( Using 100% transparent you get rid of poop up. )
[size="5"][font="Impact"]
So you can definately make depth presets and make crosshair poop up unexistant. [/font][/size]

Plus it wouldn't hurt if you fellows would setup a wiki page, I don't think wandal's would ruin it , but it might give birth to a petition or something. Thats the way this should be handled, not angry forum posts.
[/quote]

I'll explain very carefully as to what I'm doing.

1. I have a .net application resident in memory that waits until you hold down right click.

2. In game when you hold down right click it immediately changes StereoSeparation to 90 from 5 [b]in the registry.[/b]

But this DOES not change the depth in real time. You have to literally alt tab out and alt tab back in for the change to take place which defeats the purpose of setting depth & convergence dynamically based upon keypresses in game.

In simpler words. You can't have 4-5 different depth & conv presets tied to different hotkeys since changing values in the registry doesn't reflect in realtime. You have to alt tab out and alt tab back in then turn the 3D back on.

My angry forum posts are 100% justified. Even if I started a wiki page I wouldn't have any relevant information to share. Now if NVIDIA gives me an NVAPI COM DLL I can import into a .NET application then i'd be happy to put up a wiki page.

Regarding MonitorSize. Like you said you can change this to get a higher depth right? But still you can't change the depth instantly during game while modifying the registry. This makes sense, I doubt NVIDIA would put a hook or callback method on a registry setting to detect a change.

Regarding the transparency of the 3d crosshair. This was a very good idea, but I have a feeling if I were to change this property in the registry it wouldn't reflect immediately in game without turning it on then off to refresh with the new setting. Like you said you would have to alt tab out and alt tab back in which defeats the purpose.
[quote name='tritosine' date='23 November 2010 - 12:53 PM' timestamp='1290516815' post='1150426']

the monitorsize registry settign we use to hack beyond the maximum depth on DLP projectors, ( we go beyond the 100% ) , Definately WORKS in realtime.



I alt tabbed out to change my blue (very nice) crosshair from 20% transparent to 65% transparent, that ALSO works in realtime. ( Using 100% transparent you get rid of poop up. )



So you can definately make depth presets and make crosshair poop up unexistant.



Plus it wouldn't hurt if you fellows would setup a wiki page, I don't think wandal's would ruin it , but it might give birth to a petition or something. Thats the way this should be handled, not angry forum posts.





I'll explain very carefully as to what I'm doing.



1. I have a .net application resident in memory that waits until you hold down right click.



2. In game when you hold down right click it immediately changes StereoSeparation to 90 from 5 in the registry.



But this DOES not change the depth in real time. You have to literally alt tab out and alt tab back in for the change to take place which defeats the purpose of setting depth & convergence dynamically based upon keypresses in game.



In simpler words. You can't have 4-5 different depth & conv presets tied to different hotkeys since changing values in the registry doesn't reflect in realtime. You have to alt tab out and alt tab back in then turn the 3D back on.



My angry forum posts are 100% justified. Even if I started a wiki page I wouldn't have any relevant information to share. Now if NVIDIA gives me an NVAPI COM DLL I can import into a .NET application then i'd be happy to put up a wiki page.



Regarding MonitorSize. Like you said you can change this to get a higher depth right? But still you can't change the depth instantly during game while modifying the registry. This makes sense, I doubt NVIDIA would put a hook or callback method on a registry setting to detect a change.



Regarding the transparency of the 3d crosshair. This was a very good idea, but I have a feeling if I were to change this property in the registry it wouldn't reflect immediately in game without turning it on then off to refresh with the new setting. Like you said you would have to alt tab out and alt tab back in which defeats the purpose.

#14
Posted 11/23/2010 06:25 PM   
I don't think you can do what you want with the NVAPI.
As I read it, control panel settings are only read when the display driver is started (probably on device created, which is why alt-tab works).
The API to explicityly set convergence requires a StereoHandle which in turn requires an D3D Device pointer, you have no way to get that from the application.
It could be done, but it certiainly wouldn't be easy. You'd have to find someway to intercept the D3DDevice creation, and your app would have to be running in the same address space as the app itself.

Edit--
Looks like it might be easier than I thought, you can hook the device creation in your own app to get the Device pointer
http://www.gamedev.net/community/forums/topic.asp?topic%5Fid=359794

You can probably use PInvoke on the NVAPI interfaces.
I don't think you can do what you want with the NVAPI.

As I read it, control panel settings are only read when the display driver is started (probably on device created, which is why alt-tab works).

The API to explicityly set convergence requires a StereoHandle which in turn requires an D3D Device pointer, you have no way to get that from the application.

It could be done, but it certiainly wouldn't be easy. You'd have to find someway to intercept the D3DDevice creation, and your app would have to be running in the same address space as the app itself.



Edit--

Looks like it might be easier than I thought, you can hook the device creation in your own app to get the Device pointer

http://www.gamedev.net/community/forums/topic.asp?topic%5Fid=359794



You can probably use PInvoke on the NVAPI interfaces.
#15
Posted 11/23/2010 06:59 PM   
  1 / 2    
Scroll To Top