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, ...

learn more… | top users | synonyms

10
votes
1answer
508 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 O' . The observer O' is in motion w.r.t ...
9
votes
3answers
4k 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: Normal Tangent Binormal A ...
7
votes
1answer
492 views

Best practices with Vertices in Open GL

What is the best practice in regards to storing vertex data in Open GL? I.e: struct VertexColored { public: GLfloat position[]; GLfloat normal[]; byte colours[]; } ...
7
votes
2answers
659 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 ...
6
votes
1answer
243 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
2answers
207 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
3answers
1k 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: glVertexAttribPointer(index, size, type, normalize, ...
5
votes
2answers
460 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 ...
5
votes
2answers
1k 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: D3D11_INPUT_ELEMENT_DESC layout[] = { { "POSITION", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, 0, ...
5
votes
1answer
880 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 ...
4
votes
1answer
785 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
2answers
149 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
1answer
535 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
1answer
80 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. ...
3
votes
3answers
350 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
2answers
5k 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, ...
3
votes
3answers
1k views

DirectX 9 - model rendering from .obj files issues

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: ...
3
votes
3answers
2k 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 ...
3
votes
1answer
781 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
1answer
432 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 know the number of elements that ...
3
votes
1answer
551 views

How do I create a manual object with colors for each vertex?

How do I create a shaded manual object with colours for each vertex? Eg if ogreObj is the Ogre::ManualObject : ogreObj->begin("BaseWhiteNoLighting", Ogre::RenderOperation::OT_TRIANGLE_LIST); ...
3
votes
1answer
112 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
2answers
473 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 an equal number of vertices between ...
3
votes
1answer
266 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 ...
2
votes
1answer
409 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: //Vertex format is: //X, Y, U, V var myXYs:Vector.<Number> = new <Number>[ -1, -1, ...
2
votes
1answer
606 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 ...
2
votes
1answer
100 views

How can I compile a Direct3D 9 effect from a file?

I started working with shaders recently in DirectX9. I noticed that there is a D3DXCompileShaderFromFile function for IDirect3DVertexShader9 and pixel shader. Which compiles the shader and gives you ...
2
votes
1answer
262 views

Shader and Custom Vertex Format Errors

I am creating an editor of sorts that allow you to create 3D voxel models. I just got started and have ran into a few errors. Here is what it is producing: I think the problem has to do with the ...
2
votes
2answers
899 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: VertexShaderFunction() { ... ...
2
votes
1answer
120 views

Pixelated Normal Generation

I am generating normals for each vertex in a standard 512*512 quad. Yet when I do using the following code: public Vector3f[] normals(Vector3f[] surface){ Vector3f[] normals = new ...
2
votes
2answers
2k 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 ...
2
votes
1answer
318 views

Implementing IVertexType Interface

In XNA, I have created a new VertexType, called it VertexPositionTextureLight which inherts the IVertexType Interface, but apparently I need to implement the member of VertexDeclartion which I cleary ...
2
votes
1answer
105 views

XNA calculate normals for linesegment

I am quite new to 3D graphical programming and thus far only understand that normal somehow define the direction in which a vertex faces and therefore the direction in which light is reflected. I have ...
2
votes
1answer
986 views

How can I draw multiple vertexbuffers with indices?

I'm using to types of vertices. For the triangles: 0 Vector3 Position, 12 Color Color, 16 Vector3 Normal For the lines: 0 Vector3 Position, 12 Color Color I setup a vertex buffer for each ...
2
votes
1answer
183 views

DrawIndexedPrimitives overdraws data in previous buffer if called in loop

I doubled the question from stackoverflow here, and will delete the opposite of a question that gave me the answer. I have the Draw method in one of my renderers, that loops through the dictionary ...
2
votes
0answers
199 views

Vertex Normals, Loading Mesh Data

My test FBX mesh is a cube. From what I surmise, it seems that the cube is on the extreme end of this issue, but I believe that the same issue would be able to occur in any mesh: Each vertex has 3 ...
2
votes
1answer
180 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 ...
1
vote
3answers
188 views

Is it possible to gain performance by omitting vertex normals in the GPU pipe?

I am working on a rendering problem where I want to render as many raw triangles to the screen as I can with either OpenGL or DirectX with the absolute fastest performance possible. I wondered about ...
1
vote
4answers
218 views

Selecting and moving vertices

How can I identify the correct vertecis and move them in XNA using VertexBuffer? Let's say I have a simple cuboid in my project and want to move one face of it. How would I loop thru vertices, get ...
1
vote
2answers
3k 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) ...
1
vote
2answers
928 views

XNA 4.0 Point Vertex Rendering

I have a buffer of about 134 million particles and a very powerful computer to render them smoothly, but I am getting an error when trying to render them as primitive lines. It says that I cannot ...
1
vote
2answers
1k views

How does one avoid hundreds of copies into a vertex buffer each frame?

Assume a Direct3D9-based 2D game, high resolution, very busy. Performance critical. A particle system has 2,000 particles. They are scattered throughout the world with only a subset visible on screen ...
1
vote
1answer
39 views

vertex is bending inwards

I am trying to draw a picket fence, but the center of the picket vertex looks bent in the middle, why is the picket bending inwards to the left? // draw fence pickets float a; for (a=-25; a<=25; ...
1
vote
1answer
124 views

Optimize a vertex buffer and generate its associated index buffer

I need to generate a 64*64 grid with each cell being 32*32 wide. The following code works perfectly but I was wondering whether it can be further optimized when creating the index buffer for it. ...
1
vote
2answers
160 views

One or multiple VertexBuffers

I'm currently working on a personal project where I'm trying to load the levels and all of the geometry from the game "Medal of Honor Allied Assault" into my own C# code-base based on SharpDX. I ...
1
vote
1answer
1k views

Proper vertex buffer use

How're you supposed to use vertex buffers? Say you have 500 distinct deformable shapes/models in the world (ie you want to be able to change/delete vertices from the models somewhat arbitraily as the ...
1
vote
1answer
330 views

Output from vertex shader in D3D9

I've been looking at creating some 2D rendering systems in D3D9, basically because I don't like ID3DXSprite. For the output of the vertex shader, what co-ordinate system does the run-time expect ...
1
vote
1answer
87 views

Why Does unity_LightPosition[0] Seem to Depend on Camera Position?

I'm trying to write a fairly basic shader but I keep running into lighting issues with Unity. My first problem was trying to figure out which variable stored the light's position in world space. ...
1
vote
1answer
99 views

MonoGame WP custom vertex decleration

How do I go about implementing and using a custom vertex deceleration in monogame for windows phone 8. I want to be able to store a position, a colour and a normal?
1
vote
1answer
344 views

How to draw different textures on my cubes DrawUserIndexPrimitive with XNA?

I'm having some problem to draw textures with class "DrawUserIndexPrimitive" on Xna. I can draw my cubes / models without problem. But I want to draw different textures on my cubes. I loop on each ...