Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BakedLightmap (CPU lightmapper) does not use vertex colors (fixed in master with GPU lightmapper) #47209

Open
Tracked by #56080
NHodgesVFX opened this issue Mar 21, 2021 · 3 comments

Comments

@NHodgesVFX
Copy link
Contributor

Godot version:

Godot 3.3 RC6

OS/device including version:

RTX 2080s GLES2 & 3 Windows 10 64bit

Issue description:

The lightmapper does not take into account vertex colors.

Capture

plane lightmap
Plane

Steps to reproduce:

  1. Create a basic scene that has vertex colors, with lightmap unwrapped meshes, turn on lightmap baking on the mesh and add a light in the scene)
  2. add a baked light map node and fit the extents to contain the scene
  3. press bake
  4. notice the vertex colors don't affect the lightmaps

Minimal reproduction project:

LightMapperVertexColor.zip

@JFonS
Copy link
Contributor

JFonS commented Mar 22, 2021

I will take a look at adding support for this, it should not be too complicated.

@Calinou
Copy link
Member

Calinou commented Mar 23, 2021

@JFonS By the way, if the lightmapper isn't able to "see" which nodes use custom shaders where vertex color is not used as albedo (e.g. splatmapping), there should be a property to toggle the use of vertex colors in the lightmapper. Otherwise, indirect lighting color will appear to change for no reason when using splatmapped surfaces.

@Calinou
Copy link
Member

Calinou commented Jan 7, 2022

This appears to be fixed in the GPU lightmapper as of commit 8f6cba3. Notice how diffuse reflections are subtly tinted to each sphere's color:

2022-01-08_00 13 30

Lightmap texture (converted from EXR to PNG):

test

Testing project for master: LightMapperVertexColor_master.zip

@Calinou Calinou changed the title Lightmapper does not use vertex colors BakedLightmap (CPU lightmapper) does not use vertex colors Jan 7, 2022
@Calinou Calinou modified the milestones: 3.5, 3.x Apr 8, 2022
@Calinou Calinou changed the title BakedLightmap (CPU lightmapper) does not use vertex colors BakedLightmap (CPU lightmapper) does not use vertex colors (fixed in master with GPU lightmapper) Apr 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants