request: allow ssr for selected meshes
Closed this issue · 11 comments
similar to outlines and bloom in postprocessing: https://github.com/pmndrs/postprocessing/blob/main/src/core/Selection.js this could allow us to mix and match, place it on certain regions and perhaps achieve a cleaner look while improving performance? in sketchfab they have something similar where ssr is usually being using on metallic surfaces.
I can definitely add that. Selective reflections will definitely improve performance. So these selected objects shouldn't reflect anything but can still be reflections or should they be excluded entirely so that they don't reflect anything and also will never be visible regarding reflections. I could add both options.
from how outlines work, the selected meshes will have the effect: https://codesandbox.io/s/selective-outlines-d36mw
that component abstracts EffectPass.selection. so if i had a car and i want only the bumper to receive reflections, i'd select it, everything else remains untouched.
Ah I see, I'll check how it's done in postprocessing.js and will implement it similar to it
+1 for this, it'll improve performance greatly on large scene.
@0beqz there's no error in the reflection , SSR and Render pass it's just the line which calls the render function which it last went went through before the error but this error only comes when using SSR + pmndrs composer
can you try adding a transform controls in the scene and try ?
i tried on 1.0.8 and three js 142 same error
SSR initialized like this (other passes like bloom ssao brightness cont works fine)
const ssrEffect = new SSRPass(scene, camera);
composer.addPass(ssrEffect)
@0beqz there's no error in the reflection , SSR and Render pass it's just the line which calls the render function which it last went went through before the error but this error only comes when using SSR + pmndrs composer
can you try adding a transform controls in the scene and try ?
i tried on 1.0.8 and three js 142 same error
SSR initialized like this (other passes like bloom ssao brightness cont works fine)
const ssrEffect = new SSRPass(scene, camera); composer.addPass(ssrEffect)
Alright, so the transform controls seem to be causing that, I'll try to check what could be the issue behind that.
Alright sure, make a new issue. I'm wondering in which line from ReflectionsPass
this error emerges from.
Could you test if you are also getting this error in the example scene of this repository? I wasn't able to replicate that error when I used TransformControls in that scene - so adding it to the scene didn't seem to cause any issues there.
You can now use the SSREffect's selection
property to set which meshes should reflect. Leaving it empty will make all meshes reflect.