Dynamic Lights in .bsp map

A forum to store posts deemed exceptionally wise and useful

Dynamic Lights in .bsp map

Postby monsterguden » Wed Jan 30, 2008 11:00 am

Hi everyone!

I just want to make a simple tutorial over how to use dynamic lights in a .bsp map instead of the pre-rendered lightmaps that is included in bsp. I know this code aint pretty, but its the only way i managed to get it working correctly!

First of all, you need to set the ambient light in the editor so you got full light all over the map or add A LOT of lights to it ;) (No shadows at all!)

When you load the map, you need to set:
(mapnode is the ISceneNode that contains the level)
Code: Select all
mapNode->setMaterialFlag(EMF_LIGHTNING, true);
mapNode->SetMaterialType(EMT_LIGHTMAP_LIGHTING);


Then your up and running, nothing difficult at all but i took me 8 hours to get this working (searching at forums, trial&error and waiting for answers on diffrent threads). I hope this will save you from all that work!
monsterguden
 
Posts: 8
Joined: Tue Jan 29, 2008 12:19 pm

Postby hybrid » Wed Jan 30, 2008 12:12 pm

Well, what about the hints we gave about testing the material type and only replacing those which are really lightmaps? No you'll loose transparent parts, have lightmaps where you only had solid maps (also without the lightmap) etc.
hybrid
Admin
 
Posts: 13946
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany


Return to FAQs, Tutorials, Howtos, and external tool lists

Who is online

Users browsing this forum: No registered users and 1 guest