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
1answer
24 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
19 views

OpenGL Terrain Vertex Ordering Prevents Uniform Height Maps

Evening everyone. Working to implement a simple terrain editor and have an issue I haven't been able to resolve. In the attached screenshot you'll see if I raise up a quad in the terrain the slope on ...
0
votes
0answers
54 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
26 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
42 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
559 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
198 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
26 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
1k 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
144 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
39 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
89 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
286 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 ...
4
votes
4answers
2k 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
703 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
621 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
155 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
99 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
668 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
542 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
682 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
192 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
142 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
4k 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
135 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
273 views

OpenGL NDC initial values

I have a set of vertex locations to create a plane: ...
2
votes
2answers
91 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
3k 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
7k 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 ...
32
votes
4answers
14k 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
827 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
132 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
521 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
184 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 ...
1
vote
2answers
1k views

Unity procedural smooth normals

I have a Unity project, which heavily relies on the marching cubes algorithm. Because this algorithm doesn't return the triangles in order, I can only index them in the order they are present in the ...
0
votes
1answer
768 views

Planar mapping/projecting UV coordinates from normal

I've got set of vertices, and would like to calculate their UV coordinates by projecting them by a given normal. Similar to what "planar mapping" does in 3ds max. Another way of looking at it is ...
1
vote
1answer
219 views

Why is my texture skewed?

I'm creating hexagonal prisms from code and am having a difficult time understanding how UV mapping works, as the texture I apply to the hexagonal face comes out skewed: Forgetting the sides for now, ...
3
votes
0answers
224 views

Get mesh height at position

Me and my friends are creating a simple 3D game in LibGDX and are currently trying to implement simple collision detection with the terrain (ground). For this I thought the best way would be to simply ...
0
votes
1answer
449 views

In trying to get vertex positions on a Blender-generated mesh in Unity, they seem to be badly off?

I've imported a number of track-terrain pieces into a game I'm working on, and I would like to get the mesh vertex arrays so I can position objects at their exact end. However, when I try to collect ...
1
vote
1answer
1k views

Vertex Displacement Distortion Correction

I am developing for Mobile VR using GoogleVRSDK and Unity. My target platform is Android. I have a shader which displaces vertices to create a reverse lens distortion. Following is my shader, <...
1
vote
1answer
850 views

How to pass array of dozens of floats to OpenGL 3.0 vertex shader?

I use PyOpengl and Python 3. I have 50 thousand vertices. Position of each vertex could be calculated in vertex shader as ...
1
vote
1answer
634 views

How are the positions of skinned mesh vertices with multiple weighted parents stored?

I'm trying to wrap my head around the basics of skinning and skeletal animation. I understand not every skeletal animation implementation works exactly the same, but I'm just trying to understand the ...
2
votes
1answer
552 views

Loading non-skeletal animation to opengl via assimp

I'm a newbie in assimp and openGL. I'm trying to import .fbx or .dae formatted file to openGL via assimp. Importing skeletal animation was kind of easy. Lots of introductions and sample projects ...
2
votes
3answers
356 views

Process of writing to the depth texture

In openGL, let's say I output one single point from the vertex shader with this value gl_Position = vec4(2.0,3.0,5.0,7.0); what exact math operations happen to "...
2
votes
1answer
223 views

Point welding on generated terrain

I am converting two 2D images (A Voronoi graph and a Diamond Square noise map) into a 3D object. However when finding the corner points of the Voronoi I am left with gaps, so I thought to drop these ...
2
votes
1answer
263 views

How do I make my indices anti-clockwise, so I can cull triangles in OpenGL? (immediate mode)

At the moment, I'm attempting a basic game engine in OpenGL using immediate mode. I'm trying to render a cube. Cube is a class with the vertices, normals, and indices. Here is part of the Cube class: ...
0
votes
0answers
148 views

How to prevent object from moving when it's mesh/collider is being updated?

So I a made a script that lets the player grab a vertex, move it, and then update the mesh. To help prevent the player from trying to clip it through other objects I made it so the mesh/collider is ...
1
vote
1answer
102 views

DirectX 11 Vertex Shader Fragmentation

I was wondering how my vertex shader is causing my cube to be render weirdly? I am using the Visual Studio graphics tool and see that my input assembler is correctly receiving the cube and I can only ...