27
votes
Accepted
Why is the transposed inverse of the model view matrix used to transform the normal vectors?
Here's a simple proof that the inverse transpose is required. Suppose we have a plane, defined by a plane equation $n \cdot x + d = 0$, where $n$ is the normal. Now I want to transform this plane by ...
23
votes
Accepted
What is the state of art in geometric LOD in games?
For the geometry LOD most games simply switch between a number of predefined LOD meshes. For example "Infamous: Second Son" uses 3 LOD meshes (Adrian Bentley - "inFAMOUS: Second Son engine postmortem",...
16
votes
Accepted
Why smoothed meshes in 3D studio end up with the same number of vertices/triangles? How then can they be smoothed with the same geometry?
Smooth in this case just makes the surface normals at vertices point the same way, when interpolated it looks smooth. Meshsmooth would add vertices.
1) how is the smoothing possible without ...
16
votes
Accepted
Visualizing the Lane-Riesenfeld Algorithm
The Lane-Riesenfeld algorithm subdivides the control polygon of a B-spline to create a new control polygon with the same limit spline. It's made up of two steps: first, duplicating all of the control ...
12
votes
How to Calculate Surface Normals for Generated Geometry
I see mainly three ways of computing normals for a generated shape.
Analytic normals
In some cases you have enough information about the surface to generate the normals. For example, the normal of any ...
11
votes
Accepted
How to Calculate Surface Normals for Generated Geometry
You simply dont want fully smooth results. While the commented method by Nathan Reed: "Calculate each vertex to face normal, sum them, normalize sum", generally works it sometimes fails spectacularly. ...
9
votes
Accepted
Maximum number of vertices after clipping a triangle against an AABB
Funnily enough, I asked this exact question on Math.SE a couple years ago: Maximum number of vertices in intersection of triangle with box.
The answer is 9 vertices, because each of the 6 planes of ...
9
votes
Accepted
Logarithmic spiral with equal vertex spacing, what equations?
Since a logarithmic spiral is defined by
$r=e^{a\cdot\theta}$,
the inverse of the equation is this:
$\theta=\frac{\ln{r}}{a}$.
If we want to be able to control our step value, we can multiply it ...
9
votes
Why are oct trees so much more common than hash tables?
Lots of things here.
"When reading papers". What papers? If the topic of the paper is about something other than the spatial partitioning structure, it could be fair to use whatever knowing that the ...
9
votes
Accepted
How does UV unwrapping work?
UV unwrapping is a difficult topic. They can be both combinatorial algorithms or variational methods but in general they're optimization based, i.e. you setup an optimization problem and you solve it ...
7
votes
Accepted
Projected grid water horizon detail
I believe a common solution is to split the camera transform used to project the grid from the camera transform that is used to render the grid. At perspectives close to top-down, the two cameras ...
7
votes
Why is the transposed inverse of the model view matrix used to transform the normal vectors?
This is simply because normals are not really vectors! They are created by cross products, which results in bivectors, not vectors. Algebra works much different for these coordinates, and geometric ...
7
votes
What formula or algorithm can I use to draw a 3D Sphere without using OpenGL?
Scratchapixel has a nice tutorial on writing a basic rasterizer here. Also, you could use the projection algorithm here to get the position of the vertices in screen space, then use Bresenham's ...
7
votes
Accepted
Archimedean spiral in C++
Figured it out :) The dominos are now being placed along the X and Y coordinates generated by the function.
The original code in the question was plotting a wave of points outwards from the centre ...
7
votes
Accepted
What are 'mesh clusters' / hierarchical cluster culling (with LOD?) / triangle cluster culling and how do they relate?
First, to preface: the reason it's hard to find details about these hierarchical cluster culling systems because they are a still emerging field, at the very cutting edge of real-time rendering ...
6
votes
Ordering a set of unorganized points along a curve
You have an instance of a problem called curve reconstruction from unorganized points. Now that you know what to search for you'll find several methods, such as the crust, NN-crust, etc. Here are a ...
6
votes
Projected grid water horizon detail
You can be both realistical and real-time. the secret is to change representation each time the information get under the Shannon-Nyquist (i.e. grid) scale: from geometry to normal maps to shading ...
6
votes
Accepted
How should I fill a shape consisting of Bezier curves and straight lines?
If you are in a hurry to get your renderer working and you already have the filled polygonal routine functioning correctly, can I suggest an alternative, possibly easier approach? Though I'm not ...
6
votes
Why are texture coordinates often called UVs?
This is not a definitive answer, but it is generally accepted that Ed Catmull introduced Texture Mapping in his 1974 thesis, "A SUBDIVISION ALGORITHM FOR COMPUTER DISPLAY OF CURVED SURFACES"
...
5
votes
Accepted
Calculate aspect ratio from 2D shape in 3D space
The ratio is with a quick and dirty visual measurement $665:501$ which is approximately $5:4$. You can measure it by taking the ratio of the vanishing angles $\alpha/\beta$ (see picture 1) because we ...
5
votes
Accepted
How to convert Non-Axis Aligned Bounding Boxes to AABB
You can assign a coordinate system to each nAABB in such a way that the nAABB becomes an AABB in its own coordinate system. We call this a local coordinate system.
I assume rays are expressed in a ...
5
votes
Accepted
Does a point have a length?
No, a point does not have a length. A point is only a location - it has no extent in any direction.
You are correct in guessing that the function vSize() returns ...
5
votes
Accepted
Apply distortion to Bézier surface
Edit: changed the answer according to new images and clarification.
for every control point p(k, n)
p'(k, n) = ( p(k, n) - p(k) ) * d * l(k) + p(k, n)
where <...
5
votes
Accepted
Convex non simple polygon?
For a polygon to be convex the outside angle of the polygon has to be more than or equal to 180 degrees. Now at intersection of 2 lines the outermost angle has to be less than 180 degrees for the ...
5
votes
Accepted
Why are oct trees so much more common than hash tables?
My 2 cents from writting the Chipmunk2D physics engine is that spatial hashing is great when you have a lot of objects that are all the same size. I had a demo 10 years ago that ran with 20k ...
5
votes
Why are texture coordinates often called UVs?
In math, geometry and physics it is common practice to use the coordinates $(u,v)$ to represent an arbitrary parameterization, including those of a surface in a 3d Euclidean space. Since the ...
4
votes
Archimedean spiral in C++
This isn't really a direct answer to this question (that already has an answer anyway), but might interest people who want to implement this algorithm in 3D.
I had to try implementing this algorithm ...
4
votes
Ordering a set of unorganized points along a curve
After some clarifications, there is probably a much better approach that doesn't even require knowing the parametric form of the curve, and also avoids the potentially problematic numeric minimisation ...
4
votes
Sampling against geometry normals
That is, to my knowledge, a problem without a proper solution. You're seeing the discrepancy between shading normal and geometry normal and it becomes obvious, that the shading normal is just a trick. ...
4
votes
Accepted
Calculate a rotation around an arbitrary axis
Take a point $P$ and it's rotated point $P'$.
Find the plan that runs through the middle between them $C = \frac{P+P'}{2}$ and is perpendicular to the line connecting them.
Do this for all 3 of them ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
geometry × 155computational-geometry × 60
mathematics × 36
mesh × 35
3d × 26
algorithm × 24
transformations × 13
c++ × 11
projections × 11
raytracing × 10
rendering × 8
polygon × 8
model × 5
data-structure × 5
subdivision × 5
shader × 4
perspective × 4
interpolation × 4
curve × 4
clipping × 4
triangulation × 4
gradient × 4
image-processing × 3
shading × 3
2d × 3