Bad shadows with dynamic light

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
TeTine
Posts: 17
Joined: Tue Nov 13, 2007 10:36 pm
Location: Nantes, France
Contact:

Bad shadows with dynamic light

Post by TeTine »

Hello!
I'm new to the irrlicht engine and I'm trying to make some test setup with some mesh I modeled with blender
I managed to import the model using .x files but when I try to use dynamic lights, the shadows look weird and I don't know why :/ (it seems that the light sometimes colors vertices and sometimes not?)
[img=http://img151.imageshack.us/img151/9414/testirrlichtbp6.th.jpg]
I think it might have something to do with the export because when I try to use the dwarf.x file, it works fine
If someone can answer me... I'll resume searching for the solution now
thanks in advance :)
TeTine
Posts: 17
Joined: Tue Nov 13, 2007 10:36 pm
Location: Nantes, France
Contact:

Post by TeTine »

Well, obviously i won't get answers so I'll post my own conclusions:
It seems that I made a mistake and thought that shadows should look different, but to obtain cool shadows, one can't use the simple shadows drawn on the mesh by dynamic lights, because they all look like this.
I didn't want to use the shadowscenenode but it is obviously the only way (even if it doesn't work when I try to paste it from the example).
Irrlicht noob =p
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

It looks from your picture that it could just be a limitation of per vertex lighting, which is what you're using.

In blender it probably does per pixel lighting which will look great. You can do this in irrlicht with shaders, so that might solve your problem.

The lights don't cast shadows, they just shade the object according to the light and direction of the vertex normals.
Image Image Image
TeTine
Posts: 17
Joined: Tue Nov 13, 2007 10:36 pm
Location: Nantes, France
Contact:

Post by TeTine »

Actually I tried to have my own model look like the dwarf in the demo specialFX (which does not use per pixel lighting i think), but it looked weird.
So I copy-pasted the material values from the dwarf to my model in the x file and obtain something similar (of course)
I think that there are lots of things about real time I don't know and that's why I didn't understand the results at first.

Anyway thanks for the help ^^
Irrlicht noob =p
omaremad
Competition winner
Posts: 1027
Joined: Fri Jul 15, 2005 11:30 pm
Location: Cairo,Egypt

Post by omaremad »

You require ambient lighting, (blender is per vertex lights with default non black ambient component).
"Irrlicht is obese"

If you want modern rendering techniques learn how to make them or go to the engine next door =p
TeTine
Posts: 17
Joined: Tue Nov 13, 2007 10:36 pm
Location: Nantes, France
Contact:

Post by TeTine »

yes I think one of the lines I changed in the x file is the ambient light specs
I just used a slightly different value to have ambient light but keep a little bit of vertex light shadows, I think it's a good compromise.
Irrlicht noob =p
Post Reply