-
-
Notifications
You must be signed in to change notification settings - Fork 97
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
Add debug draw modes to display UV1 and UV2 (lightmap) texel density in the 3D editor #3213
Comments
If you want to debug both the general texture density and lightmap texture density, we'd need to add two different debug draw modes (one for UV1, one for UV2). Adding a debug draw mode for texel density is a good idea, I'm not sure how often lightmap density debugging would be used in practice. The texel density debug draw mode will be fairly involved to implement because you can't just override all existing materials. You need to account for the existing UV1 scale and triplanar mapping that may be used on materials. To display the checkerboard in different colors depending on the pixel-to-texel ratio, we can use shader operations or custom mipmaps. To avoid adding two debug draw modes, we could add an option to bake a fixed-size checkerboard in BakedLightmap for debugging purposes, but this would require rebaking lightmaps when you toggle this option. In the meantime, you can add this checkerboard using an image editor and save the resulting EXR or PNG image. Godot will reimport it automatically once you focus back on the editor. |
@Calinou the second idea is to bake an checkerboard image? If its fast enought could do the trick |
Can this be extended to texturing as well? |
What do you mean to texturing? |
Is that for UV2 (i.e. lightmap only) or for UV1 too? |
See godotengine/godot#52166 which will likely be rejected in its current form. It seems that not having to rebake anything is a requirement. |
@williamd67 If it requires bake is not acceptable. The idea is to debug the density before baking to have the correct density per object and save baking time. Have you tried it as a new debug view like the lighting one? |
All textures get swapped to a checker board so it's easier to control texel density. |
@Janders1800 Thats the idea, but instead of the textures being swapped, it should be a draw mode over the mesh with shaders so you can adjust the texel density in real time. Also it would be nice to have float value texel multiplier |
Describe the project you are working on
3D environmnets
Describe the problem or limitation you are having in your project
There is no easy way to preview how much space a object takes into the lightmap
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Add a new view mode to see the texel resolution per object. Similar the lighting mode works. This could allow to update the texel scale in real time to improve the baking light
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
If this enhancement will not be used often, can it be worked around with a few lines of script?
Nope
Is there a reason why this should be core and not an add-on in the asset library?
Could be a plugin, not sure. Core makes more sense
The text was updated successfully, but these errors were encountered: