Lights those doesn't affect to the ground
Blitz3D Forums/Blitz3D Programming/Lights those doesn't affect to the ground
| ||
Hi all, I need help with the next issue.. I have a .B3D model of a ground with some buildings. The ground has two texture, the first one is a colour texture and the second is the lightmap. The buildings hasn't textures at all. When I shoot with the pistol I create a light (type 2), and the light affects to all the objects without texture but doesn't affects to the ground. It's strange because I have also some animated .B3D soldiers with texture and they are affected with the light of the shoot... I have calculated the lightmap of the scenery model with Gile[s] and exported to .B3D... maybe is some flag or attribute that gile uses to give to the exported models or somehing like that... Some idea? What could I do in order to make all the ground could be affected by lights and not only the objects without texture? Thanks in advance! |
| ||
Working with dynamic and static lighting is always hard work. Lightmaps works by decreasing the bright of a model where there are shadows, so your model must have a full bright fx (EntityFX 1) applied so that the lightmap can work that way. By applying an <EntityFX model,0> to your model you can reset its bright FX to normal although your scene will look different ... actually, the problem is combining dynamic lighting with multitextured elements, your buildings and soldiers are ok because both have less than 2 textures applied (0 and 1). My suggestion is, if your scene is mostly dark then do it all with dynamic lighting (no lightmaps or multitexure), if it is mostly bright then apply some textures to the buildings and let the light to only affect the soldiers ... Paolo. |
| ||
Thank you very much, Really very thanks for your deep explanation. Some minutes ago, before enter the forum again looking for any post, I have found the problem, and really occurs that you like. However I've discovered (it's the first time I experience that), it seems that you cannot override the material settings of Gile[s] from Blitz, I am refering to change the flag "full bright", for example. If I change this from Gile (I'm refering turn Full bright Off), all goes well with dynamic lights, as you say, to obtain a good effect is hard, but the terrain even with the lightmap is affected by lights, but if I don't change "full bright" from gile[s], I cannot change after export from Blitz, it seems to ignore the entityfx... What a strange thing! ..thank you very much for your help!! |
| ||
it seems that you cannot override the material settings of Gile[s] from Blitz Yes, that also bother me ... internally the models keep the information from the exporter ... don't know why, may be some advanced users could tell us :) |
| ||
-Bump- Any one have solution this ? Please! |
| ||
Basically it hasn't solution in terms of the posibilities that Blitz brings to you. If you have a model (a terrain or something similar) and it is textured AND lightmapped, it will ignore all dinamic lights in the scene because it is supposed that entity has maximum bright (entitycolor 255,255,255) in order to show a coherent illumination with the lightmap. After a lot of research I obtained the conclusion of discard the dinamic ilumination for the landscape. Regarding the issue with Gile[s] flags if seems to be something normal. You cannot override some flags of the loaded .B3D... maybe a more advanced user than me can help you in someway or can recommed you some piece of code to research... regards! |
| ||
Regarding the Gile[s] flag, I had this same problem a long time ago with Quill3D and found a solution, I hope it works for you! ;) Here is the code to remove EntityFX from a mesh... For s=1 To CountSurfaces(mymesh) br=GetSurfaceBrush(GetSurface(mymesh,s)) BrushFX br,0 PaintSurface GetSurface(mymesh,s),br FreeBrush br Next from this thread... http://www.blitzbasic.com/Community/posts.php?topic=26120&hl=fullbright |
| ||
wow! :) thanks! Sure we will try it! |
| ||
YEAH! It XXXXXXX works!!!!!!!!! Thanks Shambler!! |