global lighting
global lighting
is there any function for global illumination. also known as ambient lighting, which is not dependant on the map mesh being loaded.
IE in a BSP file without change the overall map lighting, or including additional lights in the map, or for instance an OBJ file which doesn't have lighting information included..
I mentioned to CLeaves about a method of dropping markers/waypoints to denote object loactions, and descided to use that to drop lights around a non-BSP mesh in a fly-thru type mode..
but I would like to be able to see the map with light, without light and adjust the global lighting at various stages when dropping the lights..
IE in a BSP file without change the overall map lighting, or including additional lights in the map, or for instance an OBJ file which doesn't have lighting information included..
I mentioned to CLeaves about a method of dropping markers/waypoints to denote object loactions, and descided to use that to drop lights around a non-BSP mesh in a fly-thru type mode..
but I would like to be able to see the map with light, without light and adjust the global lighting at various stages when dropping the lights..
Maybe setAmbientLight() of IVideoDriver helps you: http://irrlicht.sourceforge.net/docu/cl ... r.html#a32
yay, finally tried to use the
setAmbientLight()
and what I got was not quite what I had expected. See screeen shots for details
this is default lighting
http://shadowrunonline.sourceforge.net/ ... ghting.jpg
lighting with settings of driver->setAmbientLight(video::SColor(0,0,0,255));
http://shadowrunonline.sourceforge.net/ ... hting2.jpg
and with driver->setAmbientLight(video::SColor(255,255,255,255));
http://shadowrunonline.sourceforge.net/ ... hting3.jpg
as you can I have noidea why the colour turned purple'ish in the second screen, but what is not happening is the map is not changing in illumination when I make the changes..
(you can also see my attempts at rain
)
setAmbientLight()
and what I got was not quite what I had expected. See screeen shots for details
this is default lighting
http://shadowrunonline.sourceforge.net/ ... ghting.jpg
lighting with settings of driver->setAmbientLight(video::SColor(0,0,0,255));
http://shadowrunonline.sourceforge.net/ ... hting2.jpg
and with driver->setAmbientLight(video::SColor(255,255,255,255));
http://shadowrunonline.sourceforge.net/ ... hting3.jpg
as you can I have noidea why the colour turned purple'ish in the second screen, but what is not happening is the map is not changing in illumination when I make the changes..
(you can also see my attempts at rain
Project Admin -
http://shadowrunonline.sourceforge.net
------------------------------------
There are 10 kinds of people, those that understand binary and those that don't.
http://shadowrunonline.sourceforge.net
------------------------------------
There are 10 kinds of people, those that understand binary and those that don't.
The rain looks cool, yes. 
The reason why your .bsp map is not influenced by light is because I did not want it to be. EMT_LIGHTMAP only uses a Texture and a Lightmap, ignoring the dynamic light. You could set the Material to EMT_SOLID. In this way the lightmap is ignored, but dynamic light influences the shading of the triangles. If you need something like EMT_LIGHTMAP_WITH_DYNAMIC_LIGHT (ok, maybe another name, this is to long), just say it.
The reason why your .bsp map is not influenced by light is because I did not want it to be. EMT_LIGHTMAP only uses a Texture and a Lightmap, ignoring the dynamic light. You could set the Material to EMT_SOLID. In this way the lightmap is ignored, but dynamic light influences the shading of the triangles. If you need something like EMT_LIGHTMAP_WITH_DYNAMIC_LIGHT (ok, maybe another name, this is to long), just say it.
errr.. IT
EMT_DYNAMIC_LIGHTMAP ??
EMT_DYNAMIC_LIGHTMAP ??
Project Admin -
http://shadowrunonline.sourceforge.net
------------------------------------
There are 10 kinds of people, those that understand binary and those that don't.
http://shadowrunonline.sourceforge.net
------------------------------------
There are 10 kinds of people, those that understand binary and those that don't.
After a bit more looking and playing around, with setMaterial...etc..
I can get the dynamic light to effect the BSP, by casting light onto it
results in an effect that I'm kind of after (it does have a few issues, like the light is not stopped by walls etc...(yet)... so if you can imagine this scene
in daytime, flag the dynamic lights to be turned off (I would like to have a great big omni light (sun) to cast day shadows. at twilight, change ambientLight (probably on a timer set from the server), and flag all dynamic light to be turned on.. simulating street lighting, etc.etc.etc....(that is the goal, of all this lightling business
)
I can get the dynamic light to effect the BSP, by casting light onto it
Code: Select all
....
zoneLevelNode->setMaterialType(video::EMT_SOLID);
zoneLevelNode->setMaterialFlag(video::EMF_LIGHTING, true);
....
in daytime, flag the dynamic lights to be turned off (I would like to have a great big omni light (sun) to cast day shadows. at twilight, change ambientLight (probably on a timer set from the server), and flag all dynamic light to be turned on.. simulating street lighting, etc.etc.etc....(that is the goal, of all this lightling business
Project Admin -
http://shadowrunonline.sourceforge.net
------------------------------------
There are 10 kinds of people, those that understand binary and those that don't.
http://shadowrunonline.sourceforge.net
------------------------------------
There are 10 kinds of people, those that understand binary and those that don't.
-
boredom
-
MG
-
HLE (Guest)
I have yet to use Irrlicht, I'm looking at all the open source engines and trying to decide which one. Irrlicht looks really good, and its demos actually work, unlike 90% of the other projects I've seen! However the lack of dynamic lighting on the bsp maps is a big weakness because it is such an important part of the atmosphere of a map. I'd suggest that it needs some lighting system like Quake3, where the lights in the map not only produce lightmaps but actually light the dynamic things as well, like seeing your gunbarrel go red when you run over lava or the side of the gun turn blue when you run past a light on the wall.
-
Robomaniac
- Posts: 602
- Joined: Sat Aug 23, 2003 2:03 am
- Location: Pottstown, PA
- Contact:
you can do it yourself:
put in the code of EMT_LIGHTMAP instead of
pID3DDevice->SetTextureStageState(0, D3DTSS_COLOROP, D3DTOP_DISABLE);
pID3DDevice->SetTextureStageState(0, D3DTSS_COLORARG1, D3DTA_TEXTURE);
this:
pID3DDevice->SetTextureStageState(0, D3DTSS_COLOROP, D3DTOP_MODULATE);
pID3DDevice->SetTextureStageState(0, D3DTSS_COLORARG1, D3DTA_TEXTURE);
pID3DDevice->SetTextureStageState(0, D3DTSS_COLORARG2, D3DTA_DIFFUSE);
i can send you a precompiled dll (for visual c++).
edit: oh sorry, i forgot-> this will only work for d3d...
put in the code of EMT_LIGHTMAP instead of
pID3DDevice->SetTextureStageState(0, D3DTSS_COLOROP, D3DTOP_DISABLE);
pID3DDevice->SetTextureStageState(0, D3DTSS_COLORARG1, D3DTA_TEXTURE);
this:
pID3DDevice->SetTextureStageState(0, D3DTSS_COLOROP, D3DTOP_MODULATE);
pID3DDevice->SetTextureStageState(0, D3DTSS_COLORARG1, D3DTA_TEXTURE);
pID3DDevice->SetTextureStageState(0, D3DTSS_COLORARG2, D3DTA_DIFFUSE);
i can send you a precompiled dll (for visual c++).
edit: oh sorry, i forgot-> this will only work for d3d...