Troubles with Light & Shadows in BSP

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
Andrushka

Troubles with Light & Shadows in BSP

Post by Andrushka »

Hellow!

I have BSP Level compiles with Q3map2.

After loading I add shadow to this node and set attribute EMF_LIGHTING = true. And some light nodes( ~ 10 ).
radius from 1 to 5.

Troubles:

1. some parts of this map haven't got shadows.
2. floor doesn't lighting it's black
3. and ALL map ( and holes in objects ) became some lighted veru little but.... ( exclude floor :) )

Where is my bug or it is Irllicht bug? ( I use irrlichtnx and irrlicht 0.7 official)

P.S. and exuse my english. :)
jikbar
Posts: 62
Joined: Wed Aug 25, 2004 4:48 pm
Location: Canada
Contact:

Post by jikbar »

irrlicht doesnt normally support support dynamic lights in BSPs

youd have to change the node's material type to EMF_LIGHTMAP_LIGHTING_M4 to ovveride its default setting of EMF_LIGHTMAP_M4 which doesnt calculate dynamic lighting

your floor isnt lit because dynamic lights calculate lighting on a per-vertex basis. your floor should only be lit when your light approches the corners (if its just a simple box) and it would look really ugly

also, 10 lights is one hell of a lot, it would really bog down your FPS. i think i read somewhere that only 8 lights at a time can be transformed in hardware
Andrushka
Posts: 9
Joined: Sun Nov 14, 2004 8:00 pm
Location: Russia, Lipetsk
Contact:

Post by Andrushka »

Damn. :)

I solve this problem partially.
If i use DirectX8 device in Irrlicht NX, shadows are normal and floor is lighted! ( not lighted very well but better)

WTF!!! :)

P.S.: and i don't use lightmaps, i compile BSP "Full bright".
maxraven
Posts: 1
Joined: Sun Jan 16, 2005 8:41 pm

Post by maxraven »

Would you please give me more information about these max. 8 lights ?
I'm working on a little city and therefore i need many street-lights - something like in the game RollerCoaster Tycoon 3.
I saw afecelis screenshots in his thread "Project's status report - and help!" (the lights on the floor, image4, i guess this are real lights?), and so i think it should be possible.

Now i have a simple test-program which creates 40 cubes - each with his own light in front (small radius, so only a part of this cube should be lightened by "his" light).

The 40 cubes and 40 lights are created in a loop, but only some (about 5) of the first lights are working, most of the others are ignored and therefore most cubes are black.

Any idea ?
Andrushka
Posts: 9
Joined: Sun Nov 14, 2004 8:00 pm
Location: Russia, Lipetsk
Contact:

Post by Andrushka »

Most of videocards support only 8 realtime lights. Other's are ignored
mm765
Posts: 172
Joined: Fri May 28, 2004 10:12 am

Post by mm765 »

instead of using "real" lights for your streetlights you should use emissive-color and a lightmap.
Myth
Posts: 81
Joined: Wed Apr 13, 2005 5:48 pm

Post by Myth »

And how about cars drivig around? With software rendering I heard, but eh.. how?
And how can I override EMF_LIGHTMAP_LIGHTING_M4?
JOIN MY (100mbs 2x 3GHZ CPU) IRRLICHT FORUMS
http://irrlicht.halo4you.com/forums/
For all your programming quesitons and irrlicht ones!.

My fan site: http://www.halo-center.com
Myth
Posts: 81
Joined: Wed Apr 13, 2005 5:48 pm

Post by Myth »

please tell me :wink:
I tried all material types but shadows wont be casted.
JOIN MY (100mbs 2x 3GHZ CPU) IRRLICHT FORUMS
http://irrlicht.halo4you.com/forums/
For all your programming quesitons and irrlicht ones!.

My fan site: http://www.halo-center.com
Post Reply