PLY colors not apply
#1
How to display colors of a PLY mesh?


My code use assimp importer:
ContentVisual.Source = new Uri(fileName, UriKind.Absolute);
Camera1.Refresh();


XAML:
<Viewport3D Name="MainViewport">
<assimpVisuals:AssimpModelVisual3D x:Name="ContentVisual" />
<ModelVisual3D>
<ModelVisual3D.Content>
<Model3DGroup>
<AmbientLight Color="#333333"/>
</Model3DGroup>
</ModelVisual3D.Content>
</ModelVisual3D>
</Viewport3D>
#2
AssimpModelVisual3D should display colors that are read with assimp importer.

Please check your file with the official AssimpViewer that you can get from http://www.open3mod.com/

If the model has colors there or if it is shown differently as when using AssimpModelVisual3D, then there might be a problem in the AssimpModelVisual3D. In this case please send me the ply (or other file) to my email or with using Feedback page - http://www.ab4d.com/Feedback.aspx
Andrej Benedik
#3
I have checked the ply file that you have sent and I see that the file uses per-vertex colors - this can be seen from the first few lines of the ply file:

ply
format ascii 1.0
comment Created by Blender 2.75 (sub 0) - http://www.blender.org, source file: ''
element vertex 152358
property float x
property float y
property float z
property float nx
property float ny
property float nz
property uchar red
property uchar green
property uchar blue

element face 50830
property list uchar uint vertex_indices
end_header
-136.351532 277.688599 158.578323 -0.750302 0.219606 0.623555 46 41 62
-137.263077 296.570068 150.831741 -0.750302 0.219606 0.623555 57 52 71
...


Per-vertex colors are not supported in WPF. There is nothing I can do in Ab3d.PowerToys to support that.

Please check if you can export the model with using textures instead of per-vertex colors.
Andrej Benedik
  


Forum Jump:


Users browsing this thread:
1 Guest(s)