Questions tagged [mesh]

A collection of vertices, edges and faces that defines the shape of objects

Filter by
Sorted by
Tagged with
0 votes
1 answer
70 views

How to improve performance of code for finding climbing annotations?

The goal is to be able to climb any ledge, even if the ledge is an odd shape. Therefore, I found a script that searches for viable "climb holds" along any mesh of any shape. You can then use ...
  • 3
0 votes
0 answers
97 views

How to make voxel terrain mesh

I've been trying to make a procedurally generated "pixelated" (semi voxel) terrain (using Unity), as seen in Sebastian Lague's video on simulating ecosystems. (Image attached) I've tried ...
  • 1
1 vote
1 answer
47 views

How to handle overlapping meshes?

So I want to note that I am a beginner at game dev but an okay coder. I wish to make a game in which the character changes clothes. I have a character and a few clothing meshes that all have the exact ...
  • 111
0 votes
1 answer
63 views

Change Mesh face colors / materials at runtime

I'm trying to change the color/material of the faces on my object at runtime. My object has a default SpatialMappingWireframe to begin with: And I'm trying to assign new colors on start like so: <...
0 votes
1 answer
29 views

Attaching gameObjects to a moving Mesh by position retrieved from triangle index

I am trying to attach GameObjects testAttach to triangle indices in trianglesToAttachTo on a mesh, call it goMesh. I've ...
  • 236
0 votes
1 answer
27 views

Updating UI Graphic vertex positions through code

I'm trying to update the positions of vertices in my project. I'd been using Unity's built in Line Renderer previously which worked fine, but had some problems when points got too close to each other. ...
0 votes
0 answers
40 views

Creating square mesh within a mesh

I am creating a mesh using this code snippet. ...
0 votes
1 answer
50 views

Blender exported model is giving better FPS than creating the meshes in Unity

I am experimenting with Hex grid layouts and testing the most efficient way of building a hex map. I tried 2 things: Build my own hex mesh using 6 triangles and 7 vertices Use blender to create a Hex ...
  • 101
0 votes
0 answers
49 views

How to tear a hole in cloth sail rendered as a plane mesh animated with a shader?

I have a procedurally animated sailcloth. It's just a square flat plane mesh with 144 vertices. I use a shader to manipulate the vertices and make it "fill" with the wind. All of that works ...
1 vote
1 answer
145 views

Seamless random morphing hex tiles' vertices in Unity3D?

I have a hex based, fully flat tilemap the tiles' mesh currently isn't generated, but a static mesh file containing 6 vertices, UV mapping, etc. Then I saw this picture on Unity Answers: I'd like ...
  • 641
0 votes
1 answer
64 views

Custom world map chunks not loading correctly

...
  • 420
0 votes
0 answers
40 views

Fill the mesh gap when joning two seprate mesh

I am looking for a way to fill the gap of a mesh based on intersection of two planes. Sorry maybe I am not able to properly express the problem. So here is the picture representation for more ...
0 votes
0 answers
34 views

Formula for calculation for total size of texured mesh of a home in gigabytes

I'm trying to calculate the size in GB for textures + meshes for someone's home of size 1500 sq ft containing (around 12K total objects) for 3 LODs. I understand this number can vary quite a bit ...
0 votes
1 answer
111 views

Sphere rolling shader like ice cream

now I can make cylinder shape with shader. But what I want to do is like picking up ice cream with an ice cream scoop. How can I do this?
0 votes
1 answer
72 views

Does mesh contain a color?

I'm developing a simple 3D engine for education purposes. I'm wondering whether a mesh contains a color of each vertex? Because I saw somewhere that mesh does not contain a color at all. If so, then ...
  • 3
0 votes
0 answers
14 views

Mesh appearing 'see-through' when exporting from Blender to UE4 [duplicate]

The right wing of the dragon model is appearing see-through upon exporting, anything to double check for solutions? Thanks
0 votes
0 answers
39 views

Rotating mesh on lineRenderer to make mesh appear flat

im working on a custom tool in Unity that allows me to draw roads in a similar way as City Skylines. I spawn 2 points on a plane and draw between them adding points on the endpoint to create a chain ...
0 votes
2 answers
234 views

How to generate mesh for any shape?

I have shape stored in sprite. Shape is stored as white color. I want to generate mesh for given shape. Maybe just like sprite collider do. What algorithm I have to choose? Are there any libs for ...
0 votes
1 answer
213 views

Generating UVs for an annular sector/ wedge-shaped procedural mesh

I am using code to generate a mesh to show the firing arcs for a tabletop-style game I am working on. But when applying a material to it, I only get a solid color. Here you can see the custom mesh ...
0 votes
1 answer
113 views

My First Person Player Capsule Is Always About 6 inches Under The Floor

Here is the problem. This is the exterior of the hallway in which my player capsule is standing. Notice the bottom of the capsule poking through the floor. This is the interior of the hallway, notice ...
0 votes
0 answers
279 views

Runtime Mesh Simplification (Decimation) in Unity

I'm trying to runtime decimate a mesh in Unity. (Open to new methods other than the repo I found.) Currently trying to get this to work https://github.com/Whinarn/UnityMeshSimplifier/ As a sanity ...
  • 236
1 vote
1 answer
194 views

UE4: How to make UProceduralMeshComponent a solid body, not just a surface around volume?

I generated the UProceduralMeshComponent and set collision enabled to ECollisionEnabled::QueryOnly. But I get ActorEndOverlapEvent if I stop touching the mesh border even if I still inside of mesh ...
  • 241
0 votes
0 answers
251 views

Outline Mesh Unity 2D

I have a procedurally generated mesh in Unity and I was hoping to outline the edges of it. I've got a small shader for an outline but instead of it working around the edge the mesh ends up filled with ...
  • 223
1 vote
1 answer
323 views

How to make a code-generated mesh interact with a rigidbody?

I'm using a sphere and an empty game object that generates a mesh upon playing/starting. On the mesh, I place a Mesh Collider component with ...
0 votes
1 answer
105 views

Given a 3D grid-based map system, how to find the middle point of an edge of the mesh of a tile on the grid

I have a grid-based map system. The grid is aligned to the X and Z axes. The tiles on said map are 3-dimensional, but flat, and can be located anywhere on the Y-axis. If I need to get a Vector3 of ...
0 votes
0 answers
142 views

Unity - Creating a plane that you can deform on runtime creating a path

So I'm doing this project which is similar to Castle Raid (https://youtu.be/ZiAv1smyCKM) And I'm having trouble implementing the path creation by deforming a mesh and making the players move on it. I ...
  • 31
0 votes
1 answer
86 views

How to simplify a 2D mesh with messed up topology while keeping as much of the shape as possible and as efficiently as possible?

I'm trying to figure out a way to simplify any 2D mesh during runtime in Unity with broken up topology so that it will have more uniform topology and retain as much of its original shape as possible. ...
1 vote
1 answer
168 views

Having trouble implementing edge collapse operation with half-edge data structure

I'm trying to make a half-edge data structure to interact with meshes in 2D space in Unity but I'm having trouble with implementing an edge collapse operation that merges one vertex into its twin half-...
1 vote
0 answers
30 views

Splitting the mesh of a plane into submeshes

I am struggling a bit with this. I am trying to split a plane recursively into subplanes, so that frustum culling is more efficient. I am doing that by dividing the indices into the 4 subplanes for ...
2 votes
0 answers
428 views

How to project 3D meshes onto a 2D plane producing a 2D polygon silhouette?

I would like to project a number of separate 3D meshes onto a 2D plane and create a 2D polygon representing the outline of all the meshes. I would also like to to create multiple 2D polygons if the ...
  • 21
0 votes
0 answers
59 views

How do I distinguish if parts of a mesh are together or separate/disconnected?

Let's say I have a GameObject that has a MeshFilter with this mesh data. These shapes are generated at runtime and all considered 1 mesh under the MeshFilter. What I want to do is separate the two, ...
1 vote
0 answers
29 views

Problem detecting outer edges properly when deforming mesh dynamically

I've been using this edge code (https://answers.unity.com/questions/1019436/get-outeredge-vertices-c.html) for detecting outer edges. ...
1 vote
0 answers
154 views

How do I cut mesh partially with EzySlice?

I'm using the EzySlice framework to cut meshes (https://github.com/DavidArayan/ezy-slice). So far it can cut a mesh but infinitely but I want to be able to cut partially like this: As you see in the ...
0 votes
1 answer
954 views

why does my mesh render on top of UI?

I've got some UI elements and a 3D mesh imported from blender. I've tried stuff like sorting layers, so that I render my 3D mesh below a canvas UI element(side panel), for which I put my 3D mesh ...
0 votes
1 answer
774 views

How can I create a custom size plane without scaling in Unity by code?

I'm planning create a plane with the size like 16x1x16, however, I wanna the scale of it is always 1x1x1. I found something useful information Unity change size of cube mesh. It aims to a cube mesh, ...
0 votes
0 answers
62 views

Changing block shape to blend with adjacent blocks

I am in the process of programming a Minecraft like game in Unity. I am currently implementing the block mechanics. My goal is that when a block is placed, it has an effect on its neighboring blocks ...
0 votes
1 answer
48 views

gl.drawArrays() not rendering whole mesh

I have a mesh that is generated using the marching cubes algorithm that is drawn using gl.drawArrays(), however the whole mesh isn't rendered, only part of it. I checked if the count I was specifiying ...
0 votes
0 answers
243 views

Performant way to generate a cylindrical mesh along a dynamic spline

I am working on a mobile game, in which I am tiling a cylindrical mesh along a dynamic spline. The points of the spline are changing each frame, so the vertex positions and normals of the tiled mesh ...
1 vote
0 answers
88 views

Why instantiated Static Mesh gets scaled in Unreal Engine 4? [closed]

Building a project in Unreal Engine 4.26 while trying to increase performance of the videogame I ended up using instances of static meshes where possible. This generated an issue: My instantiated ...
0 votes
1 answer
156 views

How to map texture pixels to the corresponding 3D positions?

I have a mesh stored in .obj format with a texture image in .png format. For any "defined" pixel in the texture image, I'd like to compute the corresponding 3D coordinates when the texture ...
  • 101
0 votes
1 answer
259 views

Improve cube rendering performance in lwjgl

I've been coding a minecraft-like game in lwjgl using cubes. I've reached a point where I can render 6 chunks of blocks before it starts lagging. I've searched online for optimizations and one of the ...
0 votes
1 answer
54 views

How can I create a good physics colliders for these models in Unity3D

I need to make a 3D colliders in Unity with those forms. I don't want to use any Asset Store asset if it's possible. There are two models: both are cylinders but they have some deformations (see image ...
0 votes
1 answer
41 views

filter camera output by mesh

(skip to edit for the actual problem) I have a simple plane mesh generated via script (has arbitrary shape). I want the shader to discard (set to black) all pixels that aren't passing through that ...
  • 1
0 votes
0 answers
51 views

Unity 3D - CSG / Geomodding meshes runtime

Although I'm not very advanced in Unity, I've been looking into CSG/boolean mesh deformation to see what's possible. I want to break a hole in basic wall meshes at the point the player clicks on, ...
2 votes
1 answer
180 views

How to make a custom 3d view cone that mixes orthographic and perspective cameras

I'm trying to make a camera that displays objects the same height no matter the distance, but still changes width relative to distance. Similar to having an orthographic view vertically and a ...
0 votes
0 answers
414 views

How to ensure Unity does not rearrange the sub-meshes of a mesh on import?

having a bit of a head scratcher problem here. I have my artist's making multiple unique meshes in Maya that contain 3 materials. Each material is assigned to a sub-mesh in a specific order. This ...
1 vote
0 answers
68 views

How do I play multiple animations at once with an MonoGame skinned mesh?

I am working with the SkinnedMesh from this tutorial. I am at the point where I want to let my character run (which already works), but when I press the punch key on my keyboard, I only want the upper ...
0 votes
0 answers
41 views

How can I achieve this "stroked lines" effect?

I have a collection of arbitrary vertices and edges that are connected, but which do not necessarily form triangles. These vertices and edges mostly fall along a flat plane, but have some height ...
  • 591
0 votes
1 answer
308 views

Procedurally generated mesh makes weird shapes

I'm developping a procedural terrain generator in Unity 2020.3, using Sebastian Lague's tutorials and knowledge i've gathered through college projects. The heightmap looks just fine, and i had no ...
1 vote
0 answers
115 views

How can I calculate the inertia tensor of a hollow object defined by a triangle mesh?

I want to calculate the mass, center of mass, and inertia tensor of player created objects. Some of the objects will be hollow instead of solid. I am creating a closed triangle mesh for their object. ...
  • 129

1
2 3 4 5 6