-
-
Notifications
You must be signed in to change notification settings - Fork 21.6k
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 a property to control emissive material energy in LightmapGI #82839
Comments
Sorry, I just realized that there are FBX models in the reproduction project. Let me know if I need to convert them to GLTF. |
Please convert them to glTF to make the issue easier to reproduce locally. Also, please test this with a box PrimitiveMesh in a MeshInstance that has a bright emissive material. |
So after some testing, I realize that the problem is not with the lightmaps themselves, but simply the inability to adjust external emission intensity independently of the texture self-lighting. In the above photo, the yellow emissive map looks great, but the lantern texture cannot be made to light its surroundings properly, because increasing the Energy Multiplier also ruins the color of the material. |
This is something I've noticed in my own projects. Physical accuracy doesn't always lend itself well to good-looking results. #82068 can likely help address this, although it currently only adds a parameter to multiply the energy of indirect bounces. Even without that PR, it shouldn't be too difficult to add an emission energy parameter in LightmapGI that multiplies the emission energy while baking lightmaps. #49968 could also address this, but it's a global multiplier that affects the appearance of the entire lightmap. |
Hmm, both of those proposals seem difficult to use to fine-tune a scene with multiple emissive materials. I know you can have multiple Lightmap GI nodes, but how would you go about making one emissive cast light on a floor with a different intensity to another emissive casting light on the same floor? |
There's currently no way to define per-material properties for the lightmapper (and only the lightmapper) to read. There is probably a way to figure this out, but it sounds complex for something that is quite situational. Remember that it should be able to work with custom shaders as well, not just built-in material shaders. As a workaround, display an emissive object before baking that you hide after baking lightmaps. This can also be used to fake area lights in general. You can also add a OmniLight3D near the emissive material with its bake mode set to Static. |
Can the StandardMaterial3D Resource file be modified to have an "Emission Indirect Multiplier" field which would store that data, and which the lightmapper can read from? Or is there a concern with backwards compatibility for Resources? |
This isn't an issue with backwards compatibility. The issue is that if we add this property to BaseMaterial3D (the base class of StandardMaterial3D and ORMMaterial3D), there would be no way for custom shaders to overwrite this value. We can add a new shader global that can be overwritten (like |
Godot version
4.1.2 stable mono
System information
Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 2070 SUPER (NVIDIA; 30.0.15.1123) - Intel(R) Core(TM) i7-9700K CPU @ 3.60GHz (8 Threads)
Issue description
Even with the Energy Multiplier in the StandardMaterial3D turned up to 100, well past the max for the slider, the light produced by the material is extremely weak. It also doesn't seem to be emitting from the correct location. I don't believe it's a problem of the textures, since the albedo and emission map are lined up properly in the material.
Steps to reproduce
Minimal reproduction project
Emissive+Lightmap Issue.zip
The text was updated successfully, but these errors were encountered: