sun light ?

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
nitroman

sun light ?

Post by nitroman »

I wanted to know how I can create a light node that looks like sun light.

I mean:
-it light all other nodes with the same angle
-it light always in the same "direction"
-it light equaly all the other nodes, even if they are far or near the light
-it have an infinite radius
-if many objects have shadows, all their shadows will be parallel.
-I would need only one light for my all my outdoor scene (so more speed)
-etc, etc...

I checked in the manual and it said that there is only point lights in Irrlicht.
So is it possible to make a light that look like the sun?
(maybe with NX?)
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

that's a tough one.

unless global ilumination gets implemented or spherical harmonic lighting(check links)
http://www.paulsprojects.net/opengl/sh/sh.html
http://www.yasrt.org/shlighting/

otherwise the only way I see it possible is creating a skybox shader in quake3 with the characteristics u need and iluminate your map with it. some good approximations to Global Illumination (GI) are achieved with Q3 and sky shaders.

otherwise u would need a lightmapepr with GI like Giles

cheers!
Image
jox
Bug Slayer
Posts: 726
Joined: Thu Apr 22, 2004 6:55 pm
Location: Germany

Post by jox »

Directional lights (and also spots) are implemented in IrrlichtNX! It has all the features that you listed. I'm not sure about the shadows though, maybe you can try and report.
vermeer
Posts: 2017
Joined: Wed Jan 21, 2004 3:22 pm
Contact:

Post by vermeer »

Jox, always glad to see posts from you. A little question from this artist...What is IrrlichtNX?...seen some posts about it...A branch of Irrlicht?
Finally making games again!
http://www.konekogames.com
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

@Vermeer: sorry to get in the middle of your conversations,lol! I've done it before, but I don't mean to be rude. Irrlicht NX is the CVS version of Irrlicht. Since many programmers wanted updates and patches on the engine, and the chance to downlaod a daily updated version of Irrlicht (and Niko had no plans to create a CVS repository) these guys created it. In other words, it's an enhanced version of Irrlicht with patches and mods created by community programmers. They say (Niko said) after Irr0.7 everything was going to be distributed via CVS. Let's see what will happen.

The last thing I read about NX was bump mapping and per pixel lighting working, as well as loading Doom3 maps and models without a problem with an improvement in the rendering pipeline of 50% compared to doom.......kidding! :D

There's a very detailed list of patches in their site as well as in their forums. It's Irrlicht's little brother community that's growing like hell.
You must know how to use a CVS client (windows-dos based). Download the latest version and give it a try.

BTW, CVS= concurrent versioning system. A way to keep track of versions in a program's development.

cheers!
Image
nitroman

Post by nitroman »

Ok thanks Jox, I will try it with IrrlichtNX! :D

afecelis: I can't use giles because I want a dynamic sunlight.
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

whoa! that's pretty ambitious! So far I haven't seen the first game engine to have one of those!!!

I've seen day-night cycles, but a sunlight that affects a whole level if it moves, hides or changes....nope.

good luck!!! :D
Image
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

wait, I was lying!!!

The torque Game engine has got a sunlight system that affects buildings and terrain!!!! But I haven't seen it working animated. Besides, when you change something in the ingame editor, light has to be recalculated to bake the new shadows on therrain and buildings according to the changes u made.

so it's a no-no again.
Image
Post Reply