Lightmap


Tweet lighting lightmapping shadows
(Posted 6 months ago) PayDark

Hi, I'm new here and my question is whether blitz3d can make a dynamic object react to lights or a light if it is in a scene where light is a light map, I would also like to ask if it is possible in that same scene that the Specular textures react to that light if there is a light map.

I hope and you have explained me well ...

(Posted 6 months ago) RonTek commented:

my question is whether blitz3d can make a dynamic object react to lights or a light if it is in a scene where light is a light map

Hey PayDark, yes it is possible but it will depend on your scene. You can try vertex lighting as one option.

This dynamic shadow technique code I find really effective and still impressive as today: https://www.blitzcoder.org/forum/topic.php?id=544

It might be useful or related to finding your solution with lightmaps and dynamic lighting.

I would also like to ask if it is possible in that same scene that the Specular textures react to that light if there is a light map.

Lightmap is just an overlay texture to your diffuse texture with a modulated effect. With my past tests related to this technique, I can say it may not be that visually accurate but it should be passable.

As a general rule, what can be achieved in mobile game development is possible with Blitz3D without shaders.

Do you already have a specular technique working or are you using a library to handle that like AShadows or FastLibs.

(Posted 6 months ago) PayDark commented:

Thanks for your answer Rontek, I will check the light by vertex, my scene is an interior and I would also like to see how I can do to optimize an (interior) scene with several lights for when you do not see something like a part of the map of a corner that part not seen until you get closer to something, and apart blitz supports culling occlusion.

(Posted 6 months ago) RonTek commented:

Great. I think it will be more effective if your map has a decent or defined faces/vertices so lighting a small or specific area will be more detailed.

I actually remember a project solution that will exactly solve your problem. It uses old but tried and tested tools, a bit complex if you are unfamiliar, but I think it will be a fun challenge and a guarantee!

I will post it as resource or code archive soon.. be right back.

(Posted 5 months ago) RonTek commented:

Here's what I am talking about, it's Krischan's NetRadiant BSP Loader with a demo.

https://www.blitzcoder.org/forum/topic.php?id=631

Basically it's a quake3 loader which of course supports lightmaps and at the same time has a dynamic lighting or day/night cycle.

It's one of the most awesome stuff that I have seen with Blitz3D

(Posted 3 months ago) Sam commented:

If you have exported your mesh from a lightmapper, it will most likely be full bright.
so you will have to reset the fx of the entity and apply all the ones you want

if its called mesh for example

EntityFX mesh,0 ( removes all fx on the mesh)
EntityFX mesh, 2+4 ( Vertex colors and flat shading)

If you make sure your lights are the same place in blitz3d as they were in the lightmapper it works pretty well.
I find that you don't need to use colored lights in the mapper and can just let the blitz direct x lights do the colors of the verts.

Image

hope that helps

Sam

Reply To Topic (minimum 10 characters)

Please log in to reply