postprocessing icon indicating copy to clipboard operation
postprocessing copied to clipboard

See outline effect through transparent objects

Open andregoncalvesdev opened this issue 4 years ago • 1 comments

Description of the bug

Hello @vanruesc ! Thanks again for this awesome library.

I´m trying to create a set of transparent panels in a row, where each one of them has an outline glow effect.

I want to see the outline glow of the back panels through the front panels and control their glow, as they were independent/different layers. I´m only able to see the front panel glow or the sum of both as shown of the SSs below.

To Reproduce

https://codesandbox.io/s/youthful-lichterman-uzwk3?file=/src/App.js

Expected behavior

Would that be possible to achieve with this library or should i go with other approach? Thank you.

Screenshots

Screenshot 2021-10-19 at 12 22 39 Screenshot 2021-10-19 at 12 22 44

Library versions used

  • Three: 0.124.0
  • Post Processing: 6.21.5

Desktop

  • OS: MacOS
  • Browser Chrome v94
  • Graphics hardware: Radeon Pro 555X 4 GB

andregoncalvesdev avatar Oct 19 '21 11:10 andregoncalvesdev

Hi,

Would that be possible to achieve with this library

no, the OutlineEffect doesn't currently support this use case. Outlines are detected based on depth, so when an object covers another object, the depth of the occluded object will be overwritten.

The planned changes for v7 will allow us to render an object ID buffer that maps objects to unique colors. This information could then be used to support separate outlines for individual objects.

Let's keep this issue open as a feature request.

vanruesc avatar Oct 20 '21 12:10 vanruesc