Skip to main content
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,447
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
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

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
  • 25.2k
5 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,932
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

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

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,447
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
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,441
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,283
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,354
3 votes

Extract visible vertices from a 3D geometry model

Conceptually simplest would be to treat it as a ray-casting problem, representing each point as a small sphere. It should work like the shadow rays in a conventional raytracer: iterate over all of ...
Dan Hulme's user avatar
  • 6,870
3 votes
Accepted

Most efficient way to render many OO meshes in OpenGL

Don't copy around huge chunks of data if you don't have to. I would delay collecting and building the final forest mesh for as long as possible. However when you have multiple of the same mesh that ...
ratchet freak's user avatar
3 votes

How can I perform a triangle inside test in polygon meshes?

I've already commented on the use of flood fill and how it would be better as it's more flexible but another possible solution is scanline. (I say possible because it makes a lot of assumptions about ...
Andrew Wilson's user avatar
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
3 votes
Accepted

Calculating Skeleton-Deformed Mesh Normals

You're right, standard skinning pipelines don't produce correct normals. You get similar problems when using translation on joints, which is very common in facial animation. The only way to get a ...
James Answer's user avatar
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

How can I convert signed distance field to a mesh?

with CGAL you can generate mesh by implicit function. https://doc.cgal.org/latest/Mesh_3/index.html Search for "implicit". There is an example of generating meshes from the funciton of a sphere.
Zesen Qian's user avatar
3 votes

Generate mesh from pointcloud data

You can use CloudCompare or MeshLab to generate a mesh from a point cloud using many algorithms. In my experience, marching-cube method results in accurate meshes.
Ebram's user avatar
  • 41

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