franMarz / TexTools-Blender

TexTools is a UV and Texture toolset created several years ago for Blender and Max by @renderhjs. In this open repository, originally created by @SavMartin, we develop the current version of this popular Blender add-on.
Other
2.05k stars 139 forks source link

Cage objects affect AO baking in single texture mode #228

Closed sdml closed 1 month ago

sdml commented 2 months ago

Because cage object rendering is disabled or enabled for each bake set individually, the cage object from one set may be visible in the ambient occlusion (AO) of another object when baking to a single texture. I fixed this issue on my end by moving the hide_render=True for cage objects before the main baking loop and setting hide_render=False in the "finally" block. However, I'm not sure if this solution works for all cases, and I'm not familiar enough with the addon to submit a pull request.

franMarz commented 2 months ago

The solution you described is the correct one for the issue you found, please open a pull request, I'll fix it further if needed. Thank you.