Baked static lightmap

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By RpgGOD
:warning: Old Version Published before Godot 3 was released.

How do I apply static lightmap in Godot which I have baked in blender?

Thank you,
Bird

:bust_in_silhouette: Reply From: Toger5

You just use the baked textures…
If you just bake combined in blender than you use the resulting texture.
If you bake only a lightmap you get a black and white texture. Than you go into Gimp (or Photoshop) and add it as a new layer on top of your color map. Change "overlaytype "from normal to multiply. Than you have your new texture with static lighting.
Assign that texture to your mesh in Godot.

You also can create a graphshader which combines the two textures with a multiply node :

  • advantage: it is easy to change the darkness of your static light by just tweaking your lightmap from blender
  • disadvantage: you have two textures which do need more disk space.

Combining two texture is not an option since each texture is repeated many times. Using separate lightmap texture in uv2 is the only option for me. But absolutely don’t understand how to work with shadergraph.

RpgGOD | 2016-03-26 02:00

enter image description here

I didn’t test it bu a graphShader as the one bolow should be fine.

Explanation:
You have two textures wich are used as the input. one is your repeated texture and the other one your baked AO/shadow map. both of them get positioned via a different UV map from the input node on the left. Than you use the Vector Operation Node to multiply every pixel of the two textures.
If the AO map is grey an your current texture red (AO:(0.5,0.5,0.5) Color:(1,0,0)) The resulted color at that position woul be: (0.5 * 1, 0.5 * 0, 0.5 * 0) = (0.5,0,0)
The resulted color than will be dark red…

Toger5 | 2016-03-27 19:20

And how do I add normal and specular map.

RpgGOD | 2016-03-28 13:07