Skip to content
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

Make emissive clamping optional or remove? #1643

Closed
blitz-research opened this issue May 4, 2022 · 4 comments
Closed

Make emissive clamping optional or remove? #1643

blitz-research opened this issue May 4, 2022 · 4 comments
Labels
enhancement New feature or request
Milestone

Comments

@blitz-research
Copy link

Hi,

My custom 3D engine supports emissive material values > 1.0 for hdr 'glow' effects.

I can create a blender material that theoertically achieves this by setting emission strength > 1, however the gltf2 exporter clamps the output emissive factor components to 1.

Would it be possible to make this clamping optional or even remove it? I have tested this myself by removing the following line (144) from gltf2_blender_gather_materials.py, and it seems to work fine:

    factor = [min(1.0, f) for f in factor]

I guess another approach would be to add an 'emissive strength' property to the gltf2 format, but the spec for that doesn't mention any limits for emissive color so maybe this is the way it's supposed to be done?

Bye,
Mark

@scurest
Copy link
Contributor

scurest commented May 4, 2022

The spec limits emissiveFactor to the 0-1 range

Each element in the array MUST be greater than or equal to 0 and less than or equal to 1. [5.19.8 material.emissiveFactor]

But there's a KHR_materials_emissive_strength.

@blitz-research
Copy link
Author

blitz-research commented May 4, 2022

Ok, after years of chin-stroking, looks like glTF2 people are about to add a KHR_materials_emissive_strength extension, guess this is the 'right' way to do it so I'll just stick with my hack for now but it'd be nice to see support for this added eventually.

@julienduroure
Copy link
Collaborator

I confirm that KHR_materials_emissive_strength will be supported soon.

@julienduroure julienduroure added the enhancement New feature or request label May 4, 2022
@julienduroure
Copy link
Collaborator

Will be fixed by #1646

@julienduroure julienduroure added this to the Blender 3.3 milestone Jun 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants