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.
192
questions
62
votes
5
answers
73k
views
What are normal, tangent and binormal vectors and how are they used?
I would like to find out the following information:
What are they?
Example usage in game development (the area they are used in)
About the following vector types:
...
34
votes
5
answers
30k
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 ...
14
votes
3
answers
8k
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 ...
11
votes
1
answer
969
views
Special relativity shader in GLSL
I'm trying to implement a GLSL shader which helps understanding special relativity Lorentz Transformation.
Let's take two axis-aligned inertial observer O and <...
10
votes
1
answer
7k
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 ...
8
votes
3
answers
7k
views
OpenGL Vertex Attributes - Normalisation
Alas, I have searched, and have found no definitive answer.
When would you normalize the vertex data in OpenGL using the following command:
...
8
votes
1
answer
745
views
Best practices with Vertices in Open GL
What is the best practice in regards to storing vertex data in Open GL? I.e:
...
8
votes
2
answers
7k
views
Geometry Shader not generating geometry for some Vertices
I am playing with a geometry shader and I am wondering why it doesn't generate geometry for each vertex in all meshes?
I don't think this is a Cull problem because the same vertices generate geometry ...
8
votes
2
answers
3k
views
How does Unity3D lower an imported .obj vertex count?
I have a question regarding how Unity3D handles importing of .obj files.
I'm importing this teapot: http://groups.csail.mit.edu/graphics/classes/6.837/F03/models/teapot.obj
The number of vertices ...
7
votes
2
answers
15k
views
calculate new vertex position given a transform matrix?
How can I get the new position of my vertex given a 4x4 transform matrix or simply 9 floats (positionX, positionY, positionZ, rotationH, rotationP, rotationR, scaleX, scaleY, scaleZ)? Usually I can ...
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 ...
6
votes
2
answers
1k
views
Something other than Vertex Welding with Texture Atlas?
What options (in C# with XNA) would there be for texture usage in a procedural generated 3D world made of cubes to increase performance? Yes, it's like Minecraft.
I've been doing a texture atlas and ...
6
votes
2
answers
1k
views
How do professional games avoid showing pixel seams in adjacent mesh boundaries due to decimal imprecision?
Graphics cards are mathematically imprecise.
So when some meshes are joined by their borders, the graphics card often makes mistakes and decides that some pixels at the seam represent neither object, ...
6
votes
1
answer
481
views
GLSL vertex shaders with movements vs vertex off the screen
If i have a vertex shader that manage some movements and variations about the position of some vertex in my OpenGL context, OpenGL is smart enough to just run this shader on only the vertex visible on ...
6
votes
2
answers
12k
views
Mapping a Vertex Buffer in DirectX11
I have a VertexBuffer that I am remapping on a per frame base for a bunch of quads that are constantly updated, sharing the same material\index buffer but have different width/heights. However, ...
6
votes
2
answers
3k
views
What is the purpose of a Direct3D vertex layout?
This tutorial (msdn) gives a description of a vertex layout.
This is an example of a input layout:
...
6
votes
2
answers
937
views
How do I simplify terrain with tunnels or overhangs?
I'm attempting to store vertex data in a quadtree with C++, such that far-away vertices can be combined to simplify the object and speed up rendering.
This works well with a reasonably flat mesh, but ...
5
votes
1
answer
10k
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 ...
5
votes
1
answer
409
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 ...
5
votes
1
answer
2k
views
Memory allocation strategy for the vertex buffers (DirectX 10/11)
I'm writing a CAD system. I have a 3D scene and there are many different objects (walls, doors, windows and so on). The user can add or delete objects.
The question is: How do I keep track of all the ...
5
votes
1
answer
1k
views
Spritebatch Vertex shader world matrix change after each draw
I have a spritebatch where I draw some textures transformed in 3d space.
The easy way was just Begin with the transformation matrix, draw, and end it right after.
But that is silly, so I'm trying ...
4
votes
4
answers
6k
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 ...
4
votes
2
answers
14k
views
Computing pixel's screen position in a vertex shader: right or wrong?
I am building a deferred rendering engine and I have a question. The article I took the sample code from suggested computing screen position of the pixel as follows:
...
4
votes
1
answer
1k
views
Using raw vertex information for sprites rather than SpriteBatch in XNA
I have been wondering whether using SpriteBatch is the best option. Obviously for prototyping or small games it works well.
However, I've been wanting to apply techniques such as shaders and lighting ...
4
votes
4
answers
3k
views
XNA - Update vertices property stored in a VertexBuffer
I've a class that creates a cube using VertexPositionColor and these vertices are stored in a VertexBuffer. Now i would like to dynamically change the color of my vertices. In my class i have a ...
4
votes
1
answer
1k
views
Per-vertex position/normal and per-index texture coordinate
In my game, I have a mesh with a vertex buffer and index buffer up and running. The vertex buffer stores a Vector3 for the position and a Vector2 for the UV coordinate for each vertex. The index ...
4
votes
1
answer
892
views
Vertex ordering with THREEjs's exporter
I'm using THREEjs's exporter to export a 2D polygon plane. The resulting JSON gives me the vertices. I'm trying to properly order these vertices as to make the actual polygon shape, without luck.
...
4
votes
2
answers
1k
views
How can I find the "end" vertices on an open-ended mesh?
I was looking at a video of a system that extrudes meshes along a curve, connecting them end to end but adjusting the vertices for a smooth connection. It does this with a mesh that as far as I know ...
4
votes
3
answers
3k
views
What is the issue with my model rendering from .obj files?
Well I can clearly tell that what rendered is close to what I wanted, but there seems to be a few problems.
The .obj files contained values like "f", "v", "vt".
Image Of Problem:
As you can see it ...
4
votes
1
answer
651
views
Count number of Vertices in VertexBuffer in XNA 3.1
Where in XNA 4.0 one can go:
myVertexBuffer.VertexCount;
What is the best way to count the number of vertices in 3.1 for a dynamic buffer (i.e. where I do not ...
4
votes
1
answer
690
views
2D Boxes/Vertices merging
I want to optimize my colliders geometry, at the moment is composed by boxes (it's a tile based game) of the same dimensions, i want to remove the inner vertices to have, at the end, only the shell.
...
4
votes
2
answers
9k
views
How do I morph between meshes that have different vertex counts?
I am using MeshMorpher from the Unify wiki in my Unity project, and I want to be able to transform between arbitrary meshes.
This script only works when there are ...
3
votes
3
answers
1k
views
What is the practical use of IBOs / degenerate vertex in OpenGL?
Vertices in 3D models CAN get cut in the process of optimizing 3D geometry, (degenerate vertices) by 3D graphics software (Blender, ...) when exporting because they aren't needed when reusing a vertex ...
3
votes
2
answers
919
views
Algorithm for triangle picking?
I need a triangle picking algorithm, that is, I need to see if my mouse is over a triangle.
I've heard what color picking is, but it would pretty much just drop the performance twice (which is not ...
3
votes
1
answer
5k
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 ...
3
votes
2
answers
3k
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 ...
3
votes
1
answer
1k
views
OpenGL vertex data per index
Usually, vertex data is assigned to a particular vertex, like this:
[data] [vertices]
[1.31] -> [1, 13, 5]
[84.3] -> [5, 8, 12]
[.095] -> [8, 3, 10]
...
3
votes
1
answer
153
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 ...
3
votes
1
answer
2k
views
Apply Vertex Colors to XNA Spritebatch sprites
I know that you can use custom vertex and pixel shaders using SpriteBatch but I can't figure out how to apply colors to individual vertex points on a sprite generated by spritebatch. All I can do is ...
3
votes
1
answer
144
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 ...
3
votes
1
answer
3k
views
Shader that draws just vertex points
The game I am developing is in unity and I want to make a shader which can be put on a mesh that only 'draws' color on each vertex point. I am not proficient with shaders, and out of all my searching ...
3
votes
1
answer
369
views
Surface normal to screen angle
I've been struggling to get this working. I simply wish to take a surface normal and convert it to a screen angle.
As an example, assuming we're working with the highlighted surface on the sphere ...
3
votes
0
answers
457
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 ...
3
votes
1
answer
224
views
Overlapping vertices on sphere?
Iv started up doing some programming in XNA as Iv been doing C# for several years and would like to start do some 3D work with C# and XNA framework.
Right now Im trying to build a sphere by code. It ...
2
votes
1
answer
3k
views
How does the following code generate a full screen quad?
How does this
...
2
votes
2
answers
12k
views
How to determine counter-clockwise vertex winding
I've been causing myself some confusion lately with regards to vertex winding in a mesh class that i'm writing.
Currently, the mesh contains the appropriate structures for:
vertices (vector3)
...
2
votes
2
answers
172
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 ...
2
votes
1
answer
481
views
Can using different vertex-buffers for each vertex-attributes be good in certain scenarios?
Is there scenarios where this is actually good practice? Or does it slow down performance?
Example:
...
2
votes
2
answers
13k
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 ...
2
votes
1
answer
950
views
When I select one vertex it selects multiple vertices?
I'm trying to do some kind of a face. When I select a vertex it selects two other vertices. However, when I try to select one of the two other vertices it doesn't select them.
I want to move only one ...