Advertisement

Strange issue with shadow volumes

Started by December 05, 2004 06:27 PM
12 comments, last by b3rs3rk 19 years, 11 months ago
lc_overlord: You're right ! I'm stupid. The method I describe will only work with some models (two manifold or something). But using back faces would make the shadow volume smaller (and thus save fill-rate) I think.
SaM3d!, a cross-platform API for 3d based on SDL and OpenGL.The trouble is that things never get better, they just stay the same, only more so. -- (Terry Pratchett, Eric)
if i render caps as lc_overlord said, the shadow volume disappears completly :/

i've done some attempts and i've discovered that if i change the order of the vertices of the volume nothing is rendered (this time without rendering caps) : assuming that for an edge k I have 2 verts a1 and a2 and the extruded verts are respectively e1 and e2, if i render a1,v1,v2,a2 it works, but if i render a2,v2,v1,a1, the volume disappears
o_O
Advertisement
Hmmm your problem is strange. Did you use the algorithm explained in the paper I mentionned ? Could you post your code ?
SaM3d!, a cross-platform API for 3d based on SDL and OpenGL.The trouble is that things never get better, they just stay the same, only more so. -- (Terry Pratchett, Eric)
here's my demo with source.I took the basecode from codesampler.com
http://www.neoborn.com/users/b3rs3rk/shadow%20demo.rar

left click and drag the mouse to move the camera,F1 draws the volume and arrows keys move the shadow

This topic is closed to new replies.

Advertisement