Questions tagged [vertex]

In geometry a vertex is a point defining the corners of polygons or intersections of lines. A triangle for example is defined by 3 vertices with lines between them. In 3D-graphical APIs like OpenGL and Direct3D a vertex is a data structure containing information about the positions, normals, colors, tangents etc of the points defining the triangular faces of 3D-meshes.

Filter by
Sorted by
Tagged with
1 vote
1 answer
38 views

D3D11 Indices are Messed Up and Doesn't Follow my Primitive Topology

I am attempting to create a cube but I have been stuck on this for a very long time to no avail. My results look like this: All of my indices are messed up! Some are connected to the wrong vertices ...
user avatar
  • 126
1 vote
1 answer
50 views

Vertex color values are not smoothly transitioning/interpolating in Godot shader

I'm trying to write a shader for terrain that will color the mesh based on slope angle, ie color the sides of mountains or other steep surfaces a different color than the ground. In my shader I am ...
user avatar
1 vote
1 answer
21 views

Get local position of a skinned vertex

I have a formula for skinning, where a vertex is attached to 2 joints with some proportions: B = M1*A*K1 + M2*A*K1 Where: K1 and K2 are the proportion ...
user avatar
0 votes
1 answer
124 views

What is the purpose of tangent and bitangent vertex attributes?

Every vertex of a 3D mesh has position and some optional values like texture coordinates, vertex color, and normal, but also tangent and bitangent vectors. While the purposes of texture coords, vertex ...
user avatar
  • 103
0 votes
1 answer
113 views

Interpolate colors between vertex in a plane

So I have this plane generated with two different Perlin noises. It has mainly 3 regions, divided by color. I want to smooth out the lines, to create a "gradient" so there are no abrupt ...
user avatar
  • 5
1 vote
1 answer
74 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-...
user avatar
0 votes
0 answers
20 views

What is the most efficient way to keep a vertex contained within a network of edges/vertices?

Given this picture, I want to move or displace the red vertex but I don't want it to pass the orange edge boundaries or the blue vertices. I either want to stop the red vertex when it gets close ...
user avatar
1 vote
1 answer
63 views

How do I get a range of vertices/edges using a half-edge data structure?

I have a half-edge data structure in 2D which loops through edges in a triangle in a clockwise order. I'm trying to get a range of vertices within a target vertex. Let's say I want all vertices within ...
user avatar
4 votes
1 answer
110 views

I want to cut a pizza slice out of a 2D circle using mouse input in Unity. What data structures and geometric formulas would be best for this?

I understand this is probably not an easy task considering I haven't found any code examples online that do something like this but if I wanted to take in mouse input lets say during a drag and use ...
user avatar
1 vote
0 answers
24 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. ...
user avatar
1 vote
0 answers
72 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 ...
user avatar
0 votes
1 answer
81 views

How do I make sure the order of my vertices are always clockwise when creating new triangles?

In 2D I'm trying to insert a new vertex in my mesh and creating new triangles using that new vertex sort of like the red vertices in the picture shown: However, I'm having trouble with figuring out ...
user avatar
0 votes
0 answers
49 views

How can I distort a 2D mesh when moving one (or more) vertices?

I use Blender to show examples. I want to do this in Unity on runtime. The outside corner vertex will be moved passed edge and the triangles appearance will be messed up like it shows on the second ...
user avatar
0 votes
1 answer
49 views

Why does my deformed mesh's outer shape look awkward when none of the inner mesh vertices seem to be moved passed the outer vertices?

I'm trying to deform my mesh but the vertices cause these straight edges to occur where the inner mesh passes the outer mesh and create an awkward shape. Why does the orange outline of the mesh not ...
user avatar
1 vote
2 answers
61 views

How do I distinguish edge vertices?

I'm trying to displace the vertices highlighted in red but the way I'm selecting the vertices for displacement is by a distance radius based on the position I click with my mouse and I end up ...
user avatar
0 votes
0 answers
31 views

Having problems with mouse drag mesh vertex deformation in 2D

This is in 2D space. I want to create a mouse dragging mechanic like the one shown in the picture where I find a range of vertices relative to the position I first clicked where the red vertices have ...
user avatar
0 votes
0 answers
10 views

Vertices of each LOD Version is always loaded on VRAM?

Vertices of each LOD Version is always loaded on VRAM? I know Many game engines have feature what Mesh Vertices and Textures LOD. I'm just wondering if All vertices and textures of all(each) LOD ...
user avatar
0 votes
1 answer
74 views

How do I find the correct vectors perpendicular to a vector in between two vertices?

I'm trying to push the purple vertices inward by moving it with a vector perpendicular to the red vector shown in the picture. Each directional vector created will move its respective vertex towards ...
user avatar
0 votes
1 answer
118 views

OpenGL Vertex Shader "joint matrix * weight" multiplication performance

Trying to implement animation on my engine. I'm at the first stage, rendering default pose of skinned meshes. Working as expected but very slow. With the below calculation, the shader takes 6ms to run....
user avatar
0 votes
0 answers
62 views

How can I roll up a plane like paper?

Hello, I want to twist the plane. The plane looks like this when I try to do it the way I linked below. How can I my plane roll like photos? How can I roll up a plane with a vertex shader? you can see ...
user avatar
1 vote
1 answer
95 views

What does 'vertex splitting' mean?

In the documentation of MeshUtility.SetPerTriangleUV2 it is said the following: Will insert per-triangle uv2 in mesh and handle vertex splitting etc. What do they mean by 'vertex splitting' ?
user avatar
  • 753
1 vote
1 answer
36 views

How to handle normal vector when duplicating vertex?

I'm currently developing a UV mapping, such as the UVW Map Modifier in 3ds Max (Not Unwrap UVW Modifier). I split the vertices of the model in the form of a primitive shape (Box, Plane, etc.) and set ...
user avatar
  • 13
4 votes
1 answer
5k views

How to randomly generate biome with perlin noise?

I want to generate a procedural world using perlin noise. As expected, my terrain is generating with a repetitive patern. I'd like to add biomes, zones separated with higher or lower amplitude to ...
user avatar
0 votes
1 answer
28 views

Generate plane with script missing triangles

I am trying to do a simple script to generate a plane from a script by creating a new mesh. After trying it, it seems like some of the triangles aren't showing up. I checked if they were in the list ...
user avatar
1 vote
1 answer
102 views

Calculate UV sphere vertices (altitude)

There is an fantastic answer by DMGregory here where he explains how to calculate and generate the vertices of an UV Sphere: OpenGL calculate UV sphere vertices Based on his code, how can we change ...
user avatar
  • 121
0 votes
0 answers
114 views

Converting vertices to block coordinates

Sorry if this is the wrong place to ask this, please do tell me where a question like this is better asked. Im importing a model from another game into the video game minecraft, which uses a ...
user avatar
0 votes
1 answer
123 views

How do I create and animate simple polygons directly from code in Unity?

I'm a beginner with Unity, but I know how to code. I'm open to tutorials, of course. Ideally, I would like to code spacial vertices and connect them into a simple polygon. The polygon would then be ...
user avatar
0 votes
1 answer
45 views

Figure out why vertices are clipped

I am trying to figure out why, at sharp cutoffs in geometry, some vertices seems to be culled for some reason. I have a heightmap for demonstrating it like this And this is the result I get See the ...
user avatar
  • 1,376
1 vote
1 answer
1k views

Unity Vertex Color Shader with Transparency

I'm trying to achieve a simple effect: I have a cube mesh and I want some of the vertices to change color. In this case, I want it to form some sort of a gradient where the unchanged vertices are set ...
user avatar
0 votes
1 answer
748 views

When does it make sense to use Index Buffers?

The concept of Index buffers is that certain vertices are shared across faces, hence can be reused to save space of duplicated verticies. A vertex is usually more than 12 bytes (depending on the ...
user avatar
0 votes
1 answer
74 views

Vertices in index buffer not rendered

I'm beginning with the 3D rendering in Monogame and i'm facing not a real issue because i already find a way to bypass it but more of a question. I'm rendering a simple cube with 8 vertices like that:...
user avatar
  • 167
2 votes
1 answer
2k views

Programmatically generated mesh vertex colors not showing up in Unity?

I'm sorry if this is an obvious thing to solve but I just can't figure it out...did I miss something...I've generated a mesh and during vertices generation I've also set its colors (and colors32 just ...
user avatar
  • 33
1 vote
1 answer
267 views

XNA 4.0 How to combine triangles vertices 3D

Preview for the problem: I'm making a similar game to Minecraft (a game that it's world is made by cubes), but the fps of the game is getting low only by rendering a little amount of cubes in the ...
user avatar
0 votes
0 answers
71 views

Generating skeleton bind pose from vertex weights

Assuming that you know how many bones should be in the skeleton, and you have the bone hierarchy, is it possible to calculate the bind pose of the bones just based on the vertex weights? To elaborate ...
user avatar
3 votes
1 answer
115 views

How to inflate geometry?

I have a shape containing vertices and triangles I want to inflate that geometry using some radius to get something like that I should move each point along ...
user avatar
  • 163
1 vote
1 answer
779 views

How can I reorder the order in which the vertices are in an .obj file?

Blender saves the files with the structure of All the vertices All the normals All the UV The game to which I want to import the model, only accepts the following order in structure 1 vertex 1 ...
user avatar
4 votes
4 answers
4k views

Algorithms for calculating vertex normals in 2D polygon

I have the points of a 2D polygon in the order in which they are connected, and I need to calculate the vertex normals and move them along it. An example is shown. I would like to know how to ...
user avatar
2 votes
2 answers
2k views

How can I convert my list of vertices and indices to a list of triangles?

I have a full 3D collision mesh that is represented by a list of vertices and another list of indices. I need to convert the list of vertices and the list of indices into a set of triangles. First I ...
user avatar
0 votes
1 answer
1k views

Removing duplicate vertices on a mesh

I have a set of vertices and another set of indices. Sometimes I find that I have duplicate vertices in my mesh. I tried at first to check if two identical vertices were in the array of vertices but ...
user avatar
0 votes
1 answer
179 views

Issues to display a texture loaded with libPNG with opengles 3.0

I'm trying to load a texture loaded with libPNG on a XY coordinates. I know the width and the height of the texture (32x32). The texture is already loaded successfully and I have his Id. Here is my ...
user avatar
0 votes
1 answer
116 views

How to get a reflex edge on a non-convex mesh

I am trying to implement a convex decomposition and I need to find the convex vertex on a mesh. Is there a algorithm that I can use to find the convex vertex on a mesh.
user avatar
1 vote
0 answers
809 views

Shadow & sorting issues with vertex colored PBR Shader Graph

I'm working on a custom shader using Unity 2018's new shader graph feature. Previously, I was using this shader, which worked great for awhile, but it ended up constantly breaking for seemingly no ...
user avatar
  • 11
2 votes
1 answer
2k views

How does the following code generate a full screen quad?

How does this ...
user avatar
1 vote
1 answer
910 views

Use heightmaps or direct vertex manipulation for runtime terrain editing in UE4?

I am creating a terrain editor and creator for in our game, in which we should be able to create hills and dales, create different shapes(forms) in the terrain etc. I came up with 2 approaches on ...
user avatar
0 votes
1 answer
1k views

How can I sort vertices efficiently in a specific direction (CW/CCW)?

I am trying to triangulate a set of points using a very simple approach where a base vertex is chosen, and then every other vertex is joined to its neighbouring vertex and then back to the base vertex,...
user avatar
  • 233
0 votes
1 answer
283 views

How to create class for storing different types of vertex?

I am writing graphics engine for educational pursoses and have some problems. I need to have ability to use different vertex formats (for example position+normal+uv or position+normal+uv+bones+...
user avatar
  • 27
0 votes
1 answer
226 views

Change center point and size with the help of the Matrix in Unity

Let us suppose I have an array of Vector3, it contains vertices. Now I want to scale the vertices and/or change the center point of the texture (move texture ...
user avatar
  • 107
6 votes
3 answers
1k views

Why is the depth test not done on geometry before rasterization?

It seems the only time depth is used to discard data is during rasterization, i.e. at the fragment level. In the geometry stage, I've only see culling and clipping of vertices. Is it not possible to ...
user avatar
  • 161
12 votes
3 answers
6k views

3D models budget. What matters more number of triangles or vertices

When I am making a model for a 3D game what should I take as a measure in my budget Polygons (triangles) or vertices? I have made an experiment with two sets 40000 cubes one with 8 vertices and 12 ...
user avatar
0 votes
1 answer
262 views

Matrix transformations vs manipulating vertex data directly

I was wondering whats more efficient to do if you want to transform a mesh. 1) Transforming a matrix and pass that to a shader or 2) Manipulate the meshs vertex data directly I was wondering because ...
user avatar
  • 303