nice lighting

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
catron
Posts: 158
Joined: Mon Feb 19, 2007 1:54 am

nice lighting

Post by catron »

I've seen some impressive lighting in the demos.
I try to put this in mine and change it to work with my code and it compiles, but it is like nothing happened.

So, my question is how would i create advanced/plain lighting effects using opengl and dev cpp.
we have plans to run this on a ps3.

BTW i'm not a noob programmer, just a newb irrlicht user.

sorry, and thanks.

Catron
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Then show us some of your non-nnob code examples. Otherwise the answers will be "check the tutorials" or "You get light effects by adding lights and effects". How shall we know about what you want and what you did?
nullterm
Posts: 14
Joined: Tue Feb 27, 2007 12:36 pm

Post by nullterm »

Make sure you enable the stencil buffer.

Code: Select all

    IrrlichtDevice *device = createDevice(video::EDT_DIRECT3D9,
            core::dimension2d<s32>(640,480), 16, false, true);
I just had that one catch me. Then,

Code: Select all

			node->addShadowVolumeSceneNode();	
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Stencil buffers are only necessary for shadows, usual lighting effects run without (even faster).
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

Did you set the node lightning to false ???
If so, set it to true:

Code: Select all

node->setMaterialFlag(EMF_LIGHTING, true);
otherwise the nodes don't act on lights... ;)
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

:lol: If you set it to false remove the statement, lighting is enabled by default.
Post Reply