@jcl:

Quote:

- Shadows on invisible models should be possible by using nontransparent models with an FFP effect that renders only into the z buffer, but nothing to the screen buffer. I haven't tried it, though.




That quote came from the panels behind the view thread here; however this post belongs in this thread since that's what it's in regards to.

I PM'd the head honcho of the Wintermute Engine on how he handles this in his engine. As I've stated before, WME will allow stencil shadows to render on the invisible collision hulls used for 2.5D games. Here's his response to my question:

Quote:


Hi Ryan,

the hidden geometry indeed needs to be rendered into the depth buffer, so that the shadow volume is properly mapped onto it. In Direct3D the following render states should do the trick:

Code:

m_Device->SetRenderState(D3DRS_ALPHABLENDENABLE, TRUE);
m_Device->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_ZERO);
m_Device->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_ONE);



This unfortunately also means the hidden geometry must closely match the 2D image, otherwise the depth buffer will mask the 3D character (like on this screenshot: http://www.dead-code.org/blog/wp-content/shadow2.png).

JN





I'm all for features like these being a part of the engine as some sort of option from WED (or a flag in script), so we can all use it if we find the need for it. Yeah, it's a limited feature for a certain niche, but from reading your posts, it sounds like Conitec is trying its best to include some 2.5D tools for those of us who love this genre.

Anyway, if the information Mneumonic provided is of use (or gives you an idea of how to better implement this), I would like to request that stencil shadows be able to render onto invisible surfaces. One possible solution would be to invent a new flag (similar to None, Shaded, Flat, Smooth, etc) and any surface with this flag set would be a special kind of invisible (or none...whichever is preferable) and shadows would render on these special surfaces. I'm not sure what you'd want to call the flag, but it's an idea. Please consider it because it would make life a whole helluva lot easier for 2.5D game development when it came to dealing with stencil shadows and the collision hull. Thanks.

There's also a discussion regarding this here: http://www.coniserver.net/ubbthreads/showflat.php?Cat=0&Number=769499


My User Contributions master list - my initial post links are down but scroll down page to find list to active links