Re: [Plib-users] plib and shadows
Brought to you by:
sjbaker
From: Steve B. <sjb...@ai...> - 2002-06-16 02:21:54
|
Rolf Jakob wrote: > Hello, > > how can I change the material of a leaf that's part of a database imported > from AC3D ? > I traverse all leaves and set the state as following : > > state->disable(GL_LIGHTING); > state->disable(GL_BLEND); > state->disable(GL_TEXTURE_2D); > state->setColourMaterial(GL_DIFFUSE); > state->setMaterial(GL_DIFFUSE,0.0f,0.0f,0.0f,0.5f); > state->setShadeModel(GL_FLAT); > > But the leaves are rendered in their colors, so the textures are missing. But > what I need is a whole ssgTransform in black. The branch in question was > created by a clone(SSG_CLONE_RECURSIVE|SSG_CLONE_STATE). Can't you just set all of the light sources to black? Unless you have luminous surfaces, that should work...and luminous surfaces (arguably) shouldn't cast shadows. You probably don't want to turn off texturing because something like a tree could be shaped by the alpha part of the texture. If you turn off textures, every tree will cast a neat, perfectly rectangular, shadow! ----------------------------- 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 |