Skip to content

Fix #1091: Prevent legacy Principled BSDF from rendering as mesh lights - #1093

Open
zorianpl wants to merge 1 commit into
LuxCoreRender:mainfrom
zorianpl:fix/issue-1091-emission
Open

Fix #1091: Prevent legacy Principled BSDF from rendering as mesh lights#1093
zorianpl wants to merge 1 commit into
LuxCoreRender:mainfrom
zorianpl:fix/issue-1091-emission

Conversation

@zorianpl

Copy link
Copy Markdown

Legacy Principled BSDF materials from older Blender versions were incorrectly exported with emission=1, causing them to render as mesh lights instead of regular materials.

Root cause:

  • Unconditionally read "Emission Strength" socket (default value 1.0)
  • No check if emission was actually used/linked
  • Blender 3.6 uses "Emission", Blender 4.0+ uses "Emission Color"

Solution:

  • Detect socket name (Emission vs Emission Color) for version compatibility
  • Check if emission color/strength is linked OR has non-zero values
  • Only export emission property when genuinely needed
  • Combine color * strength using scale texture

Impact:

  • Linked assets from older Blender versions now render correctly
  • No false mesh light conversions
  • Backward compatible with all Blender versions

Fixes #1091

… as mesh lights

Legacy Principled BSDF materials from older Blender versions were
incorrectly exported with emission=1, causing them to render as
mesh lights instead of regular materials.

Root cause:
- Unconditionally read "Emission Strength" socket (default value 1.0)
- No check if emission was actually used/linked
- Blender 3.6 uses "Emission", Blender 4.0+ uses "Emission Color"

Solution:
- Detect socket name (Emission vs Emission Color) for version compatibility
- Check if emission color/strength is linked OR has non-zero values
- Only export emission property when genuinely needed
- Combine color * strength using scale texture

Impact:
- Linked assets from older Blender versions now render correctly
- No false mesh light conversions
- Backward compatible with all Blender versions

Fixes LuxCoreRender#1091

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug Report] Legacy Principled BSDF linked libraries incorrectly export with emission=1

1 participant