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.

0
votes
1answer
25 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
0answers
15 views

How to draw lines or draw lines between objects through touch?

I'm working in unity and in one of the activities I have to generate different vertex and the player would have to be able to squeeze an object and move the finger to another object, if someone can ...
0
votes
1answer
71 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
23 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:...
1
vote
1answer
145 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 ...
0
votes
0answers
37 views

Vertices - joint weights assignment/indexing in COLLADA

this might be a duplication of another post, but I couldn't find an answer that helps me understanding the solution to my questions yet. In my model I have 1420 triangles, 740 positions and 1408 ...
0
votes
1answer
62 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
26 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 ...
2
votes
1answer
70 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
101 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 ...
3
votes
4answers
767 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 ...
0
votes
2answers
328 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
223 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
146 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
95 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
453 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
265 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
349 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
138 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
99 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
995 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
2answers
3k 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
101 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
177 views

OpenGL NDC initial values

I have a set of vertex locations to create a plane: ...
2
votes
2answers
78 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
2k 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
4k 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 ...
30
votes
4answers
10k 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
606 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
113 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
454 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
180 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
955 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
525 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
155 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, ...
1
vote
0answers
166 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
349 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
949 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
555 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
528 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 ...
1
vote
1answer
414 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
295 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
220 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
192 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
137 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
86 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 ...
1
vote
1answer
55 views

Mesh/Path reduction to simulate traveled path to target

I generate that kind of mesh during runtime to display the path to follow to a target (think at something like the path your GPS shows you when you are travelling): I need to reduce the displayed ...
1
vote
0answers
315 views

indices for surface of revolution

I'd like to implement a surface of revolution. I already implemented creating Vertices based on a 2D line. I now want to get the indices to render the mesh with ...
3
votes
1answer
87 views

Vertex position problem for connected lines

I’m trying to generate a mesh to display connected segments representing street lines in a mini map. I have problem with vertex orientation that my math knowledge has hard time to resolve. Let’s ...