Hi Brajesh,
Brajesh Lal wrote:
> Hi,
>
> I did the second way as you mentioned, i think for direction light
> beacon does not matter if we don't want to move the directional light.
> If i don't add directional light transform nodes in the root node but
> still i can see the geometry, How is it possible?.
Not sure what you're asking here. If you have a light source, even wihtout
transform node, it will light the geometry. The beacon is not strictly
necessary, just recommend for a uniform manipulation interface.
> Does directional light has special implementation technique?
Nope, straight through to OpenGL.
> Even i changed the direction vector of the lights to 1,0,1 instead of
> 0,1,1. The illumination effect does not change.
> Reducing the number of light to one. Then also illumination effect does
> not change? why it is so?
> I have made the "room" geometry in the Maya and exported in vrml format
> for using in OpenSG.
>
> See the codes which i wrote.
>
> // d1Light Atrributes
>
> beginEditCP(d1Light);
> d1Light->setDirection (Vec3f(0,1,1));
> //d1Light->setBeacon(d1LightTransformNode);
> endEditCP(d1Light);
>
> // d2Light Attributes
> beginEditCP(d2Light);
> d2Light->setDirection (Vec3f(0,1,1));
> //d1Light->setBeacon(d2LightTransformNode);
> endEditCP(d2Light);
>
> //d3Light Attributes
> beginEditCP(d3Light);
> d3Light->setDirection (Vec3f(0,1,1));
> //d1Light->setBeacon(d3LightTransformNode);
> endEditCP(d3Light);
>
> // Set core for d1LightTransformNode
> beginEditCP(d1LightTransformNode);
> d1LightTransformNode->setCore(d1LightTransformCore);
> endEditCP(d1LightTransformNode);
>
> // Set core for d2LightTransformNode
> beginEditCP(d2LightTransformNode);
> d2LightTransformNode->setCore(d2LightTransformCore);
> endEditCP(d2LightTransformNode);
>
> //Set core for d3LightTransformNode
> beginEditCP(d3LightTransformNode);
> d3LightTransformNode->setCore(d3LightTransformCore);
> endEditCP(d3LightTransformNode);
>
>
> // Main root node
> beginEditCP(root);
> root->setCore(g);// Setting core
> root->addChild(room);
> //root->addChild(d1LightTransformNode);
> //root->addChild(d2LightTransformNode);
> //root->addChild(d3LightTransformNode);
> endEditCP(root);
Where do you add the lights to the scene graph? If they're not in the graph
they
will not have an effect. Note that the SimpleSceneManager by default adds a
headlight, so even if your lights are not used you might still see something.
Yours
Dirk
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users