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

learn more… | top users | synonyms

0
votes
1answer
10 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
264 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. ...
0
votes
1answer
69 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 ...
1
vote
3answers
84 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 "z" after leaving the vertex shader? ...
2
votes
1answer
187 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 ...
1
vote
1answer
40 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
25 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
25 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 ...
0
votes
0answers
22 views

How to apply individual colours in a fragment shader?

I'm trying to write my own shader. Within the target mesh I have assigned the following attributes in a script: mesh.vertices = points; mesh.colors = colours; //Each element of the array hold a ...
1
vote
1answer
29 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
43 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 GL_TRIANGLES Here's the code to ...
2
votes
1answer
1k 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); ...
0
votes
0answers
29 views

How to get vectices of a sprite in correct order in Unity?

Currently, when I examine sprite.vertices, I see that it is ordered in crossed way, like: one from bottom, one from up, another one from somewhere else... etc. I need the correct order to make array ...
1
vote
2answers
219 views

Unity, shader, vertexID

I'm writing a shader and I just wanna ask if it's possible to get the ID of the vertex that is currently being manipulated. I read something about gl_vertexID, but I couldn't find out if that is ...
1
vote
3answers
2k 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. (I'...
0
votes
0answers
22 views

JAVA lwjgl 3D Quadmap engine help

I've been trying to make a custom generated level engine that creates a custom flat surface. With my current knowledge of vertices and indices i have successfully created a rectangular surface. My ...
3
votes
1answer
64 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 ...
2
votes
1answer
140 views

Why doesn't Array.Copy to mesh.verticies work in Unity?

I am rebuilding a mesh but something seems odd that I have to create a temp array just to hold the verticies rather than copy an array. I'm not using list because this is used frequently and I do not ...
0
votes
1answer
90 views

Avoiding GC when rebuilding Mesh.uv and Mesh.vertices

Since unity will not allow users to iterate over mesh.uv and mesh.vertices, I am stuck having to use GC intensive calls when applying an array of uvs and vertices to a mesh. I run into high GC ...
2
votes
2answers
125 views

Most efficient way to get the world position of the 8 vertexes of a Box Collider (C#)

What I am looking for is the most efficient way to get the world position of the 8 vertexes of the Box Collider of a freely rotated Gameobject. I cannot use collider.bounds since object is rotated, ...
1
vote
0answers
41 views

Detecting the two Vector3 that determine the bottom-edge of the side of a box-collider that had collision (with C#)

So, I understand that plenty of questions have been posted on how to detect which side of a Box Collider had collision. However, what I am trying to achieve is a little different. I want to find out, ...
2
votes
0answers
33 views

Weird warping with per-vertex normals

I've had this little problem for a while now, where for some reason my calculations for per-vertex normals results in a weird distortion or warping, skewing my lighting, shading, and reflection passes....
3
votes
2answers
134 views

Algorithm for triangle picking?

So i found out that i need a triangle picking algorithm, i need to see if my mouse is over the triangle. I've heard what color picking is, but it would pretty much just drop the performance twice (...
0
votes
1answer
84 views

How to determine vertex index using Shader Model 3 or lower?

I need something like SV_VertexId (added in Shader Model 4) in HLSL shader to determine which vertex is currently handled. Unfortunatelly, I can compile only vs_3_0 or lower. The objective is to ...
2
votes
1answer
83 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] Then, you would typically have an ...
7
votes
2answers
1k 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 ...
4
votes
2answers
4k 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 ...
0
votes
1answer
336 views

Applying texture to a 3D object

I am trying to draw a 3D cube on the screen, using MonoGame. The cube was created in Blender and exported as an fbx file. The following is what the cube looks like in VS when opened in the editor: ...
3
votes
1answer
539 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 ...
0
votes
0answers
29 views

How to calculate per vertex normals? (OpenGL) [duplicate]

I am really confused and quite much thinking about how to do that? Cross product and then, normalizing is not working for me. Or perhaps, I take them all wrong. Well, please explain me that while ...
1
vote
2answers
90 views

Malformed/Pixelated Vertex Normals

I am trying to generate vertex normals for a given triangles/vertices list with the following code: **BASE METHOD:** private void CalculateNormals() { for (Int32 i = 0; i < m_Meshes.Count; ++...
2
votes
1answer
328 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 ...
5
votes
1answer
694 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 ...
0
votes
0answers
35 views

Specify Vertex Quality in OBJ File

I've got a program that prints OBJ files in the format # x y z r g b format opens with MeshLab only (http://meshlab.sourceforge.net/) v xVal yVal zVal rVal gVal bVal v xVal yVal zVal rVal gVal bVal ...
1
vote
1answer
127 views

Overlapping Vertex in DynamicVertexBuffer draw priority?

I am creating a voxel game, and I have recently run into an issue. My world is drawn by a DynamicVertexBuffer, which just consists of vertices for the blocks themselves. On top of that, I switch ...
0
votes
1answer
435 views

OpenGL ES 1.0 to OpenGL ES 2.0, I cant draw a square

I am learning open GL ES 2.0 and I just made 1 easy game for 1.0 I am following tutorials but I cant understand this thing In OpenGL ES 1.0 if I define a square that way: private float[] vertices = ...
0
votes
0answers
150 views

Invalid operation (1282) in GLSL vertex shader

My GLSL vertex shader works fine, but you if put a for loop inside or rename the uniform xxx to something else, it says the follwoing: Exception in thread "main" org.lwjgl.opengl.OpenGLException: ...
0
votes
1answer
432 views

why is glVertexAttribDivisor crashing?

I am trying to render some trees with instancing. This is rather weird, but before sleeping yesterday night, I checked the code, and it was in a running state, when I got up this morning, it is ...
2
votes
1answer
84 views

Good way to support multiple types of triangles? (C# XNA)

[this question is somewhat long. here's my question in a nutshell] I want to use multiple types of Vertex data types for my triangle, interchangeably. So if I have a generic type T private void ...
3
votes
4answers
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 ...
0
votes
2answers
60 views

Setup VertexPositionTexture array for a texture2D at a location

I am trying to adjust the following code to render a quad on a 2D texture at a specific location and specific size. Currently this code will render a fullscreen quad, which makes sense since the ...
0
votes
0answers
204 views

What limits the number of vertices the GPU can process per clock cycle?

I am currently experimenting with OpenGL to make my own game. I wrote some test code to see what are the limits of my GPU. I own a Geforce 840m. This essentially consists of a draw command ...
0
votes
1answer
79 views

Normalizing a homogeneous 3d point

As I've seen corruption in geometry, why is it a bad idea to normalize a homogeneous (divide by w) the vertex position returned from vertex shader? Update Vertex shader: // float4 pos : SV_POSITION;...
0
votes
1answer
117 views

Reasonable texture Formats for VertexTextureFetch in GL

Wich is a reasonable GL version that have support for vertex textures fetchs(VTF) in OpenGL ? (for example GL 3.0, 3.1, 3.3) What textures formats should I expect to be supported in average video ...
2
votes
1answer
130 views

How can I deal with vertex precision errors between terrain chunks?

I am using OpenGL to render the following scene, using vertex data from one of the map files of a popular MMORPG. The data is chunked and the pictured scene is made up of 256 (16x16) chunks. However ...
0
votes
1answer
140 views

Making multiple VertexPositionColor variables in the same class? - XNA

I have studying XNA on my spare time for about a year now and I could use some professional help on this issue. Any time given to my problem is appreciated. I have two VertexPositionColor variables ...
0
votes
1answer
269 views

Fragment Shader output type error

StackExchange! I've been working with opengl for a bit and I'm trying to finally load the shaders instead of having them inline. I'm having a ton of issues, though. As soon as I solve one, another ...
0
votes
1answer
252 views

How do I pass an object location into a vertex shader?

I am using Blender Game Engine. I want to create a large flat plane, and deform it locally near a moving object. So far (despite being a beginner at shaders) I've written a vertex shader for the ...
0
votes
2answers
175 views

How to write an adjacency algorithm that compares position data?

I have a list of indexed triangles for which I need to generate adjacency data. I've already written a brute force algorithm that creates 3 edge data structures for each triangle and then compares the ...
5
votes
2answers
786 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 ...