Light functions

Blitz3D Forums/Blitz3D Beginners Area/Light functions

Kirkkaf13(Posted 2010) [#1]
Does anyone here use the built in light functions within blitz for there games?

OneHitWonder


Stevie G(Posted 2010) [#2]
Yes, most folk will. Do you have a more specific question?


Kirkkaf13(Posted 2010) [#3]
Yeah, I was just wondering if there was a simpler way of creating light effects around your levels in games like some sort of tool when creating levels.

OneHitWonder.


Ross C(Posted 2010) [#4]
You can use a lightmapper. What this application will do, is create a huge texture and apply it across the entire mesh/level (optimised, it will probably only texture the parts that are affected by the lights).

The advantages to this kind of lighting is, the lights will cast shadows, and create some pretty good looking effects. Plus, you usually aren't limited to a certain number of lights (though the rendering process will be longer)

The disadvantages to this is, the lights and shadows are static, since it is just a texture effect. And if you use dynamic lights along side lightmaps, you will no doubt run into problems, as lightmapped meshes, are usually set to full bright, meaning they are not affected by dynamic hardware lights.

You should check out Gile[s]. Version 1.34 is free and it's an awesome tool!


Kirkkaf13(Posted 2010) [#5]
Thanks for this information Ross. I will be looking into that.

OneHitWonder


Drak(Posted 2010) [#6]
Keep in mind you CAN create negative light. A lightcolor set to -255,-255,-255 will cast black light instead of visible light. This can be useful in certain situations to "fake" where light is not hitting.


chi(Posted 2010) [#7]
you can also double the light intensity with lightcolor(light,512,512,512) which is equivalent to modulate 2x...


Kirkkaf13(Posted 2010) [#8]
What do most people do in there games to they tend to use a light mapper or place there lights throughout there levels my coding it?

Sorry for the noobish question.

OneHitWonder


puki(Posted 2010) [#9]
You can also go 'under the hood' and use LightMesh.

LightMesh is godlike in it's power and brings in all sorts of new methods of lighting, including volumetric lighting/shaped-lighting - so, for example, hardware lights will cast light in a sphere (point light), directionally or in a cone (spot) - with LightMesh you can cast light that is square or a cube or neon light such as a neon sign, or in the shape of a rabbit (or whatever you like - you can cast light that will light your name on a wall for example). As you are in complete control of this method of lighting, you can change it's shape on-the-fly or 'cut' holes in it, animate it, make it write text in light and animate the text, etc.


Gabriel(Posted 2010) [#10]
What do most people do in there games to they tend to use a light mapper or place there lights throughout there levels my coding it?

That depends on what their requirements are. What most people do isn't a question which should concern you. You should be concerned about the best way to achieve your requirements.