32
votes
Accepted
What is the simplest way to compute principal curvature for a mesh triangle?
When I needed an estimate of mesh curvature for a skin shader, the algorithm I ended up settling on was this:
First, I computed a scalar curvature for each edge in the mesh. If the edge has positions $...
26
votes
Accepted
Why are quads used in filmmaking and triangle in gaming?
For 3D modeling, the usual reason to prefer quads is that subdivision surface algorithms work better with them—if your mesh is getting subdivided, triangles can cause problems in the curvature of the ...
24
votes
What is the simplest way to compute principal curvature for a mesh triangle?
Just to an add another way to the excellent @NathanReed answer, you can use mean and gaussian curvature that can be obtained with a discrete Laplace-Beltrami.
So suppose that the 1-ring ...
20
votes
Accepted
Programmatically generating vertex normals
Computing the normal from vertex positions is quite simple using the vector cross product.
The cross product of two vectors $u$ and $v$ (noted $u \times v$, or sometimes $u \wedge v$) is a vector ...
16
votes
Accepted
Why smoothed meshes in 3D studio end up with the same number of vertices/triangles? How then can they be smoothed with the same geometry?
Smooth in this case just makes the surface normals at vertices point the same way, when interpolated it looks smooth. Meshsmooth would add vertices.
1) how is the smoothing possible without ...
12
votes
How to Calculate Surface Normals for Generated Geometry
I see mainly three ways of computing normals for a generated shape.
Analytic normals
In some cases you have enough information about the surface to generate the normals. For example, the normal of any ...
11
votes
Accepted
How to Calculate Surface Normals for Generated Geometry
You simply dont want fully smooth results. While the commented method by Nathan Reed: "Calculate each vertex to face normal, sum them, normalize sum", generally works it sometimes fails spectacularly. ...
9
votes
Why are quads used in filmmaking and triangle in gaming?
As @Noah Witherspoon correctly, says triangle subdivision does not work as well as quad subdivision. Although, in the beginning triangles could not be subdivided at all. However, he does not really ...
8
votes
Accepted
Combination of Triangles and Quads in a mesh
Topologically correct is a very vague.
I believe you think of Polygon-Meshes when you say meshes, which is to represent the surface of the object by a patch of polygons, in most cases triangles or ...
8
votes
Accepted
What is the benefit of using Half Edge over Winged Edge?
As far as I can tell, the main advantage of half-edge is that traversal can be a bit simpler due to a guarantee of edges having a consistent orientation within each face.
Consider the problem of ...
7
votes
Ordering a set of unorganized points along a curve
You have an instance of a problem called curve reconstruction from unorganized points. Now that you know what to search for you'll find several methods, such as the crust, NN-crust, etc. Here are a ...
7
votes
Accepted
Gaussian blurring a function defined over a surface mesh
A few different approaches
I'll consider a few variations on your specific request, since you mention efficiency and I suspect your specific request may be the least efficient. I'll also suggest ways ...
6
votes
Creating shared vertex normals on GPU
For an nVidia only solution you can use floating point atomic add intrinsics (like NvInterlockedAddFp32) Unlocking GPU Intrinsics in HLSL | NVIDIA Developer
I tried this on 80.000 vertex mesh and it'...
6
votes
Human Readable/Writable 3D Representation Formats/Languages?
There are a number of formats that might fit the bill. Depends on what you want to achieve.
Most likely your looking for a scene description language for renderers. Many of them are for that one ...
6
votes
Accepted
Optimal memory access when using lookup tables on GPU?
The best place to put a look up table for a GPU compute shader depends on the size of the lookup table, and the frequency/coherency of access. In your case (you mentioned 4kb), shared local memory ...
6
votes
Generate mesh from pointcloud data
one popular Real time surface reconstruction method is TSDF (Truncated Signed Distance Function) used by Microsoft for the Kinect. It is based on the VRIP method but it is faster. It is based on depth ...
6
votes
Accepted
How to calculate volume of any given 3D mesh
The triangle form of the Shoelace Formula can be extended to 3D by using tetrahedrons instead of triangles.
Pick a point, Any point can be used, even one of the original vertices of the mesh (...
5
votes
Accepted
chess-like rectangles on the mesh
I don't think it's trying to represent anything in particular.
In CG there is a concept of textures, which is a bit like painting the surface of an object a specific color/look. For example, on a car ...
5
votes
Accepted
What's the simplest, open, animation format?
For what it's worth, the glTF Tutorials contain a section on Skinning that shows how the raw vertex and joint weight data feed into a vertex shader to distort the mesh.
If you do design your own ...
5
votes
Accepted
Are vertices of each LOD version always loaded into VRAM
Many game engines have texture streaming, which means that not all mip levels of each texture are loaded at all times. The game engine will track which textures are in view and how close up they are ...
4
votes
Accepted
How to determine the object-to-world matrix
No! If you dont have this info and must have a extra frame, just assume the reference frame is a identity matrix*. The point of the extra reference frame is just to be able to move the object but if ...
4
votes
Ordering a set of unorganized points along a curve
After some clarifications, there is probably a much better approach that doesn't even require knowing the parametric form of the curve, and also avoids the potentially problematic numeric minimisation ...
4
votes
exact down sampling and re-triangulation of mesh data(non-convex)
1. Method: Vertex Clustering
This is more or less a low-quality method, but depending on your mesh it could work well.
The basic idea is to partition the space into a regular grid, and then choose ...
4
votes
Accepted
Extract visible vertices from a 3D geometry model
Idea A:
Draw an invisible mesh that will occlude the points we don't want.
Create a mesh from the point cloud.
Render that mesh to a depth buffer but not to the color buffer.
Render the point cloud ...
4
votes
Accepted
How can I perform a triangle inside test in polygon meshes?
There is an alternative method that relies on flood filling. First arrange your edge data into a loop where the edges are forming a counterclockwise loop. Then start at an arbitrary point on the loop ...
4
votes
Best way to remesh a quad 3D mesh?
I'd recommend using OpenVDB. It's quite battle-tested.
Use meshToVolume to voxelize the mesh. Then use volumeToMesh to produce ...
4
votes
Accepted
Triangulation of vertices of an ellipsoid
If you sample the two parameters $\eta$ and $\omega$ with steps $d\eta$ and $d\omega$, then you'll get a grid of points $v_{ij} = f(i\;d\eta,j\;d\omega)$. Any four adjacent points will define a ...
4
votes
Should you measure mesh complexity in triangles or vertices?
Since you're talking about "vertex shaders" and "fragments", I assume that your question is to be interpreted in the context of real-time rendering using the graphics pipeline on a modern GPU through ...
4
votes
Accepted
Creating a Smooth 3D Mesh from a 2D Outline
One algorithm that's pretty good for this, but very difficult to implement is to find the Medial Axis of the shape and then have various profiles that are based on the signed distance from the medial ...
4
votes
Accepted
How to Sample 3D Points Outside and Inside the Mesh Surface
What you want is something that can perform the inside-outside test for meshes. The simplest solution would be to use Trimesh's implementation which can be ran with Embree to accelerate ray queries.
I ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
mesh × 177computational-geometry × 50
3d × 45
geometry × 43
algorithm × 23
triangulation × 14
opengl × 11
rendering × 10
mathematics × 10
model × 10
texture × 9
polygon × 9
transformations × 7
c++ × 7
animation × 6
normal-mapping × 6
raytracing × 5
uv-mapping × 5
shader × 4
data-structure × 3
procedural-generation × 3
subdivision × 3
gltf × 3
cad × 3
tesselation × 3