create3000 / x_ite

X_ITE X3D Browser, view and manipulate X3D and VRML scenes in HTML.
https://create3000.github.io/x_ite/
Other
67 stars 15 forks source link

IndexedFaceSet solid false and alpha #173

Closed Wagyx closed 4 months ago

Wagyx commented 5 months ago

Hello there, I have developed an OFF file parser and I think I am seeing issues with color alpha in IndexedFaceSet. I am using IndexedFaceSet for the faces, with solid=false, convex=false, colorPerVertex=false. Here is the result that I get when I use a Color node: Capture_rgb Here is the result when I use an ColorRGBA node with an alpha value of 1: Capture_rgba The expected behaviour would be that the pictures be the same. There could also be something that I don't understand about alpha and double sided faces. Let me know what you think. Thank you

create3000 commented 5 months ago

If a ColorRGBA node is used, the Shape node is treated as transparent. Especially if you use more then one Shape, and these shapes are overlapping, it can be possible to get some unexpected results. But you can control the alpha behavior with Appearance.alphaMode and Appearance.alphaCutoff. https://create3000.github.io/x_ite/components/shape/appearance/#sfstring-in-out-alphamode-auto-autoopaquemaskblend