I need some help for a lighting effect.

Discuss about anything related to the Irrlicht Engine, or read announcements about any significant features or usage changes.
Post Reply
cmoibenlepro
Posts: 237
Joined: Thu May 27, 2004 3:18 pm
Location: Canada

I need some help for a lighting effect.

Post by cmoibenlepro »

Hello everybody. :P

I wanted to know if you know how to make this effect:

Image
This picture was taken from the dx model viewer. You can see that the model looks to be "lit" by some light (even if there are no light in the viewer...).
This give to the model a "real 3D objet" look.

In the other side, here is how it looks in irrlicht:
Image
(ugly!)

I don't want to use dynamic lighting, because:
-If the model is too far from the light, or if the light is in his back, the model will be black
-I don't want to lost a lot of time setting the lights
-I don't need dynamic shadows.
-It's slow. (the special FX example is very slow on my old computer)

I hope that you understand what I mean...
I tried to use shaders but I have some problems (In fact I don't understand them at all... :wink: )
I tried to use the shader that come with the shader example... It looks OK.
BUT when both the model and the camera don't move, the shader continue to rotate (try to remove the rotation animator in the shader example and you'll see...) so it looks very weird.
And I can't fix it because I don't understand ASM.

So any suggestions would be appreciated. :D
You can also talk about any lighting techniques if you want (it's the open discussion forum... ;) )
Last edited by cmoibenlepro on Sat Jan 15, 2005 5:13 pm, edited 1 time in total.
etcaptor
Posts: 871
Joined: Fri Apr 09, 2004 10:32 pm
Location: Valhalla
Contact:

Post by etcaptor »

I need to know the solution too.
Have similar problems with some meshes. Even if texture is changed runtime, object keep your unrealistic view.

For example I use max plugin to generate trees. After them reduce polygons to 2500-3000. An got this effect for textures in x format, or lose some parts of tree if export in 3ds format.

By me sometime mapping stop working. So, you can try to change your mapping for this model. In my case, only sphere map works for some models like this :?:
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

At first I thought you wanted to create a thunderbolt or something since you wrote lightning and I was already thinking of how they create lightining in the torque engine lol :wink:

it's lighting (without the middle N), and better said lightmapping. The interesting part is that I didn't know you could lightmap a model as well. I thought only levels could-should be lightmapped.

how do you lightmap a character? and how did you get to export the lightmap channel into an x file to load in mview?

interesting man, very interesting

btw. Nice model, is it yours?
genesys
Posts: 75
Joined: Tue Nov 02, 2004 6:49 pm
Contact:

Post by genesys »

this shading is the result of direct lighting... i'm a 3d artist so i've absolutely no idea how to set this up in irrlicht - but you would get this effect, when you attach a lightsource to the camera object
cmoibenlepro
Posts: 237
Joined: Thu May 27, 2004 3:18 pm
Location: Canada

Post by cmoibenlepro »

At first I thought you wanted to create a thunderbolt or something since you wrote lightning and I was already thinking of how they create lightining in the torque engine lol Wink

it's lighting (without the middle N)
D'oH! :lol:
corrected...
btw. Nice model, is it yours?
yes, I made it with Wings3D
better said lightmapping.
I'm not sure if it can be called lightmapping... The "shadow part" on the model seems to move if the camera move... Check DX mview, you'll see what I mean...
but you would get this effect, when you attach a lightsource to the camera object
maybe. I'll try that. thanks.
But what will happen with the models that are far from the camera? They won't be completly dark?
Is it possible to have an "ambient light" so models can't be completly black (and you can see them a bit) ? How? The manual is not very clear on that point... is it implemented?

You can see that I'm not very familiar with light effects...
puh
Posts: 356
Joined: Tue Aug 26, 2003 3:53 pm

Post by puh »

Did you try to set diffuse/ambient/emissive colors to black?
It seems to me that in DXViewer light source is always in the camera position, hence there is dinamic lighting used.
Post Reply