Skip to content

Commit

Permalink
Add NormalMap info to 'VLM.BakeInfo' node
Browse files Browse the repository at this point in the history
  • Loading branch information
vbousquet committed Mar 20, 2024
1 parent 3c96971 commit e9522c6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Binary file modified addons/vpx_lightmapper/assets/VPXMeshes.blend
Binary file not shown.
2 changes: 2 additions & 0 deletions addons/vpx_lightmapper/vlm_render_baker.py
Original file line number Diff line number Diff line change
Expand Up @@ -737,6 +737,7 @@ def sortkey(x):
remaining_render = n_total_render - (n_skipped+n_render_performed+n_existing)
msg = f'{msg}, remaining: {vlm_utils.format_time(remaining_render * elapsed_per_render)} for {remaining_render} renders'
logger.info(msg)
if bake_info_group and 'IsNormalMap' in bake_info_group.nodes: bake_info_group.nodes['IsNormalMap'].outputs["Value"].default_value = 1.0
scene.render.filepath = render_path
scene.render.image_settings.file_format = 'OPEN_EXR'
scene.render.image_settings.color_mode = 'RGB'
Expand All @@ -748,6 +749,7 @@ def sortkey(x):
bake_img.save_render(bpy.path.abspath(render_path), scene=scene)
logger.info('\n')
n_render_performed += 1
if bake_info_group and 'IsNormalMap' in bake_info_group.nodes: bake_info_group.nodes['IsNormalMap'].outputs["Value"].default_value = 0.0
else:
logger.info(f'{msg} - Skipped since it is already rendered and cached')
n_existing += 1
Expand Down

0 comments on commit e9522c6

Please sign in to comment.