Is there a way to enable lighting only for one node without managing the rendering queue?
Like when I want only character being lighted but not the room?
Lighting only for one node?
Re: Lighting only for one node?
You can enable/disable lighting per material. Each node usually has by default it's own materials so you can set those flags for each node.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Re: Lighting only for one node?
Oh, silly me, should've said it clearer >__>CuteAlien wrote:You can enable/disable lighting per material. Each node usually has by default it's own materials so you can set those flags for each node.
I need to apply lighting from one light to only one node. Like there is a light that only lightens the character but not the room.
Sorry for the inconvenience.
Re: Lighting only for one node?
check out the light manager example code(tutorial 20 i think), it shows you how to use seperate lighting managers to control which nodes are affected by what lights.
that should do the trick
that should do the trick
Re: Lighting only for one node?
Totally forgot about that example...prodcake wrote:check out the light manager example code(tutorial 20 i think), it shows you how to use seperate lighting managers to control which nodes are affected by what lights.
that should do the trick
Thanks, will take a look at it.
-
- Posts: 9
- Joined: Tue Nov 12, 2013 3:24 pm
Re: Lighting only for one node?
If I were not mistaken, let the room node have the material not to be lightened, like this:
Code: Select all
pRoomNode->setMaterialFlag( EMF_LIGHTING, false );
Re: Lighting only for one node?
Nono, the point was in making some nodes be affected by one light and other nodes by another light.jiangcaiyang wrote:If I were not mistaken, let the room node have the material not to be lightened, like this:Code: Select all
pRoomNode->setMaterialFlag( EMF_LIGHTING, false );