vini-guerrero / godot_game_tools

This is a blender add-on that contains tools to ease the creation/import process of assets into Godot Game Engine
GNU General Public License v2.0
364 stars 34 forks source link

Only Diffuse (without lighting) gets baked now #44

Closed zutils closed 3 years ago

zutils commented 3 years ago

I changed baking to this:

filter = {'COLOR'}
bpy.ops.object.bake(type='DIFFUSE', save_mode='EXTERNAL', width=textureSize, height=textureSize, filepath=fileName, pass_filter=filter)

Although it no longer bakes normals, roughness, or shininess, baking these into an artificial texture as if it were color is not what a developer would want anyway. In the future, separate baking should be done for each of these so that when imported into Godot, lighting is accurate. As a feature, it may be wise to re-add an >optional< feature via a checkbox if the user wants to bake lightmaps into the color.