Hi,
I am trying real time Image based lighting concept in OpenSG. I have
corresponding approximated number of directional lights generated from the HDR
Image using HDRShop. I have all lights position and direction info. I want to
illuminate the model with these directional lights.
I want to lit a geometry ( say "room") by 3 lights. This geometry is having big
glass through which lights should come from outside
What i did is
1. Made a root for scene ( say " root")
2. Added empty group node ( say "g") as a core of root node and a directional
light (d3) as a child of root node
4. d3 is having a its transform core and a direction light (d2) as child.
5. d2 is having a its transform core and a directional light (d1) as child
6. d1 is having a its transform core and a room as child
All directional light are placed at 0,0,0 and direction is 0,1,1. These lights
represent Default light (Headlight) is set to false.
I am not able to see the change in the illumination if i add or delete more
lights. What wrong i am doing
Here is the code
// Setting first Light
beginEditCP(d1LightTransformNode);
d1LightTransformNode->setCore(d1LightTransform);
d1LightTransformNode->addChild(room);
endEditCP(d1LightTransformNode);
// Setting core and child of the second light of the
beginEditCP(d2LightTransformNode);
d2LightTransformNode->setCore(d2LightTransform);
d2LightTransformNode->addChild(d1LightTransformNode);
endEditCP(d2LightTransformNode);
// Setting thrid light
beginEditCP(d3LightTransformNode);
d3LightTransformNode->setCore(d3LightTransform);
d3LightTransformNode->addChild(d2LightTransformNode);
endEditCP(d3LightTransformNode);
// Main root node
beginEditCP(root);
root->setCore(g);// Setting core
root->addChild(d3LightTransformNode);// adding group of lights
endEditCP(root);
Best Regards
Brajesh Lal
____________________________________________________________________________________
Be a PS3 game guru.
Get your game face on with the latest PS3 news and previews at Yahoo! Games.
http://videogames.yahoo.com/platform?platform=120121-------------------------------------------------------------------------
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