Hi Polycount,
In my last project I developed a new tool that
drastically enhances the quality of baked textures (less pixilation and blurriness) without increasing the texture size and sacrifice your game memory.
The tool is based on an AI algorithm that captures many factors from the 3D scene/object in order to generate best baked results. If you are interested in learning more about the technical background, please refer to this
blogpost.
I recorded a few cases with very low-res textures to show the differences easier:
Baking Lightmap with Global Illumination for Sponza- Baked Texture Size: 1024x1024
- Number of Triangles: 110,324 triangles
- Processing Time: ~4 hrs
Video on YouTubeBaking Lightmap with Final Gathering for a City Proxy- Baked Texture Size: 512x512
- Number of Triangles: 11,406 triangles
- Processing Time: ~10 mins
Video on YouTubeBaking Ambient Occlusion from Hi-Res to Low-Res Model- Baked Texture Size: 512x512
- Hi-Res Number of Triangles: 77,280 triangles
- Low-Res Number of Triangles: 10
- Processing Time: ~20 secs
Video on YouTubeI'm planning to make this tool available for public so I would appreciate hearing from you where you like it to be available?
Maya, Max, xNormal, Unreal or Unity.
And what would be your main use for such tool?
- Baking Hi-res to low-res maps (e.g. Normal Maps, AO Maps, … etc)
- Baking lightmaps (Global Illumination, Ambient Occlusion, … etc)
Thanks,
Homam
Replies
So does it basically look for areas with highest rates of change, and allocate more pixels to those, with less for areas of less change?
What other heuristics does it use? Maybe overlap UVs for instances with similar lighting?
Personally I'd like to see this in Unity and Unreal.
I think you could also do iteratiins of that algorithm:
Render large lightmap (way larger than desired result)
Calculate the contrast (sobel for example)
Sum the pixels of the uvislands and
Tesselate the ones with with higher values
Repeat last 2 steps for the newly created trangles
Scale according to contrast
Repack uvs
Render desired resolution lightmap from large and the 2 different uvs
Done
... Thinking again rotation of trangles is also important, fibding lines in the imafe and rotate the trangles so the lines are straight would cause better lines too
Currently the algorithm doesn't overlap UVs, but it is definitely an interesting idea to consider
and thanks for proposing another solution