[1.7] Stencil Shadows not extruded to correct location

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Unicide
Posts: 2
Joined: Thu Jul 18, 2013 6:46 pm

[1.7] Stencil Shadows not extruded to correct location

Post by Unicide »

I previously had the built-in Stencil Shadows working just fine on this build of the engine, but at some point they stopped functioning. After a while I've managed to get them to re-appear (only if zfail = false) but now they are not extruded to the correct place. These images take place on a .irr scene (built in CopperCube) I have loaded:
Image
Image
Image
As you can see, the shadows are extruded, but not to the nearby geometry. They are instead extruded to the 'infinite' value passed when I create the shadow volume scene node. Changing this infinite value moves where the shadow is extruded to, but does not fix the problem. When the shadows were working previously, this far-off shadow also existed (in addition to the normal shadow), but I ignored it.

More info:
* if I scenemgr->setShadowColor() to anything at all, the shadows do not appear.
* the level geometry is made up of inward-facing polygons. All I do when loading them is set EMF_LIGHTING and EMF_NORMALIZE_NORMALS to true before adding them to my triangle selector. If I instead use a mesh built and exported to .b3d format (no vertex colors or normals) from Blender, I get this result:
Image
Image
Here, it appears the shadow volume is not extruded at all, remaining in the same position as the mesh itself.
* if zfail is set to true, nothing at all appears.

What could be causing this?
Mitchell M
Posts: 15
Joined: Sat Jul 06, 2013 2:18 pm

Re: [1.7] Stencil Shadows not extruded to correct location

Post by Mitchell M »

That is pretty strange. You said it was working just fine for a while but then stopped? You could always try rebuilding the engine. I have had things that used to work and then all the sudden just decided they didn't want to anymore and for some reason rebuilding the engine fixed it.

Mitchell
Unicide
Posts: 2
Joined: Thu Jul 18, 2013 6:46 pm

Re: [1.7] Stencil Shadows not extruded to correct location

Post by Unicide »

That fixed it, thanks. Still no idea what caused it but whatever.
Post Reply