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
0
votes
0answers
8 views

More efficient way to manage grid indices that seep through corners?

I have a simple hash grid that I use to keep track of objects which uses indices from 0 (bottom left) to width*height -1 (top right). The selection at the edges seep through which is obviously ...
0
votes
1answer
37 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 ...
0
votes
0answers
43 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 ...
0
votes
1answer
42 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 ...
1
vote
2answers
58 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 ...
0
votes
0answers
26 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 ...
0
votes
0answers
7 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 ...
0
votes
1answer
33 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 ...
0
votes
1answer
69 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....
0
votes
0answers
44 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 ...
0
votes
0answers
14 views

Adding lighting to custom vertex shader in Unity

What's the simplest way to add shadow functionality based on the modified vertices, nothing I've found online seems to work ...
0
votes
1answer
54 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' ?
1
vote
1answer
29 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 ...
4
votes
1answer
3k 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 ...
0
votes
1answer
25 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 ...
1
vote
1answer
64 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 ...
0
votes
0answers
77 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 ...
0
votes
1answer
72 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 ...
0
votes
1answer
44 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 ...
0
votes
1answer
951 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 ...
0
votes
1answer
559 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 ...
0
votes
1answer
48 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:...
2
votes
1answer
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 ...
1
vote
1answer
239 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 ...
0
votes
0answers
56 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 ...
3
votes
1answer
102 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 ...
0
votes
1answer
651 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 ...
5
votes
4answers
3k 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 ...
1
vote
2answers
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 ...
0
votes
1answer
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 ...
0
votes
1answer
169 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 ...
0
votes
1answer
112 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.
1
vote
0answers
780 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 ...
2
votes
1answer
2k views

How does the following code generate a full screen quad?

How does this ...
1
vote
1answer
796 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 ...
0
votes
1answer
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,...
0
votes
1answer
248 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+...
0
votes
1answer
183 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 ...
7
votes
3answers
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 ...
12
votes
3answers
5k 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 ...
0
votes
1answer
207 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 ...
0
votes
2answers
367 views

OpenGL NDC initial values

I have a set of vertex locations to create a plane: ...
2
votes
2answers
110 views

Easy way to edit vertex attributes

I'm trying to edit large amounts of vertex attributes in my models for my game. The main attributes I really care about are strength (so wind can interact with them) and a couple of other things so ...
9
votes
1answer
4k views

How can I get the normal vector for a plane from a set of vertices?

I'm working on a HLSL / C++ little project to going over my graphics work, and I am unsure how I am to get a facing vector from a vertex polygon. I can't seem to find the formula. The positions are ...
2
votes
2answers
9k views

Generating a UV map for a procedural mesh

I have created a procedural low poly rock mesh and now I would like to apply textures on it. I have the 3D-coordinates of every vertex of the mesh but that's about it. How would I automatically ...
33
votes
4answers
20k views

What is a vertex color?

My question is what is written in title. This term "vertex color" appear a lot. I am having hard time to understand this. For example: Isn't a vertex simple point on 3D space? If so, how can a point ...
2
votes
2answers
1k views

OpenGL Water Waves - gradually advance

I want to make a simulation of water drops producing waves, in OpenGL with C++. I calculated the height for each point of my plane grid in the 'Vertex Shader' with this formula: The problem is that ...
1
vote
1answer
166 views

What to do with unused vertices?

Imagine yourself a vertex array in OpenGL representing blocks in a platform game. But some vertices may be not used. The environment is dynamic, so there always some vertex may suddenly become ...
1
vote
2answers
565 views

OpenGL Water Waves Problem

I want to do a simple simulation of water drops producing waves in OpenGL with C/C++. I calculate height for each point of my plane grid in Vertex Shader with formula but it seems wrong at the ...
1
vote
0answers
185 views

3D software-based engine projection issues

I have been writing a 3D soft-engine for a little while and I have gotten it a reasonable position but recently noticed a bug that I can't seem to solve. When I am rendering a few cubes as a test, if ...