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,...
1
vote
0answers
123 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
1answer
13 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
54 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
32 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
42 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
43 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
65 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
0answers
88 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
#version 300 es
uniform v_coefficients_weights[COEFFICIENTS_AMOUNT];
in ...
0
votes
1answer
63 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 ...
0
votes
1answer
106 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
116 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
202 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
53 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
36 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
39 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
27 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
30 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
70 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 ...
0
votes
0answers
44 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 ...
0
votes
0answers
30 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
70 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 ...
0
votes
1answer
157 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
1answer
214 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 ...
2
votes
0answers
36 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
182 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
42 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, ...
3
votes
2answers
173 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
130 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
113 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 ...
0
votes
1answer
573 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:
...
0
votes
0answers
32 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
92 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; ++...
1
vote
1answer
294 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
0answers
40 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
146 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 ...
7
votes
2answers
2k 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 ...
0
votes
1answer
626 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
179 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: ...
2
votes
1answer
90 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 ...
0
votes
0answers
243 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
83 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;...
3
votes
1answer
674 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
1answer
132 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
152 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
175 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
313 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
2answers
88 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
2answers
190 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 ...
0
votes
1answer
54 views
What data to store along a vertex
Is there any other recommended data I should store in the vertex buffers aside from a vertex' coordinates, normals and texture coordinates?
For example data I'd need for a feature that almost every ...
1
vote
1answer
316 views
Vertex shader in OpenGL/GLSL - transformation of the interior of a textured quad
I have a LWJGL project and ran into a problem with a vertex shader I wrote.
In my scene I am rendering a map whose ground consists of rectangular tiles.
On top of that there are other objects (I used ...