On Saturday, March 03, 2012 06:41 johannes-bru...@arcor.de [mailto:johannes-bru...@arcor.de] wrote: Subject: Re: [Opensg-users] ChunkMaterial rendering woes
> I finally got the time to compile your sample. > As it turns out you have to set the Lit property to true... Well, this is interesting and unexpected. I was all set to contradict you, but lucky for me I did some more testing before replying ... First, my intention is for the shapes to be self-illuminated, not relying on lights in the scene, and I realized that I had forgotten to turn off the headlight in the SimpleSceneManager. So I did that first: mgr->turnHeadlightOff(); I also changed the MaterialChunk to set either the Diffuse or the Emission, but not both, and to default the other colors. Here is the pattern I'm seeing: headlight off (no lights in the scene) Lit = false Diffuse = red, green blue Emission unspecified renders as red, red, red (unexpected) Diffuse unspecified Emission = red, green, blue renders as white, white, white (unexpected) Lit = true Diffuse = red, green blue Emission unspecified renders as black, black, black (expected) Diffuse unspecified Emission = red, green, blue renders as red, green, blue (expected) So, setting Lit to true does give the results I would expect. However, I didn't expect "Lit" to matter when there are no lights in the scene. I expected that with Lit=false, the shape would simply render with its own pure unattenuated material color. Using the VRML lighting model as a guide ( http://www.web3d.org/x3d/specifications/vrml/ISO-IEC-14772-VRML97/part1/concepts.html#4.14 ), lighting is "off" if there's no material, and "on" if there is a material, so interpreting the "Lit" field in the OpenSG material had me confused, apparently. Thanks for taking the time to set me straight. The behavior with Lit=false is still unexpected, but I guess I don't care. I have set Lit=false in other places, but I guess it has always been with vertex colors rather than material colors. Cheers. -- Ted ------------------------------------------------------------------------------ Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d _______________________________________________ Opensg-users mailing list Opensg-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensg-users