28 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 ...
Noah Witherspoon's user avatar
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 ...
Julien Guertault's user avatar
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 ...
joojaa's user avatar
  • 8,437
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 ...
Nathan Reed's user avatar
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 ...
Dragonseel's user avatar
  • 1,810
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 ...
trichoplax is on Codidact now's user avatar
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 ...
lhf's user avatar
  • 724
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'...
Florent Tournade's user avatar
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 ...
GroverManheim's user avatar
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 ...
joojaa's user avatar
  • 8,437
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 ...
ChaimDryzun's user avatar
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 (...
lfgtm's user avatar
  • 456
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 ...
Peter's user avatar
  • 529
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 ...
emackey's user avatar
  • 369
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 ...
Nathan Reed's user avatar
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 ...
Dragonseel's user avatar
  • 1,810
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 ...
Martin Ender's user avatar
  • 2,730
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 ...
Julien Guertault's user avatar
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 ...
joojaa's user avatar
  • 8,437
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 ...
Taylor's user avatar
  • 151
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 ...
gilgamec's user avatar
  • 901
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 ...
Michael Kenzel's user avatar
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 ...
user1118321's user avatar
  • 3,411
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 ...
Hubble's user avatar
  • 344
4 votes

How to Sample 3D Points Outside and Inside the Mesh Surface

I have a few suggestions: Partition the volume by using tetrahedra within the mesh, and outside of it (in the cube). Set the probability to sample each tetrahedron to its volume divided by the inside/...
lightxbulb's user avatar
  • 2,226
4 votes
Accepted

Why is the valence of regular vertices 6?

If require that all faces have the same number of sides $s$ and require that all vertices also have a certain valency $t$. We see that the following relation between edges, and faces hold for a ...
Reynolds's user avatar
  • 1,238
4 votes
Accepted

Computing vertex normals in mesh triangle soup

A very simple, but computationally expensive, way to do this is to pick a triangle, preferably one that you know has the winding you want. Then search every triangle in the soup for triangles that ...
pmw1234's user avatar
  • 3,219
4 votes
Accepted

What is the difference between a "meshlet" and just a small mesh?

A "meshlet" is a concept built around the specific architecture of how shaders work. Shaders are invoked in work groups, even when shader stages don't explicitly represent that concept in ...
Nicol Bolas's user avatar
  • 9,792
3 votes
Accepted

Weird rendering in rectangle mesh shader AKA Why has my basic shader become a modern art generator?

I think you are not constructing the index buffer correctly. Firstly you only need 1 degenerate vertex to terminate each triangle-strip row. You also should not need any special handling for odd/...
PaulHK's user avatar
  • 2,322
3 votes
Accepted

What is better to use for real-time computing Mesh - Plane intersection points, GPU or CPU?

doing the calculation to decide whether a point is on one side of a plane or the other is very simple (a single dot product). Doing that 3 times and having a special case when they don't match to ...
ratchet freak's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible