Comments (8)
The issue is that, as I understand it, the default exposure is tuned to match blender. So one would expect a gltf exported from blender to have visually similar emission. That's not the case.
from bevy.
I encountered this issue too while exporting a GLTF from Blender.
What might be happening is that during the conversion process the value is somehow super scaled down.
-
Blender: 5.0 Emission strength
- Should be quite emissive, it shines brightly in Blender and other GLTF viewers, in Bevy you cannot see any glow. -
Blender: 200_000.0 Emission strength
- The emission radius is several times the size of the object in Blender and other GLTF viewers are broken, in Bevy you can finally see a bit of glow.
from bevy.
No exact causes, but here's some info: Gltf emission map is in candela per square meter. Emission strength is a unit-less quantity which scales the emission map (so that the final output also has units of candela per square meter). This issue means we probably are messing up the units somewhere.
from bevy.
I just bisected between v0.12 and v0.13 to find the responsible commit: fcd7c0f and associated PR: #11347
(Despite what I said, it finally may be related to exposure...)
from bevy.
bevy/crates/bevy_pbr/src/render/pbr_functions.wgsl
Lines 453 to 457 in dae9e54
Here we can see that the emissive_light gets multiplied by the exposure.
I tested after having moved out this variable from the parenthesis and boom, bloom worked again!
Still I'm not sure about this solution, as I don't master the exposure semantics.
As a side note, I 'd like to mention that as of #11347 examples for 2d and 3d bloom are not homogeneous when defining color values: not the same function, nor the same value ranges at all:
Lines 38 to 47 in dae9e54
Lines 43 to 46 in dae9e54
from bevy.
No exact causes, but here's some info: Gltf emission map is in candela per square meter. Emission strength is a unit-less quantity which scales the emission map (so that the final output also has units of candela per square meter). This issue means we probably are messing up the units somewhere.
Does that mean the tested value corresponds to 5 cd/m^2? Since that's is pretty low considering an LCD computer monitor is 200-300 cd/m^2 and Bevy's default exposure corresponds to a very bright indoor space / a heavily overcast outdoor scene. In those conditions, there's no way something 40x dimmer is going look like it is glowing...
from bevy.
The default exposure is tuned so that point lights and directional lights match Blender. Everyone assumes that Blender got the math right, but I'm personally not very convinced.
One possible explanation is that blender is multiplying the values of lights by 683 before exporting, but is leaving the emissive materials with their original scale. Thus when imported into Bevy emissives are 683x dimmer than they appear in Blender.
from bevy.
The default exposure is tuned so that point lights and directional lights match Blender. Everyone assumes that Blender got the math right, but I'm personally not very convinced.
One possible explanation is that blender is multiplying the values of lights by 683 before exporting, but is leaving the emissive materials with their original scale. Thus when imported into Bevy emissives are 683x dimmer than they appear in Blender.
This simple multiplication doesn't really match my observed values, either the problem is more complex, or a different number is used :P
Blender: 5.0 Emission strength - Should be quite emissive, it shines brightly in Blender and other GLTF viewers, in Bevy you cannot see any glow.
Blender: 200_000.0 Emission strength - The emission radius is several times the size of the object in Blender and other GLTF viewers are broken, in Bevy you can finally see a bit of glow.
from bevy.
Related Issues (20)
- Hot asset reloading example does not update when saving torus.gltf HOT 5
- Collecting into a vec leads to better performance for `iter_combinations_mut` HOT 1
- Gizmos circle_2d does not appear for the first few times it is requested after bevy startup HOT 1
- links in bevy/crates/bevy_ecs/README.md does not exist. HOT 1
- Track callsites of where observers are initially triggered. HOT 1
- `CombinatorSystem` is unsound HOT 2
- UI elements randomly disappear for some frames on specific android devices HOT 6
- Bevy needs better support for pre-multiplied alpha textures and sprites HOT 2
- Allow gizmos to render behind sprites
- UI rounding is applied before UI scaling HOT 5
- Footgun when chaining observer registrations on World vs App
- `embedded_asset!` does not work in multi-crate workspace + release build HOT 1
- viewport-to-world doesn't work well HOT 1
- Check benchmarks in CI HOT 1
- Consider what to do with wgpu_trace feature HOT 6
- Docs for Observer should mention what happens if you use a bundle in the `Trigger` HOT 1
- Add type registration for a11y::Focus
- AlphaToCoverage can't be used with base_color_texture
- `bevy` fails to build with just `bevy_dev_tools` feature HOT 2
- Adding proc_macro `#[required(TransformComponent, ...)]` for Component. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bevy.