Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Exporting PLY file with Color Information using Polyhedron_3 in CGAL

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Exporting PLY file with Color Information using Polyhedron_3 in CGAL


Chronological Thread 
  • From: Simon Giraudot <>
  • To:
  • Subject: Re: [cgal-discuss] Exporting PLY file with Color Information using Polyhedron_3 in CGAL
  • Date: Wed, 10 Feb 2021 08:19:23 +0100
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=None ; spf=None
  • Ironport-phdr: 9a23:8hYgdRHuKChT1s0/D8obfp1GYnF86YWxBRYc798ds5kLTJ76pc+6bnLW6fgltlLVR4KTs6sC17OH9f2+EjxQqb+681k6OKRWUBEEjchE1ycBO+WiTXPBEfjxciYhF95DXlI2t1uyMExSBdqsLwaK+i764jEdAAjwOhRoLerpBIHSk9631+ev8JHPfglEnjWwba52IRmsrQjct8YajIhhJ60s1hbHv3xEdvhMy2h1P1yThRH85smx/J5n7Stdvu8q+tBDX6vnYak2VKRUAzs6PW874s3rrgTDQhCU5nQASGUWkwFHDBbD4RrnQ5r+qCr6tu562CmHIc37SK0/VDq+46t3ThLjlSEKPCM7/m7KkMx9lL9VrgyvpxJ/wIDabo+aO/V8cazBct0XXnZBU8VLWiBdHo+xYYkCAuwcNuhYtYn9oF4OoAOjCwmtAePvzTlIjWL30607yeQuCxzG0xEnH9ISrX/Zq871NKYXUeCyyqnE1zrDb/JM2Tjn9YjHbxchoe2XULJ/b8XRzkwvGB3ZjlWKqY3lMSma2fgRs2ic9ephVfijhHIgqwF0uzWiwNonhYbViIwP0F/E6Tl5z5gvJd2+UEN3fN2pHpteuSyUN4Z4TN0vTmJ2tCs0xbMLvYK3cTUIxZkjxhPSafiKf5SV7h/tVuucPCp0in1ndb+wiRu/8Eeux+vhXce611ZKqzBKktjKtn0VyxPT5dKISv9n8kemwzaP2Bjf6u5aLkAzkKrUNYIhwqQwl5odq0vMAjP2mELsjK6WbEkr5u+o6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u1Fo=

Hello,

Can you share the header of the generated PLY? I have no idea how Blender handles colors with PLY input, but it's possible the format you use is not recognized (I guess the usual way is to have 3 properties unsigned char "red" "green" and "blue", or "r" "g" and "b"). Do your colors appear if you try to load it in Meshlab?

For information, one easy way to save a mesh in PLY with colors is to use a CGAL::Surface_mesh instead of a CGAL::Polyhedron_3 (algorithms in CGAL should be compatible with both): in that case, you can embed the colors as properties on the mesh simplices, and these properties are automatically written if you call `CGAL::write_ply` on your mesh: https://doc.cgal.org/latest/Surface_mesh/group__PkgSurface__mesh.html#ga77bbb79d449c981895eedb6c3c23bd14

Best,

--
Simon Giraudot, PhD
R&D Engineer
GeometryFactory - http://geometryfactory.com/

Le 09/02/2021 à 21:14, Anisa-Aisha ( via cgal-discuss Mailing List) a écrit :
Hello,

I am a beginner in CGAL, and have been trying to export a PLY file with
color information in CGAL. However, even though the colors are written in
file, they are not displayed when I try to visualize it using Blender. I am
using a Polyhedron_3 structure, and then using iterators to write to PLY
file like it is done here (
https://piero.dev/2017/04/how-to-write-a-cgal-polyhedron-to-ply-or-any-other-format/
<https://piero.dev/2017/04/how-to-write-a-cgal-polyhedron-to-ply-or-any-other-format/>
), with addition of color property. Could anyone guide me on how to export
PLY files in CGAL using Polyhedron_3 with color information?
Thank you.



--
Sent from: http://cgal-discuss.949826.n4.nabble.com/




Archive powered by MHonArc 2.6.19+.

Top of Page