Colored model seem to lack normal data

I am loading .ply file into a new scene and then save the scene to .pdf format, colors and position seem to work Ok but light does not affect the scene. even if I try to calculate normal for this mesh using aspose API and save again it doesn’t change. how can I load a ply save it to a pdf and get it to render correctly with both normals and colors?
BTW if I load a colored .obj file I get a mesh with normals but no colors…
Thanks
RoyMeshes.zip (747.7 KB)

@rporat,

Kindly send us your source PLY and OBJ models. We will investigate and share our findings with you. There is an upload button in the header of the post editor and after pressing this button, you just need to browse and upload the Zip of source 3D models.

I have added 2 mesh examples to the original post
Thanks
Roy

@rporat,

Thank you for sharing the source PLY and OBJ models. We have logged investigations in our issue tracking system as follows:

THREEDNET-336: PLY to PDF - the Normal data is missing
THREEDNET-337: OBJ to PDF - the colors are missing

We have linked your post to these tickets and will keep you informed regarding any available updates.

@rporat,

In reference to the ticket ID THREEDNET-336, if we generate the normal and remove the vertex color, the lighting looks expected, but they cannot co-exist in the same PDF file, the following code work but will lose the vertex color:

[C#]

Scene scene = new Scene("TestPly.ply");
var mesh = (Mesh) scene.RootNode.ChildNodes[0].Entity; 
if (mesh.GetElement(VertexElementType.Normal) == null) 
{
    var normal = PolygonModifier.GenerateNormal(mesh); 
    scene.RootNode.ChildNodes[0].Material = new PhongMaterial() {DiffuseColor = new Vector3(Color.Gold)}; 
    //remove the old vertex color and manually add the normal 
    mesh.VertexElements.Clear(); 
    mesh.VertexElements.Add(normal); 
} 
scene.Save("TestPly.pdf", FileFormat.PDF); 

We have checked other software that can export U3D files with both vertex color and normals into PDF(Deep Exploration) and also get the same result, so it looks like it’s Adobe Acrobat’s problem.

In reference to the ticket ID THREEDNET-337, we have checked the OBJ file, there’s no color/material definition, so Acrobat Reader will use a default color(like gray). In order to manually apply a material to this file, you can do it like:

[C#]

Scene scene = new Scene(@"TestObj.obj"); 
scene.RootNode.ChildNodes[0].Material = new PhongMaterial(){DiffuseColor = new Vector3(Color.Gold)}; 
scene.Save(@"TestObj.pdf", FileFormat.PDF); 

Please note, as per the Wavefront OBJ’s specification, OBJ file does not support the vertex color, that’s why the color is being lost after saving into obj format.

Thanks for the answer,
a few questions though…
I have seen some applications that generates colorful 3D objects with normal data…
what is the way to do that? are they using different format for conversion?
and is there a way to create a custom mesh configuration where the vertex element is defined in a way that will hold both normal and color data.
Thanks
Roy

@rporat,

Kindly let us know which software application generates colorful 3D objects with normal data. We will investigate and share our findings with you.

here is a pdf example I have found:
Colored PDF.zip (1.1 MB)
what can we do to get models that looks like that…
Thanks
Roy

@rporat,

We have logged an investigation under the ticket ID THREEDNET-344 in our bug tracking system. We have linked your post to this ticket and will keep you informed regarding any available updates.