Material coloring issue

Hello,

we are trying to implement a material selection/hovering effect in Viewer v3.
Here is the piece of code

if (findedNodeChild.data[0].material) {
   findedNodeChild.data[0].material.color = '#ff0000'
}

The issue is that depending on the camera angle of the viewer the rendering of this dynamic coloration is acting very weirdly.
Here is some screenshots when you see that the red is “disappearing” or shading in a strange way when you rotate or zoom/dezoom.
Any idea what is wrong ?

Thanks


Hello @Alan11,

could you provide an example to reproduce this issue? Just from the screenshots, it is difficult to know where the problem is.

What you can look out for is duplicate geometry. Maybe the geometry arrives a second time, because some components are not hidden in Grasshopper? That could explain this behavior, but it is just a guess from my side for now.

Cheers, Michael

Hello,

here you can access to the configurator
https://configurator.the-wooder.com/?email=billi.alan%2B2%40gmail.com&password=7373809320259

First click on “Mes meubles”
Then select one of the furnitures
Click on “Suivant” on the first step (bottom banner right corner)
On the right column you can click on the elements of the furniture and will see that they are colored in red.

Let me know if it works on your side.
Thanks!

Hello @Alan11,

thank you for the link, I can reproduce your issue now.

One issue is that the Volumes are transparent and intersecting, as you can see in the attached image. Therefore, WebGL cannot correctly order the the surfaces which leads to the issue with flickering from certain camera angles. If the Volumes are not intersecting anymore, this issue should be resolved.

Additionally, you can set the alphaMode of the material to MATERIAL_ALPHA.BLEND. You can do that at the same time you set the color. This should also help with this issue.

Cheers, Michael

Hello,

We’ve managed to achieve what we wanted by hiding the “unselected” volumes when selecting on a volume. By doing so we are now able to color only one volume.

Thanks!