model-viewer
model-viewer copied to clipboard
Add bloom post-processing effect
Depends on #213
Hello, I've seen this has been opened for a while. May I help with something?
@jcguarinpenaranda Absolutely! Contributions are very welcome, and this should be reasonably doable given that three.js already supports it: https://threejs.org/examples/webgl_postprocessing_unreal_bloom.html
We'll want it to be off by default since it has render cost. What kind of parameterization are you considering?
Is there any example of how can we use bloom with the model viewer? I want neon light on the model.
No, but you can fork us and add Bloom in our three.js code using their examples. If you'd like to contribute it back when you get it working, that would be much appreciated.
nobody up for the task? I might have a stab
@AhrenFullStop By all means! Happy to review. I should really expose a rendering performance metric so we can track how expensive these these features are. I don't have a good sense for it at the moment. As long as it defaults to off it should be fine though.
This would be an amazing feature to integrate. I was thinking of trying something like this example - https://p3d.in/jCj24
hi, will this be implemented any time soon?
Not on my roadmap, but PRs welcome!
Not on my roadmap, but PRs welcome!
It should be possible by simply replacing the threeRender.render(scene, scene.camera)
line in the Renderer
with composer.render()
from this example, right? Or is there something else I'm missing in the rendering stack?
In that case all the post-processing effects could be exposed through some simple interface where each one is a singleton and can either get added or removed simply?
That sounds about right, but given the performance hit we'll want it to be optional.