+3 votes

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

Thank you,
Bird

in Engine by (46 points)
edited by

1 Answer

+2 votes

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.
by (333 points)

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.

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...

And how do I add normal and specular map.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.