shadow for unclosed shape

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
yoogera
Posts: 2
Joined: Tue Dec 16, 2014 5:27 am

shadow for unclosed shape

Post by yoogera »

hi, i create a cloth scene node in irrlicht. i want to show its shadow(addShadowVolumeSceneNode), found that in irrlicht only generate back face node's shadow.
CShadowVolumeSceneNode.cpp line 122

#ifdef IRR_USE_REVERSE_EXTRUDED
FaceData=core::triangle3df(v0,v1,v2).isFrontFacing(light);
#else
FaceData=core::triangle3df(v2,v1,v0).isFrontFacing(light);
#endif

if (UseZFailMethod && FaceData)


it check FaceData to generate shadow, but front face not.
if the node is a closed shape, it is nothing, but if it is a unclosed shape, some shadows lost, can any one help me?thk
mongoose7
Posts: 1227
Joined: Wed Apr 06, 2011 12:13 pm

Re: shadow for unclosed shape

Post by mongoose7 »

Irrlicht only generates shadows for the triangles facing the light. This has nothing to do with front-facing and back-facing. But note that the decision depends on the "winding" of the vertices.
Post Reply