Online3DViewer icon indicating copy to clipboard operation
Online3DViewer copied to clipboard

Import .Off ignore alpha color.

Open ricaun opened this issue 1 year ago • 0 comments

Describe the bug

If a .off file is imported if the face have some alpha in the color of the face the alpha is ignored by the importer.

To Reproduce

Here is a cube_with_alpha.off sample with alpha included in the last 3 faces.

OFF
# cube_with_alpha.off
# A cube
8 6 12
 1.0  0.0 1.4142
 0.0  1.0 1.4142
-1.0  0.0 1.4142
 0.0 -1.0 1.4142
 1.0  0.0 0.0
 0.0  1.0 0.0
-1.0  0.0 0.0
 0.0 -1.0 0.0
4  0 1 2 3  255 0 0 #red
4  7 4 0 3  0 255 0 #green
4  4 5 1 0  0 0 255 #blue
4  5 6 2 1  0 255 0 100
4  3 2 6 7  0 0 255 100
4  6 5 4 7  255 0 0 100

Expected behavior

The imported file should include the alpha in the material.

The importeroff.js does not have that implemented.

ricaun avatar Jan 06 '25 02:01 ricaun