question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

load mesh from .ply file with custom format

See original GitHub issue

Hi @marcomusy,

I want to load a custom .ply file with different properties and elements structured in the following format:

File: map_mesh.ply
Description:
ply
format binary_little_endian 1.0
comment generated by omnimap
element vertex 3786298
property float x
property float y
property float z
property float nx
property float ny
property float nz
property float radiance_blue
property float radiance_green
property float radiance_red
property float irradiance_blue
property float irradiance_green
property float irradiance_red
property float irradiance_lamp_0_blue
property float irradiance_lamp_0_green
property float irradiance_lamp_0_red
property float irradiance_lamp_1_blue
property float irradiance_lamp_1_green
property float irradiance_lamp_1_red
property float irradiance_lamp_2_blue
property float irradiance_lamp_2_green
property float irradiance_lamp_2_red
property float irradiance_lamp_3_blue
property float irradiance_lamp_3_green
property float irradiance_lamp_3_red
property float irradiance_lamp_4_blue
property float irradiance_lamp_4_green
property float irradiance_lamp_4_red
property float irradiance_lamp_5_blue
property float irradiance_lamp_5_green
property float irradiance_lamp_5_red
property float reflectance_blue
property float reflectance_green
property float reflectance_red
element face 7570727
property list uchar uint vertex_indices
element lamp 6
property list uint uint vertex_indices
end_header

Do you think it would be possible to do that with vedo. I’ve tried to use the following command mesh = vedo.Mesh('./map_mesh.ply') but it seems that my created mesh variable to be empty.

You can access the .ply file from this tarball (apologies for the big size)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:18 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
marcomusycommented, Aug 25, 2020

if it’s some complementary information I would keep it separate from the mesh, but that really depends on the way you plan to use it. Hope it helps 😃

1reaction
marcomusycommented, Aug 24, 2020

PS: once map_mesh.vtk is created, vedo takes 0.8 sec to load it:

from vedo import load, show
m = load('map_mesh.vtk').alpha(0.2)
m.selectPointArray('irradiance_lamp_1_red')
print('loaded')
show(m)
Read more comments on GitHub >

github_iconTop Results From Across the Web

View 2D mesh from .ply file - Blender Stack Exchange
I am generating 2D meshes in my own s/w and saving them in binary .ply format. My elements are 'points', 'edges', 'triangles', ...
Read more >
C# Save 3D Meshes in Custom Binary Format | Import PLY ...
Aspose.3D lets you save 3D meshes in custom binary format using C#. Import the PLY models programmatically in C# or VB.NET. C# 3D...
Read more >
Load and read ply files with Pymesh - python - Stack Overflow
Since you're looking for the load_mesh() method, you'll want to use this installation guide: http://pymesh.readthedocs.io/en/latest/installation.html. Share.
Read more >
List of I/O Formats — PyMeshLab documentation
Here are listed all the file formats that can be loaded usingthe functions pmeshlab.MeshSet.load_new_mesh() and pmeshlab.MeshSet.load_current_mesh() , with all ...
Read more >
Load 3D File & Save Meshes in Custom Binary Format ...
Aspose team is pleased to announce the release of Aspose.3D for .NET 17.01.0. The new version adds support of importing PLY models.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found