Re: [Plib-users] plib and shadows
Brought to you by:
sjbaker
|
From: Steve B. <sjb...@ai...> - 2002-06-11 03:10:29
|
Rolf Jakob wrote: > As a newbie in OpenGL and plib I searched the web for possibilities to have > shadows in a scene. I found one simple tutorial for pure OpenGL from a guy at > nvidia using the stencil buffer. Yes - that's not a bad approach - but really all shadow algorithms come with some ugly compromises. Many of the ones that are currently seen in games only work because the light source is close to the camera and the scene is quite restricted in size. > Now, this requires to draw the scene twice - one for the projection on the > ground and one to actually show the scene. It's working fine with an object > created using OpenGL directly, but I would like to use modelled scenes from > AC3d and benefit from plib's features. > > Is it possible to make SSG draw the scene with some settings and > transformation and stencil buffer, so that the shadows can be calculated ? Yes. > ssgCullAndDraw() don't seem to work as it's setting up OpenGL the way it > needs it to draw it from the eye's point of view. Well, you can place a draw callback on the top level SGGL node and have it reset the parameters however you like. > Maybe there are other ways to get shadows with plib ? Not that I know of. I do mostly outdoor games - and I generally just plant a fuzzy blob under the things that need shadows. ----------------------------- Steve Baker ------------------------------- Mail : <sjb...@ai...> WorkMail: <sj...@li...> URLs : http://www.sjbaker.org http://plib.sf.net http://tuxaqfh.sf.net http://tuxkart.sf.net http://prettypoly.sf.net http://freeglut.sf.net http://toobular.sf.net http://lodestone.sf.net |