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, ...
10
votes
1answer
418 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 ...
7
votes
1answer
419 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[];
}
...
6
votes
1answer
171 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 ...
5
votes
2answers
857 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
559 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
3answers
319 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 ...
4
votes
3answers
930 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, ...
4
votes
1answer
330 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 ...
3
votes
2answers
3k 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
1answer
696 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 ...
3
votes
3answers
485 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
1k 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
366 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
0answers
204 views
Recast issue while loading BSP
I'm trying to load a BSP into RecastDemo to see if it works fine, I don't know where the problem could be, I'm extracting the vertices and triangles really fine.
The result is supposed to look like ...
2
votes
1answer
314 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
388 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
205 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
1answer
84 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
805 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
545 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 ...
2
votes
1answer
200 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
790 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
139 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
1answer
165 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
4answers
132 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
475 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
557 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
2answers
115 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
767 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
282 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
101 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 ...
1
vote
1answer
93 views
How do I create geometry in SceneKit?
I have been experimenting with Apple's new SceneKit for fun, but I cannot seem to figure out how to input vertex data without loading a .dae file.
Does anybody who has been testing SceneKit have any ...
1
vote
1answer
130 views
XNA shield effect with a Primative sphere problem
I'm having issue with a shield effect i'm trying to develop. I want to do a shield effect that surrounds part of a model like this: http://i.imgur.com/jPvrf.png
I currently got this:
...
1
vote
1answer
131 views
What is the name for a single 2D polygon on a UV Mapped texture?
When UV Mapping a polygon/texture, is there name that describes a single polygon on the texture.
Does this name differentiate if from the same geometry once it has been mapped to a face?
Would ...
1
vote
1answer
533 views
XNA - multiple VertexBuffers?
I'm trying to learn how to use VertexBuffers in XNA 4.0. I can render wireframe shapes and I can render textured shapes. However, I'm having some trouble rendering them both at once.
I'm ...
1
vote
0answers
105 views
How to draw a large number of model (identical) with vertex buffer in XNA?
I am facing a problem that many developers as have probably found a solution.
I have a small project with a floor designed with small cubes (100X100).
If I exceed this limit, my game suffered major ...
1
vote
0answers
144 views
Vertex shader to Pixel shader NVIDIA problem - restarting drivers
I have problem with my shader on NVIDIA cards. On AMD it's working right.
Shader Builder exported CODE:
//ROOT
//PSParts
//VSParts
//Samplers
sampler sLod23ColorGround : register(s0);
sampler ...
1
vote
0answers
134 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 ...
1
vote
0answers
254 views
XNA HLSL: Skinned Model Deforming Wrong
I am creating a basic XNA recreation of Minecraft. My current problem is that my "Steve" model, which is skinned with an armature using vertex groups to deform, is showing up disfigured beyond all ...
0
votes
1answer
549 views
How to make a 2D Terrain with opengl?
I want to make a simple 2d terrain with just a few bumps and height changes:
I thought about just using random numbers to describe the height of a certain vertex, but I don't see how I can make ...
0
votes
2answers
137 views
Is it only possible to display 64k vertices on the monitor with 16bit?
I did the first 3D tutorial over at riemers.net and stumbled upon that my graphic card only supports Shader 2.0 (Reach profile in XNA) which means I can only use Int16 to store the indices (triangle ...
0
votes
2answers
1k 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)
...
0
votes
1answer
170 views
Custom VertexDeclaration for Color, Texture, Normal
What is the best way to create a VertexDeclaration, that makes it able to render a Shape consisting of vertices and also be able to store a color for the shape (in case the texture can't be rendered - ...
0
votes
3answers
935 views
Fastest solution to compute normal
A physics engine return a deformed mesh (only geometry vertices).
I take this mesh to render the geometry (~500000 vertices).
What is the fastest solution and the least expensive to compute normal ...
0
votes
1answer
189 views
Creating a vertexbuffer to define vertices arranged in a grid with the view for easy editing later
I'm using the marching square algorithm (2D version of marching cubes) to generate vertices.
I end up with vertices arranged in a grid.
I want to enable destructible terrain, and the way i was ...
0
votes
1answer
59 views
XNA 4 VertexPositionTexture triangleStrip sporadically disappearing [closed]
I am drawing a traingleStrip using VertexPositionTexture and BasicEffect that extends from the first person perspective of the screen out a certain distance on the Z axis. In a loop I pass start and ...
0
votes
1answer
94 views
XNA doesn't sometimes draw 3D models properly [closed]
I am developing an 3D platformer game with XNA framework and I am experimenting some errors in drawing. Here is some images of the errors, that appears in 3D models and in planes:
In the first ...
0
votes
1answer
126 views
Disappearring instances of VertexPositionColor using MonoGame
I am a complete beginner in graphics developing with XNA/Monogame. Started my own project using Monogame 3.0 for WinRT. I have this unexplainable issue that some of the vertices disappear while doing ...
0
votes
0answers
97 views
Direct X Vertex Coloring
So I've been messing around with directx 9 for the past few days, and I recently bump in a simple problem of vertex coloring. Can someone here with directx9 expirience solve this problem? I would ...
0
votes
0answers
171 views
effect and model vertex declaration compatibility
I have normal model drawing code. When I try to draw model without UV coordinates I got this exception:
System.InvalidOperationException: The current vertex declaration does not include all
the ...
