Three.js: Feature request: support InstancedMesh.setOpacityAt(index,color)

Created on 29 Sep 2020  路  3Comments  路  Source: mrdoob/three.js

I want to set the opacity of each item by index , It's like InstancedMesh.setColorAt()

Additional context

I've found a way to do it ,but it's not work very well
https://discourse.threejs.org/t/instance-geometry-opacity/9164
image
image

Enhancement

All 3 comments

I think adding per-instance opacity support to InstancedMesh brings more problems than it solves...

https://discourse.threejs.org/t/is-it-possible-to-set-varying-opacity-for-objects-inside-a-instancedmesh-filled-with-boxbuffergeometry-meshpongmaterial-cubes/19181/2

It鈥檚 not possible, mainly because if that was allowed the first thing people bump into is that the order in which transparent objects get renderer is incorrect.

In order to render them correctly the instances will need to be reordered every time the camera moves.

Yeah, I'm afraid this feature will be very "support-intensive"...

I think adding per-instance opacity support to InstancedMesh brings more problems than it solves...

https://discourse.threejs.org/t/is-it-possible-to-set-varying-opacity-for-objects-inside-a-instancedmesh-filled-with-boxbuffergeometry-meshpongmaterial-cubes/19181/2

It鈥檚 not possible, mainly because if that was allowed the first thing people bump into is that the order in which transparent objects get renderer is incorrect.
In order to render them correctly the instances will need to be reordered every time the camera moves.

Thank you for your reply

Was this page helpful?
0 / 5 - 0 ratings

Related issues

akshaysrin picture akshaysrin  路  3Comments

clawconduce picture clawconduce  路  3Comments

donmccurdy picture donmccurdy  路  3Comments

Horray picture Horray  路  3Comments

makc picture makc  路  3Comments