Simple lightning question with nodes

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
markrenton
Posts: 4
Joined: Thu Jun 07, 2007 8:15 pm

Simple lightning question with nodes

Post by markrenton »

Hello all, this is my first message here. Excuse me, 'cause I'm a real amateur on 3d.

I want to make a simple application. A ball in a room. But I want to add light to the scene. In irrlicht examples, they always use meshes (which is imported from a 3ds max file etc.)
I want to make a room using "addCubeSceneNode()". And create the ball with "addSphereNode()". Is it possible to add lightning and shading to this scene?
Or if I had to use a mesh file, how can I create an empty room mesh and where? - please don't say 3ds max :)

Thanks all.
LLDD
Posts: 43
Joined: Fri May 11, 2007 9:50 am

Post by LLDD »

Look at the example number 11. It's a room with an sphere a moving light and some other things.
________
Oregon Medical Marijuana
Last edited by LLDD on Sun Feb 20, 2011 7:48 am, edited 1 time in total.
markrenton
Posts: 4
Joined: Thu Jun 07, 2007 8:15 pm

Post by markrenton »

LLDD wrote:Look at the example number 11. It's a room with an sphere a moving light and some other things.
Yeah I was looking to that example, but room "mesh" is imported from a file there.
I want to create a room with nodes and add lightning, shading to it. Or to learn how to create my own mesh (a basic empty room)
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Better look at example 15 because is uses the sphere scene node :wink: The other one's a mesh. But you can add lighting with both. You'll have a problem with the box, though, because you'd use it from the inside. You have to invert it (scale by (-1,-1,-1)), possible also renormalize the normals to get proper lighting. And you should notice that the box scene node does not yet offer tesselation, so lighting will be ugly.
markrenton
Posts: 4
Joined: Thu Jun 07, 2007 8:15 pm

Post by markrenton »

I point out the -1,-1,-1 thing before :)

I will try inverting the normals and such.

Thank you
Post Reply