3D Modeling Algorithms
Posted by millerni456 on Nov 08, 2011; 2:42am
URL: https://forum.jogamp.org/3D-Modeling-Algorithms-tp3488988.html
Hello, I know this discussion better belongs else wheres, but it still can relate to JOGL/OpenGL.
+ I like this community a lot so here goes...
I'm looking to design and create a 3D modeling tool, and I first wanted to do this via Java3D which was a bad mistake...
So when I came across OpenGL I realized this is a ton more possible.
What I'm looking for are algorithms for going about 3D geometry creation. And I'm actually hoping to pool together a log of different algorithms that can suit anyone's needs.
So here are a few I've got:
Creating simple primitives, then adding points via pick-selection.
Here you would load for example a cube. Using this cube you would be able to select the edges on the cube using OpenGL
pick-selection (not color-picking). Depending on the tools selected you may add a point into the cube, which under the hood,
will add some data into the vertex array used in rendering the geometry.
Going 2D, then 3D
By this method you would be able to draw first in 2D plane (which is implemented by many CAD programs). Then extude
the depth. What I had in mind for a simple per-vertex creation was to select a point then modify it's z-value for example.
2D Building blocks
This one uses the idea that to create 3D objects, you first need 2D faces. This method requires that you add triangles for
example to create your geometry. The triangles data is of course collected into the vertex array, then rendered by the
GL_TRIANGLES mode for example.
So that's what I've got, I do wan't to ask in regards to my latter idea of triangles, if the GPU has a harder time rendering
with GL_TRIANGLES as compared to GL_TRIANGLE_STRIP. Also, I was hoping to see what other algorithms you have ideas
of. I'm looking for the most professional way to do geometry creation, but I cannot seem to find a consistent way throughout
the different modeling engines out there.