Light and Shadow

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
The Crusher
Posts: 7
Joined: Tue Sep 16, 2003 8:11 pm

Light and Shadow

Post by The Crusher »

How i can make 2 shadow from one mesh with 2 lights????
Or can i make that i switch first light off an the second on and then follow the shadow the second light, not the first???
niko
Site Admin
Posts: 1759
Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria
Contact:

Post by niko »

Didn't you read my answer in the other forum?
http://irrlicht.sourceforge.net/phpBB2/ ... .php?t=155
myself wrote:Do it just like you'd do it with on light, but create two lights instead of one.
To make it a little bit clearer: For example in the SpecialFX example, just add another light. You could do this with this code, add it afer you created the first light:

Code: Select all

node = smgr->addLightSceneNode(0, core::vector3df(0,0,0), 
    video::SColorf(1.0f, 0.6f, 0.7f, 1.0f), 600.0f);
anim = smgr->createFlyCircleAnimator (core::vector3df(0,100,0),
    200.0f,-0.001f);
node->addAnimator(anim);
anim->drop();
And here is the result: 2 Shadows instead of one:

Image
The Crusher
Posts: 7
Joined: Tue Sep 16, 2003 8:11 pm

Post by The Crusher »

Oh sorry i have not look at this i've forgoten that i have this wrote :oops:
But thanks for the answer :D
Post Reply