Difference between revisions of "Lesson 6 - prime directive"

From Bo3b's School for Shaderhackers
Jump to: navigation, search
Line 38: Line 38:
  
 
----
 
----
Sometimes we will run into an effect that really cannot be disabled without making the game a lot worse.  
+
The best background for how 3D works is a presentation from NVidia for GTC2010.
  
In this game, the Lava effect is an example.  It's annoyingly broken, and makes those parts of the games unplayable. But, disabling it altogether removes the visual cue of the dangerous areas. 
+
[http://www.nvidia.com/content/GTC-2010/pdfs/2010_GTC2010.pdf http://www.nvidia.com/content/GTC-2010/pdfs/2010_GTC2010.pdf]
 +
 
 +
It seems like everyone in this class is going to have a reasonably good idea for the basic principles of stereoscopy, so I'm not going to go into those basics.  It would still be worth reading this paper for a refresher and to get the terminology that NVidia uses.
  
Let's experiment with it, to see if we can make something better.
 
  
  

Revision as of 06:18, 20 September 2014

Summary

Now it's time to talk about how stereo 3D is created, and the math behind it.


Level of difficulty: Easy
Time required: 30 minutes

Video Walkthrough on YouTube, pt 1 ... Video Walkthrough direct download link, pt 1
Video Walkthrough on YouTube, pt 2 ... Video Walkthrough direct download link, pt 2

Objective

Review and understand the principles behind stereoscopy.
Learn about the prime directive formula, and how to apply it.

Quiz

??



After we've found a broken shader, we want to disable or fix them. We can't always do the easiest fix though, and this is where ..


We'll step back into The Ball for a minute to get a first glimpse of the 3D formula.

  • Fix Lava effect, not just disable it.
    1. Lava in The Ball is perfectly usable now, but we saw the Unreal fix earlier.
    2. Unreal fix did not function, but we can make it work, using HelixMod inputs.
    3. Edit shader file to use HelixMod stereo texture, instead of game based one.
    4. Fixed in 3D, not just disabling a piece of it.



The best background for how 3D works is a presentation from NVidia for GTC2010.

http://www.nvidia.com/content/GTC-2010/pdfs/2010_GTC2010.pdf

It seems like everyone in this class is going to have a reasonably good idea for the basic principles of stereoscopy, so I'm not going to go into those basics. It would still be worth reading this paper for a refresher and to get the terminology that NVidia uses.


  • Experiment on lava shaders.
    1. Inspect and experiment on lava in PS.
    2. In pixel shader, try changing each texld to invisible.
    3. Those don't work, look next at the input section with interesting stereo fix.
    4. See that v1 is an input location.
    5. Experiment by changing v1 to null.
    6. Fix lava by killing one texture instead of the entire shader.
    7. optional: Fix the lava from the VertexShader output side, where v1 is created.



Quiz: Go to the end of the demo, and figure out a way to fix the broken water.

  • Fix the water shader at the last level.
    1. Play through to the giant worm at the end, it's not far.
    2. See the water has double-imaging like the water in the hall earlier.
    3. Find the shader for the water effect.
    4. Disable it. Note that it's really not good enough disabled.
    5. Experiment with it to fix it to where it's acceptable.
    6. Save a screenshot to your personal page.


  • optional: Fix the entire game.
    1. Go through at least 3 levels, and find and mark all broken effects.
    2. Disable all broken effects.
    3. Fix the lava effect by disabling the texture.
    4. Save your complete list of modified shaders to your personal page.