Re: [osg-users] Geometry of Generic 3D Surface from Collection of Points
Hi Erik, The OSG has the osgUtil::DelaunayTriangulator and the GLU based osgUtil::Tessellator can be used for tessellating meshes, but both utilize a 2D projection to a plan to work out the connectivity so aren't appropriate for meshes that will be folded. Robert. On 17 August 2015 at 02:21, Erik Hensens ehens...@hunter.com wrote: Hi everyone! I have a collection of Vec3 vertices that define the shape of a geometry that I'd like to create. Typically I would create the geometry by adding a primitive set of the POLYGON type, but what should I do if the vertices are not all in the same plane? I'm sure this is a very common task and that there's probably a simple way to achieve this. What is the best basic approach to creating such a geometry? Ideally I'd like to be able to do this without having to choose the individual triangles or quads that will make up the entire geometry. For example, if I wanted to model any generic three-dimensional surface and all I had was a large sample of points on the surface. In case I'm not doing a good job explaining what I need, I've attached an image - let's say I had many points on the surface of that shape and I need to make a geometry that depicts it. How would I do this? Thanks in advance for your help![/img] -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=64792#64792 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Geometry of Generic 3D Surface from Collection of Points
Thanks Sebastian, My requirement is not actually as simple as trying to graph a 3D function, I was just trying to keep my question clear. In reality I just have the coordinates of the boundary of a three-dimensional path that I need to represent with a Geometry. It looks like the CGAL library is capable of performing 3D tessellation, so maybe that's the way to go. SMesserschmidt wrote: Hi Erik, From what I understand you have a function generating a z value for x,y pairs. So basically you simply have to sample your function in regular distances to get the triangle coordinates. If you already have the sampled points without further information you need to use the delaunay triangulation. IIRC, If it is a function the folding should not be problem for the delaunay algorithm, so I don't know if Roberts comment might be misleading. Cheers Sebastian Thanks for the response Robert! So, does that mean that there is no way to do what I want without somehow determining the coordinates of every individual triangle? And there's not even any way to do a 3D tessellation to get such triangle coordinates? :' robertosfield wrote: Hi Erik, The OSG has the osgUtil::DelaunayTriangulator and the GLU based osgUtil::Tessellator can be used for tessellating meshes, but both utilize a 2D projection to a plan to work out the connectivity so aren't appropriate for meshes that will be folded. Robert. On 17 August 2015 at 02:21, Erik Hensens () wrote: Hi everyone! I have a collection of Vec3 vertices that define the shape of a geometry that I'd like to create. Typically I would create the geometry by adding a primitive set of the POLYGON type, but what should I do if the vertices are not all in the same plane? I'm sure this is a very common task and that there's probably a simple way to achieve this. What is the best basic approach to creating such a geometry? Ideally I'd like to be able to do this without having to choose the individual triangles or quads that will make up the entire geometry. For example, if I wanted to model any generic three-dimensional surface and all I had was a large sample of points on the surface. In case I'm not doing a good job explaining what I need, I've attached an image - let's say I had many points on the surface of that shape and I need to make a geometry that depicts it. How would I do this? Thanks in advance for your help![/img] -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=64792#64792 (http://forum.openscenegraph.org/viewtopic.php?p=64792#64792) ___ osg-users mailing list () http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org (http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org) -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=64802#64802 ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=64804#64804 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Geometry of Generic 3D Surface from Collection of Points
Thanks Robert. That answers my question perfectly - I figured there was a simple way to do what I wanted using OSG only but that I just couldn't find it. I'm fine with using a different approach to solve this problem. I haven't looked too far but perhaps CGAL can provide me with what I need. Thanks again! robertosfield wrote: Hi Erik, On 17 August 2015 at 13:39, Erik Hensens () wrote: So, does that mean that there is no way to do what I want without somehow determining the coordinates of every individual triangle? And there's not even any way to do a 3D tessellation to get such triangle coordinates? :' The OSG itself doesn't provide a general 3D mesh generalization, this is non trivial problem to solve. Go on the web and search for different solutions. The OSG is primarily and rendering library, the extra's such as DealunayTriangulator are for convinience, but don't attempt to provide complete solutions. Tessellation of point clouds is a huge topic in itself. Robert. -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=64806#64806 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Geometry of Generic 3D Surface from Collection of Points
Thanks for the response Robert! So, does that mean that there is no way to do what I want without somehow determining the coordinates of every individual triangle? And there's not even any way to do a 3D tessellation to get such triangle coordinates? :' robertosfield wrote: Hi Erik, The OSG has the osgUtil::DelaunayTriangulator and the GLU based osgUtil::Tessellator can be used for tessellating meshes, but both utilize a 2D projection to a plan to work out the connectivity so aren't appropriate for meshes that will be folded. Robert. On 17 August 2015 at 02:21, Erik Hensens () wrote: Hi everyone! I have a collection of Vec3 vertices that define the shape of a geometry that I'd like to create. Typically I would create the geometry by adding a primitive set of the POLYGON type, but what should I do if the vertices are not all in the same plane? I'm sure this is a very common task and that there's probably a simple way to achieve this. What is the best basic approach to creating such a geometry? Ideally I'd like to be able to do this without having to choose the individual triangles or quads that will make up the entire geometry. For example, if I wanted to model any generic three-dimensional surface and all I had was a large sample of points on the surface. In case I'm not doing a good job explaining what I need, I've attached an image - let's say I had many points on the surface of that shape and I need to make a geometry that depicts it. How would I do this? Thanks in advance for your help![/img] -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=64792#64792 (http://forum.openscenegraph.org/viewtopic.php?p=64792#64792) ___ osg-users mailing list () http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org (http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org) -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=64802#64802 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Geometry of Generic 3D Surface from Collection of Points
Hi Erik, On 17 August 2015 at 14:44, Erik Hensens ehens...@hunter.com wrote: Sorry but could you expand just a little bit on what you mean by For instance if you had a data set that has two input variables that specify a surface in 3D then you could create a regular tessellation in the 2D input space then map the 2D coordinates to their final 3D coordinates - think of table cloth with a regular grid that you then scrunch up. In particular, what do you mean by 'map the 2D coordinates to their final 3D coordinates'? Sorry and thanks very much for your patience... :-* I don't know what part needs clarifying. There are OSG examples like osggeometry that illustrate creating osg::Geometry to represent points, lines and meshes by specifying the raw 3D coordinates, normals, texcoords and meshes. The osganimation example creates a mesh with a regular grid like a chess board. The osgdalunay and osgtesselate illustrate how to use the osgUtil::DelanayTriangulator and osgUtil::Tessellator respectively. The osgshaderterrain creates a flat grid and then uses a vertex shader that reads a texture for a height field and then modifies the flat geometry to produce the final deformed mesh. This function only modifies the Z value using the height field, but it's possible to modify all coordinates if you so wish, i.e. use a vec3 vertex = myfunction( vec2(x,y) ); You could do something similar to the original mesh coordinates in C++ rather than shaders. All these possibilities mean there might be plenty of ways to do what you need to do, but it may also be that your particular problem domain isn't amenable to these approaches. You've never really said exactly what type of data you have to work with so it really isn't possible to tell you exactly what to do. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Geometry of Generic 3D Surface from Collection of Points
Hi Erik, On 17 August 2015 at 13:39, Erik Hensens ehens...@hunter.com wrote: So, does that mean that there is no way to do what I want without somehow determining the coordinates of every individual triangle? And there's not even any way to do a 3D tessellation to get such triangle coordinates? :' The OSG itself doesn't provide a general 3D mesh generalization, this is non trivial problem to solve. Go on the web and search for different solutions. The OSG is primarily and rendering library, the extra's such as DealunayTriangulator are for convinience, but don't attempt to provide complete solutions. Tessellation of point clouds is a huge topic in itself. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Geometry of Generic 3D Surface from Collection of Points
Hi Erik, On 17 August 2015 at 14:18, Erik Hensens ehens...@hunter.com wrote: Thanks Robert. That answers my question perfectly - I figured there was a simple way to do what I wanted using OSG only but that I just couldn't find it. I'm fine with using a different approach to solve this problem. I haven't looked too far but perhaps CGAL can provide me with what I need. I really don't know enough about the specifics of your dataset to know what you can use. CGAL might the tool for you task, or it might be that the OSG tools are sufficient. Alternatively it may be possible to come up with solutions that are tailored to the dataset and can produce results of better quality and faster than general purpose solution. For instance if you had a data set that has two input variables that specify a surface in 3D then you could create a regular tessellation in the 2D input space then map the 2D coordinates to their final 3D coordinates - think of table cloth with a regular grid that you then scrunch up. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Geometry of Generic 3D Surface from Collection of Points
Hi Erik, From what I understand you have a function generating a z value for x,y pairs. So basically you simply have to sample your function in regular distances to get the triangle coordinates. If you already have the sampled points without further information you need to use the delaunay triangulation. IIRC, If it is a function the folding should not be problem for the delaunay algorithm, so I don't know if Roberts comment might be misleading. Cheers Sebastian Thanks for the response Robert! So, does that mean that there is no way to do what I want without somehow determining the coordinates of every individual triangle? And there's not even any way to do a 3D tessellation to get such triangle coordinates? :' robertosfield wrote: Hi Erik, The OSG has the osgUtil::DelaunayTriangulator and the GLU based osgUtil::Tessellator can be used for tessellating meshes, but both utilize a 2D projection to a plan to work out the connectivity so aren't appropriate for meshes that will be folded. Robert. On 17 August 2015 at 02:21, Erik Hensens () wrote: Hi everyone! I have a collection of Vec3 vertices that define the shape of a geometry that I'd like to create. Typically I would create the geometry by adding a primitive set of the POLYGON type, but what should I do if the vertices are not all in the same plane? I'm sure this is a very common task and that there's probably a simple way to achieve this. What is the best basic approach to creating such a geometry? Ideally I'd like to be able to do this without having to choose the individual triangles or quads that will make up the entire geometry. For example, if I wanted to model any generic three-dimensional surface and all I had was a large sample of points on the surface. In case I'm not doing a good job explaining what I need, I've attached an image - let's say I had many points on the surface of that shape and I need to make a geometry that depicts it. How would I do this? Thanks in advance for your help![/img] -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=64792#64792 (http://forum.openscenegraph.org/viewtopic.php?p=64792#64792) ___ osg-users mailing list () http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org (http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org) -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=64802#64802 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Geometry of Generic 3D Surface from Collection of Points
Hi Robert, Sorry but could you expand just a little bit on what you mean by For instance if you had a data set that has two input variables that specify a surface in 3D then you could create a regular tessellation in the 2D input space then map the 2D coordinates to their final 3D coordinates - think of table cloth with a regular grid that you then scrunch up. In particular, what do you mean by 'map the 2D coordinates to their final 3D coordinates'? Sorry and thanks very much for your patience... :-* robertosfield wrote: Hi Erik, On 17 August 2015 at 14:18, Erik Hensens () wrote: Thanks Robert. That answers my question perfectly - I figured there was a simple way to do what I wanted using OSG only but that I just couldn't find it. I'm fine with using a different approach to solve this problem. I haven't looked too far but perhaps CGAL can provide me with what I need. I really don't know enough about the specifics of your dataset to know what you can use. CGAL might the tool for you task, or it might be that the OSG tools are sufficient. Alternatively it may be possible to come up with solutions that are tailored to the dataset and can produce results of better quality and faster than general purpose solution. For instance if you had a data set that has two input variables that specify a surface in 3D then you could create a regular tessellation in the 2D input space then map the 2D coordinates to their final 3D coordinates - think of table cloth with a regular grid that you then scrunch up. -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=64808#64808 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org