Multiple render passes and post-render processing topics

Hey everyone,



I'm a little late getting to the party so I certainly apologize if these questions come off as naive, they aren't meant to be. I'm interested in learning more about the rendering process and all the different effects that can be achieved by using multiple rendering passes. Additionally, I'm interested in what can be done with scenes after the fact, with processing a rendered scene for further effect (i.e. heat ripples, distortions, etc…)



I've looked through the wiki a bit and I see things like shadow passes and bloom passes as well as various shaders, but I'm afraid my knowledge base is still more primative than those wiki pages. Can anyone point me in the right direction to find documentation on the various effects described above? I've tried searching google here and then but I'm not finding the results I'm looking for. Perhaps I'm searching for the wrong thing?



many thanks!

jW

Hey jagwire,



There’s a pretty well written article on render passes here (its written with Maya in mind, but the ideas hold the same)…



For the aforementioned heat ripples, distortions, etc you would be looking at a GLSL shader to do the trick.  Usually typing in “my desired effect GLSL” into Google will provide you with some workable examples.  I found a pretty nice looking render from searching for a heat shader: http://blenderartists.org/forum/showthread.php?t=111423



-Skye

Skye,



Thanks a bunch! That link was extremely helpful. I guess next steps would be figuring out how to do some of this stuff with JME. I've found some various code snippets on shaders and shadows and the like, but is there any formal documentation (outside of the forum) or rough outline of steps to correctly utilize multiple render passes and shaders?



thanks again!

jW

The last time I've really dug down into the internals of MTGame was probably back in the spring when Nina had asked about the weird AWT glitches over the glCanvas…



Assuming you can get to the part where jME is calling its update and render methods, then its just a matter of using a PassManager and adding the passes to it.



You can see an example of how passes work in jME here: https://students.bxmc.poly.edu/svn/betaville/branches/BetavilleApp/src/edu/poly/bxmc/betaville/jme/gamestates/ShadowPassState.java



The essentials are that you would use a BasicPassManager as the place to add different passes to and then call its update and render functions in the corresponding update and render methods for jME.  The order that you add the passes to the manager is the order that they're rendered, so be conscious of when you add each pass…



Hope this helps!

Skye,



Thanks for the sample! Digging a bit into MTGame, it looks like the interface resides in MTGame's RenderManager referenced in its WorldManager class. There should also be some examples in the test directory for various effects. Thanks a bunch!



jW