Friday 27 July 2007

Beast of the Shadow

Hours and hours of suffering. Yeah. And more again. :-) And yet in the end I found the fountain of knowledge! Polished out, hunted down some memory monsters (put in some caches in for grass textures), and a recursive Occluder remover function...arrived at the Gates of Shadow.

The road was rocky to say, had to find some wiseman to help on the way. But knowing that lighting mode for the JME shadowpass must be Modulative instead of Additive if using transparent textures helped tones, and finally finding the stencil bits variable of the JME app put together all the pieces. Right after only small polishing followed...and the shots for you! Check SVN for live action, expect very low FPS! ;-D On my 8800GTS I had to keep it low with a 20 RENDER_SHADOW_DISTANCE and a 10 RENDER_DISTANCE with double grass, gave around 30-40 FPS, still usable, but I admit, not too good values... Yet trees and many things can have shadows now for the eyecandy (?) lovers, and that's something. Hope they won't hate its simplicity although! ;-) (Now only billboarded grass is my concern, and I visualize that once I will write maybe one dynamic tree generator too, if not will I be able to billboard the leaves of the current trees, which is still not impossible, we'll see...)
P.S: Under Windows with my 6200Go I had some opengl error issue, that may persist (although I think there may be some improvement I couldn't test yet but on my 8800GTS.). So if game (SVN version) would crash, turn Shadows off in conf.properties.

1 comment:

pzi said...

Yeah, I managed to implement the grass billboarding...now you can have the grass with much less quads, grass always facing your screen (looks denser) -> this means more FPS! :-D

Twitter