background image

DirectX Visualizer 

3D Solutions 

 

 

 
 

01 April 2009 

 

 

©2005-2009 Philips Electronics Nederland B.V. 

11 of 26 

 
 
 

Option name

Option name

Option name

Option name    

Possible values

Possible values

Possible values

Possible values     Default value

Default value

Default value

Default value    

Description

Description

Description

Description    

ChangeDisplayResW 

positive integer 

Width of native display resolution 

ChangeDisplayResH 

positive integer 

Height of native display resolution 

ChangeDisplayRefreshRate 

positive integer 

Refresh rate to use at native display 
resolution 

6.3

6.3

6.3

6.3

 

Hardware gamma 

Hardware gamma control will modify the colors of the output before sending it to the display. This will 
also affect the depth information that the Visualizer sends to the display, possibly having a negative 
impact on the depth effect. A clue that the application is using hardware gamma control is if changing a 
brightness or gamma setting from the application’s menu also changes the brightness of the depth map 
(see 6.13 on how to display only the depth map). 

2

 

 

Option name

Option name

Option name

Option name    

Possible 

Possible 

Possible 

Possible 

values

values

values

values    

Default 

Default 

Default 

Default 

value

value

value

value    

Description

Description

Description

Description    

DisableHardwareGamma 

0, 1 

Whether to disable hardware gamma (1) or not (0) 

6.4

6.4

6.4

6.4

 

Application resolution 

The resolution at which the application renders is detected by the Visualizer automatically if these 
options are set to 0. If auto-detection fails, use this option to override it.  
 

Option name

Option name

Option name

Option name    

Possible values

Possible values

Possible values

Possible values    

Defau

Defau

Defau

Default value

lt value

lt value

lt value    

Description

Description

Description

Description    

ResAppW 

positive integer 

Width of application resolution 

ResAppH 

positive integer 

Height of application resolution 

6.5

6.5

6.5

6.5

 

Image input resolution 

The application can be forced to render at a different resolution by changing the viewport. This results 
in a lower resolution 2D input to the Visualizer. Quality in 2D mode is optimal if the input resolution 
is equal to the application resolution. Optimal quality in 3D mode as well as highest performance is 
achieved when the input resolution is set to a quarter of the application resolution (both width and 

                                                 

2

 If the application has no brightness/gamma setting it is difficult, but still possible to see the effect of it on the 

depth. Follow the instructions in section 6.9 to get a correct perspective. If straight lines toward the horizon still 
appear bent when looking at the 3D display from a different angle, then this could very well be caused by 
hardware gamma. 

Summary of Contents for DirectX Visualizer

Page 1: ...DirectX Visualizer User Manual Philips 3D Solutions ...

Page 2: ...te 01 April 2009 Security The attached material and the information contained herein are proprietary to Philips 3D Solutions Copying reproduction adaptation modification or dissemination in whole or part is not permitted without written permission from Philips 3D Solutions Contact http www philips com 3dsolutions ...

Page 3: ...re gamma 11 6 4 Application resolution 11 6 5 Image input resolution 11 6 6 Depth input resolution 12 6 7 Output resolution and position 12 6 8 Depth map selection 12 6 9 Discardable depth stencils 15 6 10 Depth tuning help 15 6 11 Range of interest 16 6 12 Inverse projection calculation 17 6 13 Switching between 2D 3D and depth only mode 18 6 14 Rendering parameters in header 18 6 15 Improving HU...

Page 4: ...tion and tweaking has to be done through the Visualizer s configuration file An overview of how to get a new application to work with the Visualizer is given in section 3 while the configuration file format and an explanation of all possible settings are given in sections 5 and 6 respectively This document assumes basic knowledge of the Direct3D API in its explanation of the Visualizer configurati...

Page 5: ...009 Philips Electronics Nederland B V 5 of 26 of the settings in the configuration file In some cases it is possible to build support for this application into a later version of the Visualizer but this will have to be determined on a case by case basis ...

Page 6: ...ation file format for DirectX Visualizer version 1 0 At this time the Visualizer can only support games and applications that use Direct3D 9 The Visualizer is expected to work on any modern 3D graphics card but we recommend an NVIDIA GeForce 6800 XT or better At this time the DirectX Visualizer has only been tested on Microsoft Windows XP Professional SP2 ...

Page 7: ...nd where to extract depth information See the description of the DepthTriggerCondition setting in 6 8 for more information on this step 4 Tuning the depth settings to get a proper depth effect as explained in sections 6 10 through 6 12 5 Depending on the application it may be useful to configure several extra features of the Visualizer such as improving HUD readability see 6 15 or turning mouse cu...

Page 8: ...m where it was installed usually C Program Files Philips DirectX Visualizer to the directory with the application s executable To check if the application is using our DLL put a file named visualizer ini in the same directory containing Starting the application should result in creation of a file named visualizer_log txt If this file is not created then the Visualizer is not being loaded Try putti...

Page 9: ... DLL As mentioned before this is usually the directory where the application executable is located If no configuration file is found default settings will be used The configuration file complies with the format of a standard Microsoft Windows ini file It should start with the declaration of a section always Config for this Visualizer followed by a list of options and their values Any lines that st...

Page 10: ...gging The Visualizer can write information about what is going on to a file This can help in choosing the right values for options in the configuration file The name of the file is visualizer_log txt and it will be put in the same directory as the Visualizer DLL Logging incurs a performance penalty so it should be disabled once the settings in visualizer ini have been finalized Option name Option ...

Page 11: ...ion Description DisableHardwareGamma 0 1 0 Whether to disable hardware gamma 1 or not 0 6 4 6 4 6 4 6 4 Application resolution The resolution at which the application renders is detected by the Visualizer automatically if these options are set to 0 If auto detection fails use this option to override it Option name Option name Option name Option name Possible values Possible values Possible values ...

Page 12: ...izer to only use a part of the screen for its output In general the Visualizer output should cover the entire screen In that case these options can be set to 0 causing the application resolution to be used Note that the coordinate system used with these options has its origin at the bottom left corner of the screen Option name Option name Option name Option name Possible Possible Possible Possible...

Page 13: ...le can be used to determine the most suitable depth trigger condition Appendix A shows how to determine a proper value for DepthTriggerCondition Option name Option name Option name Option name Possible Possible Possible Possible values values values values Default Default Default Default value value value value Description Description Description Description DepthTriggerCondition string undefined ...

Page 14: ...et selected a render target for index n rendertargetwidth rtw positive integer match only Clear operations that are done while the last call to SetRenderTarget selected a render target with the specified width rendertargetheight rth positive integer match only Clear operations that are done while the last call to SetRenderTarget selected a render target with the specified height depthstencilordina...

Page 15: ...effect on performance 6 10 6 10 6 10 6 10 Depth tuning help When the EnableDepthTuningHelp option is set to 1 the Visualizer will give certain depth values in the depth map a different color to help you tune both the range of interest 6 11 as well as the FarNearRatio value 6 12 To see the depth map either switch to the depth only mode using the 3D toggle key 6 13 or run the application on a regula...

Page 16: ... that represent closer distances for instance red and purple is larger than the distance between lines that represent further distances for instance green and cyan then the FarNearRatio needs to be decreased to come closer to the correct perspective Figure 5 Depth map with FarNearRatio tuned for a correct perspective 6 11 6 11 6 11 6 11 Range of interest Usually objects drawn by an application are...

Page 17: ...nverted an approximation will be used instead The Visualizer will write a warning message about this to the log if logging is enabled see Figure 6 It is recommended to test the application at least once with logging enabled to see if this warning is given End of InitShaders Warning inverse projection matrix not valid using approximation DllMain DLL_THREAD_ATTACH Warning Switched back to using inve...

Page 18: ...oticeable depth gradient in all parts of the scene Option name Option name Option name Option name Possible values Possible values Possible values Possible values Default value Default value Default value Default value Description Description Description Description DynamicZtoD 0 or 1 1 Whether to use the inverse projection matrix 1 or not 0 FarNearRatio floating point value between 2 0 and 32768 ...

Page 19: ...much of the depth effect is behind the screen 0 everything is in front of the screen 255 everything is behind the screen HeaderOffsetResetKey key disabled Key that resets HeaderOffset to the value it is set to in the configuration file HeaderOffsetDownKey key disabled Key that decreases HeaderOffset HeaderOffsetUpKey key disabled Key that increases HeaderFactor 6 14 3 6 14 3 6 14 3 6 14 3 Clear Ed...

Page 20: ... keep the HUD readable it is possible to define areas of the image that should always be on the display plane The following settings provide an easy way to define such areas Option name Option name Option name Option name Possible values Possible values Possible values Possible values Default value Default value Default value Default value Description Description Description Description HUDScreenS...

Page 21: ...blems it can be disabled through the ManageCursor option If the application hides the mouse cursor while the Visualizer is handling the drawing the Visualizer will not detect this automatically and it will keep on drawing the mouse cursor If CursorDetectKey is set that key can be used to force detection of the cursor state Option name Option name Option name Option name Possible values Possible va...

Page 22: ...depth being visible without any tuning of ZNearInterest ZNearInterest 0 5 ZNearInterestDownKey F5 ZNearInterestUpKey F6 ZFarInterestDownKey F7 ZFarInterestUpKey F8 ZRangeUpKey PageUp ZRangeDownKey PageDown Figure 7 Initial Visualizer configuration We try to select keys that do not conflict with any of the game s controls After running the game for a short period with the Visualizer we open the log...

Page 23: ...alling Clear Stencil 0 Application setting rendertarget index 0 0x18966EC0 1600x1200 Application calling Clear Color 0xffffffff Application setting rendertarget index 0 0x188FBA20 1024x1024 Application setting depth stencil surface 0x1896CD80 1024x1024 Application calling Clear Z 1 000000 Application setting rendertarget index 0 0x18966EC0 1600x1200 Application setting depth stencil surface 0x0056...

Page 24: ...0x1200 Application setting rendertarget index 0 0x188FCEC0 534x400 Application setting depth stencil surface 0x0056D200 1600x1200 Application setting rendertarget index 0 0x0056D160 1600x1200 Application setting depth stencil surface 0x00000000 0x0 Application setting rendertarget index 0 0x0056D160 1600x1200 Application setting depth stencil surface 0x00000000 0x0 Application setting depth stenci...

Page 25: ...ave selected so we modify the Visualizer configuration slightly to be DepthTriggerCondition cl n 2 z dsw 1600 dsh 1200 Figure 11 Final depth trigger condition Now it is time to start tuning the depth map as mentioned in sections 6 10 through 6 12 We ll enable depth tuning help for this EnableDepthTuningHelp 1 Figure 12 Enabling depth tuning help in visualizer ini The trick in tuning depth is to ma...

Page 26: ...3D Solutions 01 April 2009 26 of 26 2005 2009 Philips Electronics Nederland B V DepthTriggerCondition cl n 2 z dsw 1600 dsh 1200 ZNearInterest 0 900994 FarNearRatio 128 Figure 13 Final content of visualizer ini 0 0 0 0 0 ...

Reviews: