Questions tagged [mesh]

Do NOT use for questions about mesh-networks. Use [mesh-network] instead. A mesh is a collection of vertices, edges, and faces that defines the shape of a polyhedral object in 3D computer graphics and solid modeling.

From Wikipedia:
A polygon mesh is a collection of vertices, edges and faces that defines the shape of a polyhedral object in 3D computer graphics and solid modeling. The faces usually consist of triangles, quadrilaterals or other simple convex polygons, since this simplifies rendering, but may also be composed of more general concave polygons, or polygons with holes. Check for more Mesh Detail

2641 questions
8
votes
1 answer

Matlab stops interpolating colors on a mesh correctly if it is larger than 120 triangles

I'm trying to draw a large mesh in Matlab using the trimesh function, with the z coordinate of the vertices controlling the color. Unfortunately, Matlab stops interpolating colors correctly when the size of the mesh exceeds 120 triangles. Here's a…
Neil Forrester
  • 5,101
  • 29
  • 32
8
votes
1 answer

Adding geometry to a three.js mesh after render

I'm creating a mesh with a THREE.Geometry instance, then populating the geometry's vertices and faces arrays dynamically. The geometry is iteratively refined, adding additional vertices and faces at each iteration. If I refine the geometry before…
lharper71
  • 111
  • 1
  • 6
8
votes
2 answers

Three.js multiple materials on object loaded via OBJMTLLoader

I have ".obj" and ".mtl" files of a model and I'm loading it via OBJMTLLoader. ".mtl" specifies texture to apply to a model, and three.js loads model and renders it with applied texture just fine. But here's the thing. Once an object is loaded, I…
kangax
  • 38,898
  • 13
  • 99
  • 135
8
votes
2 answers

How to merge adjacent coplanar faces on a mesh

I am looking for a method / algorithm that will allow me to merge several adjacent coplanar faces on a 3d mesh into a single face. I am hoping that this will optimize my mesh generation program, because right now it generates many 'little'…
Ross Oliver
  • 1,075
  • 1
  • 11
  • 15
7
votes
1 answer

Lightweight OBJ mesh file loader for C/C++?

I'm looking for a simple lightweight Wavefront OBJ mesh file reader for C or C++. (ie. given a mesh in OBJ format, read it in from a file, and make it accessible, preferably as a list of vertices and triangles.) Recommendations? It doesn't need to…
batty
  • 7,528
  • 9
  • 31
  • 30
7
votes
1 answer

Struggling to create watertight meshes out of point cloud data using Open3D in Python

I am trying to create a watertight mesh out of point cloud representing organ contour data from cone beam CT images. My goal is to take two meshes and calculate the volume of intersection between the two of them. I have tried using each of the…
Conor
  • 71
  • 1
  • 2
7
votes
4 answers

Calculate the centroid of a 3D mesh of triangles

I'm trying to calculate the centroid of a 3D mesh of triangles. EDIT : it turns out I was not, I was trying to calculate the center of gravity, which is not the same My code is made of bits and pieces, mainly : This nice paper by Cha Zhang and…
geriwald
  • 190
  • 1
  • 4
  • 17
7
votes
2 answers

MeshLab: Render obj file with my own computed normals

I am trying to write a obj file with vertices. I am computing the vertex normals in my code and writing to this file as well. When I try to render this file in Meshlab it reads the vertices correctly, but when I go to 'Render->Show vertex normals',…
rkd
  • 401
  • 2
  • 5
  • 10
7
votes
1 answer

3D Gridded Data Interpolation in Julia

I'm strugling to convert some MATLAB code into Julia. I have some 3D gridded data (temperature that varies bi-dimensionally and over time) and want to change from a (x,y,t) mesh to a more loose (xi,yi,ti) mesh. In MATLAB it would be a simple…
7
votes
1 answer

Generating country-shaped geometry on the surface of a sphere in Godot

I am currently working on a game in Godot which involves rendering countries on a globe. I have very little prior experience with Godot, but have experimented with it in the past. I am using this data from Natural Earth for country borders, and have…
TXP Ghost
  • 71
  • 1
7
votes
2 answers

Remove occluded faces on a closed mesh

I need to remove some hidden faces that are inside a closed triangular mesh. I've found a way to do it using MeshLab, but there are two problems: 1) the article says that it could fail in some cases (can you image in which cases?) and 2) I would…
7
votes
1 answer

Procedural circle mesh with uniform faces

I'm trying to create a 2d circle procedurally with uniform faces like so. Normally, I would create it with a triangle fan structure, but I need faces to be roughly identical. I looked for examples, but I could only find "cube to sphere" examples.…
JFC
  • 575
  • 11
  • 25
7
votes
1 answer

PyMesh Installation on Python 3.6 Windows

I am trying to install Pymesh on Python 3.6. In my first try, I installed through pip, however it installed a wrong PyMesh than I wanted. It installed the following, https://pypi.org/project/pymesh/, while I wanted…
Jesh Kundem
  • 960
  • 3
  • 18
  • 30
7
votes
1 answer

Detecting openings/holes in a closed triangular mesh?

I want to detect (and close) openings and holes/hollowed out parts of a closed mesh. I know that for an open mesh, this can be done by finding the boundary edges (edges belonging to only one triangle) as described here. But what about a closed mesh,…
Moody
  • 1,297
  • 2
  • 12
  • 21
7
votes
2 answers

Creating a 2D Circular Mesh in Unity

I currently have a "CreateMesh" script that can be put as a component of an object with a Mesh Renderer, and a Mesh Filter, and a 2D mesh is created with a polygon collider in the dimensions of the mesh given a "MeshType" variable is set to either…
Tom Ryan
  • 397
  • 2
  • 6
  • 26