I made a small GH Python script that sorts mesh faces into triangles, quads, and ngons (if possible?!) The script can be seen at the end of the short vid! Enjoy v.redd.it/0p2gf6j7b6d81
πŸ‘︎ 31
πŸ’¬︎
πŸ‘€︎ u/afriedenberg
πŸ“…︎ Jan 22 2022
🚨︎ report
OpenGL Mesh Mesh splitting up in triangles When trying to apply modification by addting normal*factor

I have a basic icosphere which i exported from blender with normals as obj.

Here is what i am doing

mesh->vert[i].position = mesh->vert[i].position + noise(mesh->vert[i].position) * mesh->vert[i].normal

for every vertex.

But the triangles are splitting up wierdly like:

https://i.stack.imgur.com/YXTEA.png

The Exact Code:

for(int i=0;i<customModel->mesh->vertexCount;i++)
		{
			Vert tmp = customModelCopy->mesh->vert[i];
			float x = tmp.position.x;
			float y = tmp.position.y;
			float z = tmp.position.z;
			float elev = 0.0f;
			if (noiseBased)
			{
				elev = noiseGen->Evaluate(x, y, z);
				for (NoiseLayerModule* mod : moduleManager->nlModules)
				{
					if (mod->active)
					{
						elev += mod->Evaluate(x, y, z);
					}
				}
			}
			else {
				float pos[3] = { x, y, z };
				float texCoord[2] = { tmp.texCoord.x, tmp.texCoord.y };
				float minPos[3] = {0, 0, 0};
				float maxPos[3] = {-1, -1, -1};
				elev =  EvaluateMeshNodeEditor(NodeInputParam(pos, texCoord, minPos, maxPos)).value;
				
			}
			tmp.position -= elev * tmp.normal;
			customModel->mesh->vert[i] = tmp;			
		}
		customModel->mesh->RecalculateNormals();

And For Model : https://github.com/Jaysmito101/TerraForge3D/blob/master/TerraForge3D/src/Base/Mesh.cpp https://github.com/Jaysmito101/TerraForge3D/blob/master/TerraForge3D/src/Base/Model.cpp

πŸ‘︎ 9
πŸ’¬︎
πŸ“…︎ Jan 17 2022
🚨︎ report
Non-Convex Mesh Collider. Automatic Generator : Need fast, accurate physics but tired of `painting` each triangle to make convex colliders? Just click `Generate`!Industry-standard automatic generation algorithm that other big engines are using!This asset will save you and your artists tons of time assetstore.unity.com/pack…
πŸ‘︎ 2
πŸ’¬︎
πŸ“…︎ Jan 27 2022
🚨︎ report
Import and Edit STL Files in Fusion 360 - 3 Workflows to clean up the mesh triangles youtu.be/CeMHqa9Pxn8
πŸ‘︎ 5
πŸ’¬︎
πŸ“…︎ Jan 22 2022
🚨︎ report
Will these many triangles affect how my print comes out ? Is it possible to make it smoother and reduce the number of triangles, if so how can I do it ? (Imported as a mesh) v.redd.it/etzmh97j4yk71
πŸ‘︎ 74
πŸ’¬︎
πŸ‘€︎ u/christiandelucs
πŸ“…︎ Sep 01 2021
🚨︎ report
Why auto convex collision is not working? Can I do triangle mesh collisions in UE5? v.redd.it/246sxis0fsz71
πŸ‘︎ 5
πŸ’¬︎
πŸ‘€︎ u/UnidayStudio
πŸ“…︎ Nov 15 2021
🚨︎ report
Need Help Converting Surface to Equilateral Triangle Mesh

Also posted in r/SolidWorks

Equilateral Grid on Organic Surface

I have modeled an organic surface and now want to create a mesh of equilateral triangles that closely represents this surface. It does not have to be a perfect match. I am currently creating the mesh using many 3D sketches. Does anyone have any suggestions on how to do this efficiently?

My current workflow:

1.Model the 3D surface

2.Create a 3D sketch of a triangle with vertices on the surface (orange in picture). Place triangle somewhat randomly in the center of the surface. Fix the 3 vertices.

3.Create a 3D sketch containing a 6 sided polygon (it's not planar so I'm not sure polygon is the correct term) with all vertices on the surface and with two vertices fixed to two of the triangle's vertices from step 1. Turn the polygon into 6 equilateral triangles by drawing a line between each vertex of the polygon to a new central point somewhere in 3d space. Set all lines to equal length. The lines are now all defined and the point that was floating now snaps to one of two possible points in space (there are two solutions, convex or concave).

  1. Do step 3 over and over until most of the surface is covered with triangles but has gaps between strips of the 6 sided polygons. These gaps will have vertex spacing close to the length of the equilateral triangle sides, but not equal, requiring multiple triangles to bridge the gap. This creates a mostly smooth mesh with huge spikes/ridges in these gaps. These ridges are what I am trying to improve.

Note that I have filled in some of the gaps between 6 sided polygons with individual triangles as I was experimenting.

Has anyone done this before? Is there a better way?

πŸ‘︎ 3
πŸ’¬︎
πŸ‘€︎ u/bdsmith21
πŸ“…︎ Oct 21 2021
🚨︎ report
Vertext : Vertext allows you to display any vertex data, such as normals and uvs, directly in the scene view by generating floating numbers next to the vertices and triangles. On top of usual mesh data, you can also display custom data. Works with any render pipeline. Affiliate link / ad assetstore.unity.com/pack…
πŸ‘︎ 3
πŸ’¬︎
πŸ‘€︎ u/UAS_SecretSales
πŸ“…︎ Nov 15 2021
🚨︎ report
Why are the cut curves projected into triangles when I try to flatten the surface? (mesh quality at maximum). And in general, how can such a cylindrical surface be flattened most correctly? Would not want to convert to sheet metal...

https://preview.redd.it/e2ctm4i74cn71.jpg?width=1413&format=pjpg&auto=webp&s=3bc54ce192f18aa731f3212bb4be8819765210e3

https://preview.redd.it/hu07v7i74cn71.jpg?width=1556&format=pjpg&auto=webp&s=5f9be24ae93061b8d082f4626a177164ea39b8f7

πŸ‘︎ 2
πŸ’¬︎
πŸ“…︎ Sep 13 2021
🚨︎ report
Question: How to rotate every individual triangle in a mesh?

Hello, question in the title, I need every triangle of the mesh rotated around its axis, and do it from shader.

May be there better solution for my problem, I need to render a point cloud in opengl es 2.0, so I can't use GL_POINTS

πŸ‘︎ 5
πŸ’¬︎
πŸ‘€︎ u/olesgedz
πŸ“…︎ Sep 22 2021
🚨︎ report
Why are the arrays for vertices, normals and triangles in my mesh empty?

I have exported the Blender Suzanne to Unity.
The mesh is visible and works as expected, however I can't access the vertex, normal or triangle arrays of the mesh, they all have zero length.

Debugging leaves me with the following:

var suzannemesh = Suzanne.GetComponentInChildren<MeshFilter>().mesh;

vertexCount = 2797
vertexBufferCount = 1
vertexAttributeCount = 4
vertices = Vector3[0]
normals = Vector3[0]
triangles = int[0]

As far as I understand, in this case the information is stored somewhere as a buffer? I need to extract the vertices, normals and triangle indices in order to send them to another machine. How do I get this information? Other meshes simply have these properties directly accessible...

πŸ‘︎ 3
πŸ’¬︎
πŸ‘€︎ u/TCW_Jocki
πŸ“…︎ Oct 06 2021
🚨︎ report
Editing out triangle from mesh

I am making a character model and I have been unable to remove this triangle from my mesh without creating either another triangle, or an n-gon somewhere. I am following an old tutorial so as to get an idea of how to create the model and he has made keeping the lowermost ring at 8 edges seem important so I would like to not change that amount if possible, or if not keep it even. This is the only triangle or n-gon on the mesh (mirrored).

The problem triangle

πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/TZWanderer27
πŸ“…︎ Aug 20 2021
🚨︎ report
Creating a triangle mesh representing a convex hull/volume from a set of bounding planes

Hello, I'm looking for the names of some algorithms to create a polygon mesh from a set of bounding planes representing a convex hull/volume.

My initial instinct is to:

  1. get the intersections of all planes, creating a set of lines
  2. clip the lines against the plane, getting line segments
  3. triangulate from there

but I'm not sure if the plane-plane intersection will create precision errors which could make matching line (segments) together difficult. I could use the info about which planes clip the lines in order to match them together, but I want to know if there are existing (simpler) solutions I can look at

πŸ‘︎ 5
πŸ’¬︎
πŸ‘€︎ u/proboardslolv5
πŸ“…︎ Aug 17 2021
🚨︎ report
Is having triangle base subdivided mesh problematic for texturing and applying materials ?
πŸ‘︎ 3
πŸ’¬︎
πŸ‘€︎ u/SnooPaintings8310
πŸ“…︎ Aug 09 2021
🚨︎ report
A Single Triangle On A Mesh Collider Is Not Convex?

I've been messing around in unity making a mesh editor and noticed that a Mesh Collider with a single triangle works in non-convex mode as expected, but in convex mode, it turns the triangle into a quad. I need to be able to use a Rigidbody and so have to use convex mode, but is there a way to keep the triangles?

The triangle is \"simplified\" to a quad

πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/OrbitalMike782
πŸ“…︎ Aug 23 2021
🚨︎ report
I was drawing out some mesh topology networks and decided to count the edges, see if there was a pattern. I immediately recognized this pattern from pascal’s triangle and wonder why they were coordinated. Does anyone have an answer?
πŸ‘︎ 62
πŸ’¬︎
πŸ‘€︎ u/MattCollNatt
πŸ“…︎ May 23 2021
🚨︎ report
I am trying to implement a simple GUI/window layout management system in my engine. Currently, I am rendering each component as just a quad (2 tris), but I am seeing weird flickering issues where the bottom triangles in the quads are flickering. I am using a mesh shader to generate the quads. v.redd.it/734wb21suu961
πŸ‘︎ 23
πŸ’¬︎
πŸ‘€︎ u/Mugen-Sasuke
πŸ“…︎ Jan 07 2021
🚨︎ report
Ideal/optimized triangle mesh from heightmap

I've been doing terrain rendering for a long while (decades) and now have a new application that's non-gamedev/rendering related that I've been able to apply terrain rendering strategies to over the last few years. My go-to programming hobby terrain rendering engines has always been a sort of static ROAM type algorithm for generating a mesh from a heightmap, recursively subdividing triangles where the center of their edge deviates from the heightmap at that XY point, per an error threshold.

The situation is that I'd like to generate meshes that are less "quantized" looking, either somehow displacing the final vertex positions horizontally per the heightmap's gradient at that location and then updating the vertices' Z from the heightmap, maybe iteratively shift around the verts along the heightmap and conform them to the mesh after subdividing down to an initial starting mesh, or maybe using some other triangulation technique entirely. The use case I'm looking at is exporting a mesh for CAD purposes, not for rendering, so the processing time is not particularly important, though I'd like to not just create a fully dense mesh and then decimate that - even though that seems to be the sort of result that I am aiming for. The goal is to get rid of extraneous triangles that don't contribute any detail (of course!) without the strategy resulting in telltale artifacts like ROAM-style subdivision does. The sort of meshes being exported are not terrains, they're more like 2.5D CAD models that can have hard edges, smooth curves, undulating contours, etc... and the triangle subdivision strategy just doesn't capture hard edges very well.

I'm probably chasing something that's a waste of time, I just thought I'd put this out there to see if anybody had any thoughts/ideas on alternative ways to generate a mesh from a heightmap without just spitting out a dense mesh or relying on the quantized look that subdivision can produce. The heightmaps can be up to dozens of gigapixels which makes the dense mesh decimation seem like it'd just be painfully slow, and a dense mesh prohibitively gigantic for the hardware my end-users tend to be running (they're not gamers so they're running 10+ year old computers in many cases, fun stuff).

Anyway, thanks for reading :)

πŸ‘︎ 4
πŸ’¬︎
πŸ‘€︎ u/deftware
πŸ“…︎ Apr 22 2021
🚨︎ report
Determine visibility of mesh triangle from a given a point of view

Hi.

I hope this is the right place to post to but I figured it is related to graphics programming.

I'm working on a project for which I need to determine whether a triangle (3x Vector3 vertices in world space) is occluded (both partially and fully) by another triangle when given the view matrix of a camera. Currently, I'm only able to conclude whether a triangle is within the camera's view frustrum but not whether it is ACTUALLY visible or if another triangle is placed in front of it. I don't need to perform any calculations afterwards, I'm simply interested in knowing whether triangles collide when viewed from a certain camera position.

I know all the mesh data in world coordinates (triangles, vertices, etc.) as well as camera intrinsics and its view and projection matrix. Now, is there some way for me to determine actual visibility and occlusion of triangles?

Any help is appreciated.Thanks.

EDIT: I forgot to mention that I'm doing all of this in Unity / C#. So, I guess I'm asking if there's a way to implement some sort of occlusion culling using the data I have.

πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/vanilla_thvnder
πŸ“…︎ Apr 16 2021
🚨︎ report
Since people were wondering about how Mario Kart Tour compared with Mario Kart Wii graphics-wise, a simple proof: the mesh of Maple Treeway has more than 7 times the triangles in Mario Kart Tour and doesn't use "cardboard tricks" (Mario Kart Wii and Mario Kart 7 models from The Models Resource) reddit.com/gallery/lgh8m2
πŸ‘︎ 63
πŸ’¬︎
πŸ‘€︎ u/Ludwig_von_Wu
πŸ“…︎ Feb 10 2021
🚨︎ report
Is there a way to hide the triangle/mesh grid around complex objects like cars?

I am trying to represent a car in some drawings but they all have this triangle mesh surface that looks horrible in anything other than a rendering.

πŸ‘︎ 10
πŸ’¬︎
πŸ‘€︎ u/eggs-benedict
πŸ“…︎ Feb 01 2021
🚨︎ report
Can see triangles from the same mesh through some triangles

I can see the triangles of the same mesh through (some of) the triangles. I'm struggling to find the words to describe it, so I've added a screenshot and a GIF below. I am hoping I can get some suggestions as to what the problem could be.

Screenshot

GIF

I've taken a look with RenderDoc and noticed that my depth attachment is either 0 or 1. Never between: https://i.imgur.com/AfWUsmA.png. Is this the problem? If so how do I fix it?

Thanks.

EDIT: I've quickly recreated the problem with 2 cubes (lower cube is in front): https://i.imgur.com/c2mnH1U.png

Edit: I will also note that I have changed my coord system to (forward=+1, up=+1) using glm GLM_FORCE_LEFT_HANDED.

Edit: Depth texture setup:

vk::Format depthFormat = m_context->GetDepthFormat();

vk::ImageCreateInfo imageInfo{};
imageInfo.imageType = vk::ImageType::e2D;
imageInfo.format = depthFormat;
imageInfo.extent.width = m_swapchainWidth;
imageInfo.extent.height = m_swapchainHeight;
imageInfo.extent.depth = 1.0f;
imageInfo.mipLevels = 1;
imageInfo.arrayLayers = 1;
imageInfo.samples = vk::SampleCountFlagBits::e1;
imageInfo.tiling = vk::ImageTiling::eOptimal;
imageInfo.usage = vk::ImageUsageFlagBits::eDepthStencilAttachment;

allocator.Allocate(imageInfo, VMA_MEMORY_USAGE_GPU_ONLY, &m_depthStencil.Image, &m_depthStencil.Allocation);

vk::ImageViewCreateInfo imageViewInfo{};
imageViewInfo.viewType = vk::ImageViewType::e2D;
imageViewInfo.image = m_depthStencil.Image;
imageViewInfo.format = depthFormat;
imageViewInfo.subresourceRange.baseMipLevel = 0;
imageViewInfo.subresourceRange.levelCount = 1;
imageViewInfo.subresourceRange.baseArrayLayer = 0;
imageViewInfo.subresourceRange.layerCount = 1;
imageViewInfo.subresourceRange.aspectMask = vk::ImageAspectFlagBits::eDepth;
if (depthFormat >= vk::Format::eD16UnormS8Uint)
{
    imageViewInfo.subresourceRange.aspectMask |= vk::ImageAspectFlagBits::eStencil;
}

m_depthStencil.View = device.createImageView(imageViewInfo);

Renderpass setup:

vk::AttachmentDescription colorAttachment{};
colorAttachment.format = m_swapchainFormat;
colorAttachment.samples = vk::SampleCountFlagBits::e1;
colorAttachment.loadOp = vk::AttachmentLoadOp::eClear;
colorAttachment.storeOp = vk::Atta
... keep reading on reddit ➑

πŸ‘︎ 3
πŸ’¬︎
πŸ‘€︎ u/stuart6854
πŸ“…︎ Feb 10 2021
🚨︎ report
Game Engine Dev Log: Physics Visualization + Triangle Mesh Collisions youtu.be/qQK7rssTVV4
πŸ‘︎ 399
πŸ’¬︎
πŸ‘€︎ u/UnidayStudio
πŸ“…︎ Jun 06 2020
🚨︎ report
Hi everyone. I just want to know I modelled my bent beam correctly. It suppose to be a solid with no moving parts. However, my problem is that when I add a mesh to it, the triangles are all distorted & the beam looks β€˜crushed almost’. reddit.com/gallery/n8lkmx
πŸ‘︎ 5
πŸ’¬︎
πŸ‘€︎ u/Stiffler786
πŸ“…︎ May 09 2021
🚨︎ report
Weird triangles across all my edges after baking. What am i doing wrong? High poly is the same mesh but with vertex colours. reddit.com/gallery/klq7ky
πŸ‘︎ 20
πŸ’¬︎
πŸ‘€︎ u/Sandeep184392
πŸ“…︎ Dec 28 2020
🚨︎ report
Directly rendering mesh triangles (without using the mesh.vertices field) with vertices stored in a custom data type

I am making a procedural chunked terrain LOD system. I store the chunk data in a quad-tree. Each chunk has 9 vertices but the chunks differ in size. Because the border vertices of the chunks overlap, I do not store information for all 9 vertices in every chunk, but instead use the information from the neighboring chunks.

I want to combine all chunks into a single mesh, but this is really hard to do since indexing the vertices and triangles from 0-n is impossible (the chunks differ in size so there is no particular grid or order for the vertices). One option is to just add 9 vertices from each chunk to the final mesh, but I really want to avoid this since my goal is creating huge terrains and I want to keep the memory consumption to a minimum (8 of the 9 vertices will overlap, essentially doubling the total number of vertices).

Rendering individual triangles from within each chunk is trivial since I have direct access to all 9 vertices.

So my question is: Is there a way to directly render triangles without having to assign the mesh.vertices field? I want to avoid writing a whole renderer from scratch since I'm better off just writing my own engine at that point.

Any help is appreciated, even just pointing me in the right direction or providing useful resources to learn from. Thank you in advance!

πŸ‘︎ 3
πŸ’¬︎
πŸ‘€︎ u/Log_Dogg
πŸ“…︎ Apr 01 2021
🚨︎ report
After applying 3d texture with a height map for 3d printing, I click make mesh but it still stays looking like this. And doesn't return to the applied solid looking view. Is this normal. Or should it look like the finished object. How do I switch the triangles off. Cheers
πŸ‘︎ 3
πŸ’¬︎
πŸ‘€︎ u/Damomerlin
πŸ“…︎ Feb 12 2021
🚨︎ report
Need Help Converting Surface to Equilateral Triangle Mesh

Equilateral Grid on Organic Surface

I have modeled an organic surface and now want to create a mesh of equilateral triangles that closely represents this surface. It does not have to be a perfect match. I am currently creating the mesh using many 3D sketches. Does anyone have any suggestions on how to do this efficiently?

My current workflow:

1.Model the 3D surface

2.Create a 3D sketch of a triangle with vertices on the surface (orange in picture). Place triangle somewhat randomly in the center of the surface. Fix the 3 vertices.

3.Create a 3D sketch containing a 6 sided polygon (it's not planar so I'm not sure polygon is the correct term) with all vertices on the surface and with two vertices fixed to two of the triangle's vertices from step 1. Turn the polygon into 6 equilateral triangles by drawing a line between each vertex of the polygon to a new central point somewhere in 3d space. Set all lines to equal length. The lines are now all defined and the point that was floating now snaps to one of two possible points in space (there are two solutions, convex or concave).

  1. Do step 3 over and over until most of the surface is covered with triangles but has gaps between strips of the 6 sided polygons. These gaps will have vertex spacing close to the length of the equilateral triangle sides, but not equal, requiring multiple triangles to bridge the gap. This creates a mostly smooth mesh with huge spikes/ridges in these gaps. These ridges are what I am trying to improve.

Note that I have filled in some of the gaps between 6 sided polygons with individual triangles as I was experimenting.

Has anyone done this before? Is there a better way?

πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/bdsmith21
πŸ“…︎ Oct 21 2021
🚨︎ report

Please note that this site uses cookies to personalise content and adverts, to provide social media features, and to analyse web traffic. Click here for more information.