generated .off file has vertices at locations exceeding the original range

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

generated .off file has vertices at locations exceeding the original range

sindhu r
Hello,
I am trying to do the following: 
  1. define a set of 3d coordinates describing a surface
  2. compute and orient normals
  3. generate a polyhedral mesh and save it to a .off file for further use.
What I have done so far: I have accomplished all 3, however my polyhedral mesh and my .off file seem incorrect. 

My .off file (attached) was generated using the points and normals from a .xyz file (also attached). The xyz file represents points that span the x-y plane 0 <= (x,y) <= 6, and 0 <= rand(z) <= 0.2. It does not have any holes or islands; it looks like a blanket. My final test case will involve holes and/or islands, but for the moment even this simple example shows something strange about the .off file that I generate using the Poisson reconstruction method.

While the .xyz file contains points respecting the 0 <= (x,y) <= 6, and 0 <= rand(z) <= 0.2 condition, my .off file seems (lines 4, 7, 8 etc..) to have vertices with x,y,z locations that are way off my points specified in the .xyz file. I think I'm using the Poisson reconstruction incorrectly (minimal working code attached). The image of the polyhedral mesh (attached) does not remotely resemble what I hoped for :(.

I'm sorry if it is a basic question, and I would be grateful for any guidance. Thank you!

Regards,
Sindhu R

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss


cgal_discuss_v0_minimal_working_code.cpp (2K) Download Attachment
cgal_custom_points_with_normals.xyz (2K) Download Attachment
v0_clean_cgal_custom_poisson_points_with_normals.off (550 bytes) Download Attachment
cgal_v0_6x6_mesh.png (19K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: generated .off file has vertices at locations exceeding the original range

Sebastien Loriot (GeometryFactory)
Your input point cloud is basically a grid of points in a plane.
I don't know what you expect as output but poisson reconstruction
algorithm is probably not the right tool for that task (Advancing front
seems more appropriate to me).

You should read the new tutorial written by Simon Giraudot about
reconstruction available here:

https://cgal.geometryfactory.com/CGAL/doc/master/Manual/tuto_reconstruction.html

Best regards,

Sebastien.

On 9/7/20 8:28 PM, sindhu r ([hidden email] via cgal-discuss
Mailing List) wrote:

> Hello,
> I am trying to do the following:
>
>  1. define a set of 3d coordinates describing a surface
>  2. compute and orient normals
>  3. generate a polyhedral mesh and save it to a .off file for further use.
>
> What I have done so far: I have accomplished all 3, however my
> polyhedral mesh and my .off file seem incorrect.
>
> My .off file (attached) was generated using the points and normals from
> a .xyz file (also attached). The xyz file represents points that span
> the x-y plane 0 <= (x,y) <= 6, and 0 <= rand(z) <= 0.2. It does not have
> any holes or islands; it looks like a blanket. My final test case will
> involve holes and/or islands, but for the moment even this simple
> example shows something strange about the .off file that I generate
> using the Poisson reconstruction method.
>
> While the .xyz file contains points respecting the 0 <= (x,y) <= 6, and
> 0 <= rand(z) <= 0.2 condition, my .off file seems (lines 4, 7, 8 etc..)
> to have vertices with x,y,z locations that are way off my points
> specified in the .xyz file. I think I'm using the Poisson reconstruction
> incorrectly (minimal working code attached). The image of the polyhedral
> mesh (attached) does not remotely resemble what I hoped for :(.
>
> I'm sorry if it is a basic question, and I would be grateful for any
> guidance. Thank you!
>
> Regards,
> Sindhu R
>
> --
> You are currently subscribed to cgal-discuss.
> To unsubscribe or access the archives, go to
> https://sympa.inria.fr/sympa/info/cgal-discuss
>

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss


Reply | Threaded
Open this post in threaded view
|

Re: generated .off file has vertices at locations exceeding the original range

sindhu r
Hi Sebastien,
Thanks for the reply and the link. I was under the impression that I was following one of the suggested pipelines in the manual for my overall task (read point cloud as xyz, compute and orient normals as xyz, perform poisson reconstruction into .off, transform into mesh, use with surface mesh shortest path package).

You're right, I am providing a grid of points as the simplest test case of a point cloud to see where I'm going wrong. I am assuming that when that surface is reconstructed, it should look like a 6x6 grid. My confusion is that the surface does not look like a grid at all- even before I remove isolated vertices it looks like a dagger and some vertices have coordinates that exceed the range specified in my point cloud. I am unsure of where I'm making a mistake.

Anyway, thanks for your help, I'm probably making a silly mistake somewhere.

Sindhu R

On Tue, Sep 8, 2020, 1:00 AM "Sebastien Loriot (GeometryFactory)" <[hidden email]> wrote:
Your input point cloud is basically a grid of points in a plane.
I don't know what you expect as output but poisson reconstruction
algorithm is probably not the right tool for that task (Advancing front
seems more appropriate to me).

You should read the new tutorial written by Simon Giraudot about
reconstruction available here:

https://cgal.geometryfactory.com/CGAL/doc/master/Manual/tuto_reconstruction.html

Best regards,

Sebastien.

On 9/7/20 8:28 PM, sindhu r ([hidden email] via cgal-discuss
Mailing List) wrote:
> Hello,
> I am trying to do the following:
>
>  1. define a set of 3d coordinates describing a surface
>  2. compute and orient normals
>  3. generate a polyhedral mesh and save it to a .off file for further use.
>
> What I have done so far: I have accomplished all 3, however my
> polyhedral mesh and my .off file seem incorrect.
>
> My .off file (attached) was generated using the points and normals from
> a .xyz file (also attached). The xyz file represents points that span
> the x-y plane 0 <= (x,y) <= 6, and 0 <= rand(z) <= 0.2. It does not have
> any holes or islands; it looks like a blanket. My final test case will
> involve holes and/or islands, but for the moment even this simple
> example shows something strange about the .off file that I generate
> using the Poisson reconstruction method.
>
> While the .xyz file contains points respecting the 0 <= (x,y) <= 6, and
> 0 <= rand(z) <= 0.2 condition, my .off file seems (lines 4, 7, 8 etc..)
> to have vertices with x,y,z locations that are way off my points
> specified in the .xyz file. I think I'm using the Poisson reconstruction
> incorrectly (minimal working code attached). The image of the polyhedral
> mesh (attached) does not remotely resemble what I hoped for :(.
>
> I'm sorry if it is a basic question, and I would be grateful for any
> guidance. Thank you!
>
> Regards,
> Sindhu R
>
> --
> You are currently subscribed to cgal-discuss.
> To unsubscribe or access the archives, go to
> https://sympa.inria.fr/sympa/info/cgal-discuss
>

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss



--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss

Reply | Threaded
Open this post in threaded view
|

Re: generated .off file has vertices at locations exceeding the original range

andreas.fabri

Hello,

You might have a look at the tutorial that is already in the documentation
of the master branch

https://cgal.geometryfactory.com/CGAL/doc/master/Manual/tuto_reconstruction.html

With Poisson you will not have your input points as mesh vertices.

The documentation states that Poisson produces a water tight surface.
This is apparently a simplification (or a bug), because you obtain
a mesh with borders, but a planar data set is not well suited
for Poisson. 

Best,

Andreas

On 9/8/2020 7:41 AM, sindhu r ([hidden email] via cgal-discuss Mailing List) wrote:
Hi Sebastien,
Thanks for the reply and the link. I was under the impression that I was following one of the suggested pipelines in the manual for my overall task (read point cloud as xyz, compute and orient normals as xyz, perform poisson reconstruction into .off, transform into mesh, use with surface mesh shortest path package).

You're right, I am providing a grid of points as the simplest test case of a point cloud to see where I'm going wrong. I am assuming that when that surface is reconstructed, it should look like a 6x6 grid. My confusion is that the surface does not look like a grid at all- even before I remove isolated vertices it looks like a dagger and some vertices have coordinates that exceed the range specified in my point cloud. I am unsure of where I'm making a mistake.

Anyway, thanks for your help, I'm probably making a silly mistake somewhere.

Sindhu R

On Tue, Sep 8, 2020, 1:00 AM "Sebastien Loriot (GeometryFactory)" <[hidden email]> wrote:
Your input point cloud is basically a grid of points in a plane.
I don't know what you expect as output but poisson reconstruction
algorithm is probably not the right tool for that task (Advancing front
seems more appropriate to me).

You should read the new tutorial written by Simon Giraudot about
reconstruction available here:

https://cgal.geometryfactory.com/CGAL/doc/master/Manual/tuto_reconstruction.html

Best regards,

Sebastien.

On 9/7/20 8:28 PM, sindhu r ([hidden email] via cgal-discuss
Mailing List) wrote:
> Hello,
> I am trying to do the following:
>
>  1. define a set of 3d coordinates describing a surface
>  2. compute and orient normals
>  3. generate a polyhedral mesh and save it to a .off file for further use.
>
> What I have done so far: I have accomplished all 3, however my
> polyhedral mesh and my .off file seem incorrect.
>
> My .off file (attached) was generated using the points and normals from
> a .xyz file (also attached). The xyz file represents points that span
> the x-y plane 0 <= (x,y) <= 6, and 0 <= rand(z) <= 0.2. It does not have
> any holes or islands; it looks like a blanket. My final test case will
> involve holes and/or islands, but for the moment even this simple
> example shows something strange about the .off file that I generate
> using the Poisson reconstruction method.
>
> While the .xyz file contains points respecting the 0 <= (x,y) <= 6, and
> 0 <= rand(z) <= 0.2 condition, my .off file seems (lines 4, 7, 8 etc..)
> to have vertices with x,y,z locations that are way off my points
> specified in the .xyz file. I think I'm using the Poisson reconstruction
> incorrectly (minimal working code attached). The image of the polyhedral
> mesh (attached) does not remotely resemble what I hoped for :(.
>
> I'm sorry if it is a basic question, and I would be grateful for any
> guidance. Thank you!
>
> Regards,
> Sindhu R
>
> --
> You are currently subscribed to cgal-discuss.
> To unsubscribe or access the archives, go to
> https://sympa.inria.fr/sympa/info/cgal-discuss
>

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss



--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss

-- 
Andreas Fabri, PhD
Chief Officer, GeometryFactory
Editor, The CGAL Project

phone: +33.492.954.912    skype: andreas.fabri

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss

Reply | Threaded
Open this post in threaded view
|

Re: generated .off file has vertices at locations exceeding the original range

sindhu r
Hi Andreas,
Thank you for the clarification :).

I understand that vertices won't reflect the same points as in the point cloud. I suppose I'm not articulating my question well, but in any case, point noted about the Poisson not suiting a planar point set.

Thank you very much!
Regards,
Sindhu R


On Tue, Sep 8, 2020 at 2:38 AM Andreas Fabri <[hidden email]> wrote:

Hello,

You might have a look at the tutorial that is already in the documentation
of the master branch

https://cgal.geometryfactory.com/CGAL/doc/master/Manual/tuto_reconstruction.html

With Poisson you will not have your input points as mesh vertices.

The documentation states that Poisson produces a water tight surface.
This is apparently a simplification (or a bug), because you obtain
a mesh with borders, but a planar data set is not well suited
for Poisson. 

Best,

Andreas

On 9/8/2020 7:41 AM, sindhu r ([hidden email] via cgal-discuss Mailing List) wrote:
Hi Sebastien,
Thanks for the reply and the link. I was under the impression that I was following one of the suggested pipelines in the manual for my overall task (read point cloud as xyz, compute and orient normals as xyz, perform poisson reconstruction into .off, transform into mesh, use with surface mesh shortest path package).

You're right, I am providing a grid of points as the simplest test case of a point cloud to see where I'm going wrong. I am assuming that when that surface is reconstructed, it should look like a 6x6 grid. My confusion is that the surface does not look like a grid at all- even before I remove isolated vertices it looks like a dagger and some vertices have coordinates that exceed the range specified in my point cloud. I am unsure of where I'm making a mistake.

Anyway, thanks for your help, I'm probably making a silly mistake somewhere.

Sindhu R

On Tue, Sep 8, 2020, 1:00 AM "Sebastien Loriot (GeometryFactory)" <[hidden email]> wrote:
Your input point cloud is basically a grid of points in a plane.
I don't know what you expect as output but poisson reconstruction
algorithm is probably not the right tool for that task (Advancing front
seems more appropriate to me).

You should read the new tutorial written by Simon Giraudot about
reconstruction available here:

https://cgal.geometryfactory.com/CGAL/doc/master/Manual/tuto_reconstruction.html

Best regards,

Sebastien.

On 9/7/20 8:28 PM, sindhu r ([hidden email] via cgal-discuss
Mailing List) wrote:
> Hello,
> I am trying to do the following:
>
>  1. define a set of 3d coordinates describing a surface
>  2. compute and orient normals
>  3. generate a polyhedral mesh and save it to a .off file for further use.
>
> What I have done so far: I have accomplished all 3, however my
> polyhedral mesh and my .off file seem incorrect.
>
> My .off file (attached) was generated using the points and normals from
> a .xyz file (also attached). The xyz file represents points that span
> the x-y plane 0 <= (x,y) <= 6, and 0 <= rand(z) <= 0.2. It does not have
> any holes or islands; it looks like a blanket. My final test case will
> involve holes and/or islands, but for the moment even this simple
> example shows something strange about the .off file that I generate
> using the Poisson reconstruction method.
>
> While the .xyz file contains points respecting the 0 <= (x,y) <= 6, and
> 0 <= rand(z) <= 0.2 condition, my .off file seems (lines 4, 7, 8 etc..)
> to have vertices with x,y,z locations that are way off my points
> specified in the .xyz file. I think I'm using the Poisson reconstruction
> incorrectly (minimal working code attached). The image of the polyhedral
> mesh (attached) does not remotely resemble what I hoped for :(.
>
> I'm sorry if it is a basic question, and I would be grateful for any
> guidance. Thank you!
>
> Regards,
> Sindhu R
>
> --
> You are currently subscribed to cgal-discuss.
> To unsubscribe or access the archives, go to
> https://sympa.inria.fr/sympa/info/cgal-discuss
>

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss



--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss

-- 
Andreas Fabri, PhD
Chief Officer, GeometryFactory
Editor, The CGAL Project

phone: +33.492.954.912    skype: andreas.fabri

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss


--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss