I’m making steady progress on shadow support, not as fast as I’d like but that’s nothing new 😉 I’ve recently cleaned up the stencil creation code in all the rendering systems, added support for representing all types of lights as a 4D homogenous vector, which makes many of the calculations a lot easier, added software mesh extrusion and shadow volume construction code, added detection of the cases where you need to use zfail instead of zpass (this is where the shadow volume intersect the viewport; you only want to use zfail when you have to though because it requires the use of light and dark caps), and basically lots of infrastructural bits and pieces.
Sorry for the lack of updates, my working week has been awful and I had to put some hours in over the weekend too, so OGRE has suffered. I haven’t stood still though, I had a bit of a problem with D3D9 in that I wanted to use the approach covered in a recent nVidia paper where you use an xyzw position buffer to do shadow extrusion and rendering of the original mesh, however D3D9 would not render the original mesh from the 4d position buffer.
I wrote an edge list builder over the weekend as preparation for stencil shadow support. One thing I noticed is that all the stencil shadow demos around make large simplifying assumptions about the geometry they have to process - they assume meshes are made out of a single set of triangles, which reference only one vertex buffer. Meshes have to be ‘closed’ within these limitations (ie every edge has to be attached to exactly 2 triangles).
I’m currently in ‘pencil chewing mode’, which means I’m considering the best way to go about implementing shadows in 0.14. I’ve posted extensively on my thoughts in this thread: http://www.ogre3d.org/phpBB2/viewtopic.php?t=3271,and I’m currently reading all the shadow papers I can get my hands on. Work is a bit nuts right now though so I’m rather fried by the time I get home, so real work will probably have to wait until the weekend.
Sorry for the quiet period, I’ve been flat out getting the OGRE 0.13.0 release ready for public consumption, and then recovering from all the hours I put in on that process afterwards 😀I’m glad it’s done, 0.13. is a big update and really starts to put OGRE on a par with the next-generation commercial engines (I think our fresnel reflections are as good as HL2’s, although of course there’s a lot more to their engine).
Boy, am I having a bad week. Work has been highly busy, one of my key staff is leaving, and my laptop died, seemingly from a burned out graphics chip (it won’t go above 640×480 now without barfing). When it rains, it pours. On the good news side, fresnel-modulated reflections are now working, see them here. temas has also merged in the GL_ATI_fragment_shader support which nfz wrote, so we support ps_1_x on ATI cards in GL now too, which is great; it even converts ps_1_x code to ATI calls so we can use Cg to drive it.
I’ve been playing with texture projection and distortion these past couple of days, in preparation for a new water effect. I abstracted a Frustum class out of Camera in order to provide a good way to get a view / projection matrix out for use in texture projection, and that’s worked well - I have a bit of tidying up to do in Camera so I can make it a Frustum subclass, but that can wait for the moment.
It’s been a bit slow going these past 2-3 days, I’ve been fixing a few minor things, sorting out the 0.12.3 maintenance release and such. There was also an odd release-mode only bug in DirectX9 that would only occur on some demos, and then only when you ran in Dx9 twice; if you ran in GL or Dx7 in between it would work again, the first time. Debug mode was fine, so I suspected an initialisation problem.
Sods law says “If you have plans for something, forget about it.”, or something like that. I’ve been fixing up a few things in the last couple of days, mostly issues with using multiple render targets; there were some problems with overlay sizes and frame rate stats when using more than one. I wanted to do this because the demo I have planned will use 3 targets; 2 render textures and the main view.