Polygons with three corners or vertices and three sides or edges which are line segments.
0
votes
0answers
15 views
PolyMesh interpolated by Besier triangles is not smooth (?)
I implemented cubic Besier triangles patches (N-Patches] monstly following tutorial from gamasutra
But polygon mesh (e.g. tetrahedron in following example) interpolated by that technique is not ...
0
votes
1answer
47 views
Clamp point to triangle for sphere collision
I'm having some issues clamping a 3d to barycentric triangle. I've searched for some time now and keep seeing the same results, that (u,v,w) should be clamped between 0 and 1. But when I clamp those ...
0
votes
2answers
54 views
My C++/OpenGL “Hello Triangle” Code Does Not Draw A Triangle When Using SDL As A Window Library
I have been using the website Learn OpenGL but I am using SDL as a window Library.
My code seems to builds the window correctly but no triangle appears. I am compiling my code using Visual Studio ...
0
votes
0answers
23 views
Formula for trajectory of object reflecting on walls
I've been trying to make an AI, but because i'm not sure where to start with predictions or scans for if an object will come into contact with the bot, I tried looking for formulas, etc, but the ...
0
votes
0answers
53 views
Merging coplanar triangles of mesh into polygons
I have a 3d city model and imported it into unity. I need to merge coplanar triangles into polygon surfaces because I want to create grids on building surfaces. How can I make this possible? Are there ...
0
votes
1answer
93 views
Load 2 triangles in a simple DX11 example
I'm following this tutorial, where they show how to setup a simple dx11 demo with a green triangle in the middle. I'd like to be able to modify it so that it shows 2 triangles instead, i modified the ...
-1
votes
1answer
112 views
How to fill a canvas with triangles that are seemingly random?
Given a canvas say, 1000 X 1000 unit. I would like to fill the canvas with triangles. The triangles can be of any type right angle, equilateral...etc. To avoid big chunks of triangles lets say all ...
0
votes
1answer
40 views
How to rotate a triangle to look at a point?
Lets say I have a triangle defined by 3 vertices and a center point, how do I rotate the triangle so its normal is looking at a specified point?
0
votes
4answers
102 views
If a 3d surface is occluded by another 3d surface, does this have any effect on the performance and rendering speed?
We have a 3D character who is wearing a Gauntlet on his forearm and visibility of which can be turned on and off. Would it be better to create 2 versions of arm, one without extra triangles that are ...
1
vote
1answer
192 views
How to reproduce this triangle filling scanline effect using a shader?
I'm writing a renderer for an old DOS game were 3D polygons were rendered in software. I'd like to simulate, using a shader, the following material/effect, used for filling a triangle :
The fist ...
3
votes
1answer
233 views
The better performance in occlusion culling, plane or quad?
In the above picture, when the left camera shows two small parts of the quad, all of that is rendered (it can be a very large quad). But in the right one only two small parts of it is rendered.
Which ...
0
votes
1answer
349 views
How to rotate a triangle towards the point in Qt?
I have an issue with items rotating.
I have a point and a triangle which needs to be rotated with its apex point towards the taregt point. The right side of the picture represents how it is should to ...
0
votes
0answers
41 views
Triangle mesh - curvature
I have a triangle mesh with normals. What algorithm is considered to be "standard" with best possible quality for triangle mesh curvature computation (mean and gauss).
Something like for normal ...
3
votes
2answers
186 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 (...
2
votes
1answer
356 views
Calculate the slope of a 3D triangle?
I have lots of triangles in 3D space. How do I determine the slope/angle of these triangles with respect to a fixed ground plane? I need pseudo code examples at the very least. Thanks!
[edit]
Based ...
0
votes
1answer
256 views
Should a mesh consist of triangles or quads?
Currently I am a bit puzzled. I am writing my master thesis about procedural mesh and texture generation and for that I am writing a Blender Add-On to generate low poly planets with physical ...
4
votes
1answer
566 views
Generating mesh along path
I'm currently trying to generate a path along an array of points(Vector3)
This is the result i'm currently getting
The dark gray points are the given path
The red points are the generated verticies
...
0
votes
0answers
34 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
1answer
225 views
Does triangle-plane clipping in 3D always produce a triangle?
When you clip a triangle against a plane, will you always get a triangle out? Are there perhaps cases where you don't get a triangle out of clipping it against a plane?
-1
votes
1answer
178 views
Libgdx Drawing a triangle cannot resolve method “render ”
I am looking to draw a triangle. I found a lot of code such as : https://github.com/libgdx/libgdx/wiki/My-First-Triangle-%28Example%29
The code I found are old I think; if I use
mesh.render(GL20....
5
votes
1answer
181 views
Make a triangular mesh from of a map defined by points that follow the coast lines
I have a set of points which follow the coast lines of a world map. I would like to somehow triangulate so that I can render the continents filled in. The points seam to be in order so that if you ...
2
votes
1answer
91 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
1answer
805 views
Discarding triangles in Unity
I have about 2+ years of experience in computer gaming development and I just started writing my own shaders to help me utilize performance. I have this problem that I'm trying to work around but ...
1
vote
1answer
2k views
Triangle-Triangle Intersection Code
Does anyone have experience implementing this triangle-triangle intersection code that I found online? I don't understand it. I made a post on Stack Overflow about this and got the advice that:
...
4
votes
1answer
1k views
Fastest way to find closest triangle of mesh from specified point
I have two triangle meshes (let me call them A and B). The meshes may be really big (10.000 - 100.000 polygons). I want to find for every point in A the closest triangle from mesh B.
Is there fast ...
2
votes
1answer
925 views
Triangles go missing as Z changes
I'm rendering a height map using shader-based OpenGL (3.3 to be precise). The height map data is from a grayscale bitmap (2D array of bytes). The dimension of the bitmap is 256 x 256.
With this data, ...
0
votes
1answer
454 views
OpenGL: I only see one square instead of a cube / giving information to vertex shader
I am new to OpenGL and tried to follow this tutorial. I use C# and OpenTK. So I translate the C++ Code from the Tutorial:
My C#-Code:
/* Hintergrundfarbe */
GL.ClearColor(0....
0
votes
1answer
111 views
Create dynamic cities of perspective angle x with least amount of tiles
I found you can create unique building sizes with perspective with six tiles using parallel projection, whose angles are always 45 degrees... this allows you to connect to the next tile without issue:
...
-1
votes
1answer
470 views
Why does this code to render a triangle in SlimDX only show a black screen?
Here is the code:
var elements = new VertexElement[] {
new VertexElement(0,0,DeclarationType.Float3,DeclarationMethod.Default,
DeclarationUsage....
3
votes
1answer
194 views
Generate 2D Triangular Mesh from Vertices on a Map
Given a map of vertices {(x1,y1), (x2,y2), ... (xn,yn)}, how can I generate a 2D triangular mesh covering all vertices, and where the area of all triangles completely covers the map?
The triangular ...
1
vote
2answers
356 views
OpenGL drawing, breaking down triangles
if I want to use no textures in a game (i.e png's), would I just break down my drawing into triangles and combine them the way I want? I found this in Google Images.
1
vote
1answer
489 views
Given face normal and vertices of a triangle, how to find the acyclic order of vertices?
I'm in the process of constructing a custom 3D triangle mesh.
I found the vertices of the triangle in the 3D space and it's face normal. How do I find the acyclic order of vertices?
If I draw the ...
0
votes
2answers
251 views
How to draw non-triangulated mesh?
I am working with DirectX (C#/C++).
I am wondering is it possible to do not triangulate meshes and what the difference between cases (in loading and rendering code)? If so, how to do this? I know ...
6
votes
2answers
2k views
Triangle-triangle continuous collision detection
I am making a 3D game engine and I use continuous collision detection. I am using Sphere-Trees to cull primitive collision checks to a minimum. However, I'd like to perform continuous triangle-to-...
2
votes
1answer
411 views
Directional, Triangular Collision Detection in Pygame [duplicate]
I am trying to create a game in Pygame, with Python 3, and am trying to figure out an algorithm that will tell me which direction a rectangle is colliding with a rectangle, so that I can push it back ...
2
votes
1answer
613 views
How does the Direct3D 9 rasterizer determine triangle coverage?
I'm working on a software rasterizer to use in my project. I have implemented one that works well, however, often my rasterizer under or over estimates triangle coverage. I need perfect emulation of ...
2
votes
2answers
444 views
Angle between two planes
I have two triangles in 3d space which share 1 edge and I would like to determine if the angle between their normal vectors is "uphill" or "downhill". In other words, if you set one flat, would the ...
5
votes
1answer
3k views
Quads Vs Triangles
I'm curious to know which is better for games? Quads or Triangles? Wouldn't quads be better for rendering performances and smoothing out tessellation?
1
vote
2answers
165 views
XNA Calculate two points of triangle with given Z
I want to calculate the two points of a 3D triangle that have a specified Z coordinate. I guess the way to do this would be to somehow create a plane which is perfectly flat with my given Z coordinate ...
2
votes
1answer
5k views
How do I find the circumcenter of a triangle in 3D?
I want to find the circumcenter of a triangle. Wolfram only shows how to find the circumcircle of a triangle in R2. How can I find the circumcenter of a triangle in R3?
2
votes
1answer
276 views
SAT test for Triangle - convex hull
I'm having real trouble resolving this issue with triangle-convex hull SAT test intersection.
The problem is as follows:
Misses are detected accurately enough:
Clear miss
I have not found a ...
1
vote
1answer
258 views
Efficient way to draw multiple separated quads
Let's assume I want to draw several separated (possibly textured) quads in Direct3D 9, each consisting of two triangles:
How should I draw these for maximum performance, i.e. which of the following ...
3
votes
1answer
369 views
Moller Tri Tri intersection
I'm done implementing Moller's tri-tri intersection routine. It gives you the location of where each triangle edge intersects the line of intersection between the 2 triangle planes:
Really you get ...
0
votes
4answers
317 views
Is there a game not using meshes for models? [closed]
Traditionally, models consist of lots of vertices connected by triangles. That forces the use of a high amount of vertices for detailed organic shapes or makes models kind of blocky. Even though ...
0
votes
1answer
140 views
XNA 4.0 thick triangle strip to fix aliasing issues upon rotation
My triangle strip based lines are disappearing intermittently when I rotate my camera around the X axis.
I was advised that this is due to aliasing issues and that "At a certain angle when its edge ...
0
votes
1answer
247 views
How do I implement my old OpenGL-based gfx_render_triangle_list using DX11?
I am working at a game that has lots of procedural content. I had built a game engine using OpenGL that handles everything needed for creating a basic 2D game, sprites, primitives, blending, polygons ...
7
votes
2answers
5k views
Unity's “Stats” window displays bizzare number of triangles and vertices
In my Unity scene I have:
7-8 Barrels (with lids) each at about 2-400 triangles.
4 planes, each at at the very most 200 triangles
camera, 3 lights, a FPS controller
When I turn on the "Status" ...
4
votes
2answers
478 views
Optimizing models & improving performance
I've created a map editor for a game I've been developing. The maps (planets) are made using a form of meta ball editing. Basically, in the end the Marching Cubes algorithm is used to get my final ...
5
votes
1answer
1k views
How to draw a trapezoid in OpenGL?
The question seems easy, but you simply change vertex positions to match the corners of a trapezoid but it simply fails. I've tried scaling top and bottom edges like this :
but when I apply my ...
2
votes
3answers
9k views
Mesh with quads to triangle mesh
I want to use Blender for making models yet realize some of the polygons are not triangles but contain quads or more (example: cylinder top and bottom). I could export the the mesh as a basic mesh ...