-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for GLTF extension KHR_materials_emissive_strength #78621
Add support for GLTF extension KHR_materials_emissive_strength #78621
Conversation
This reads the multiplier for the emission strength from GLTF files. This is fairly universal and is required for blender's emission value to be imported. The value is a simple universal multiplier and is unitless. Sponsored by The Mirror.
Specification of this extension: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Link to the spec: https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_materials_emissive_strength
The code for this is very simple and in line with some of the other KHR material extensions also handled here.
(btw, pbr_spec_gloss_extensions
is incorrectly named, it's actually all extensions on the material).
Yeah I saw this it definitely would be good to refactor at some point, wanted to keep this super minimal for now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. For future reference, without this extension GLTF only supports setting emission texture and emission color (clamps to 0.0-1.0). This extension maps perfectly on to how we handle emission in the StandardMaterial3D
I was really surprised about this being super standard and just a very simple multiplier. A lucky find :) |
Thanks! |
This reads the multiplier for the emission strength from GLTF files.
This is fairly universal and is required for blender's emission multiplier to be imported.
The value is a simple universal multiplier and is unitless.
Sponsored by The Mirror.
Makes emission just work by default from GTLF, which is great!