12
votes
Accepted
Perspective Correct Texture Mapping
You are on the right track but what you need to do is to calculate u/w and v/w, and also 1/w for each vertex, which you interpolate linearly in screen space in your rasterizer. Then for every pixel ...
10
votes
Accepted
Tone Mapping vs Gamma Correction
I think it would be a good idea to get back to the basics. It's a large post, so there's a recap at the end.
Colour can be represented in a couple of ways. We can have Red, Green and Blue (RGB). We ...
6
votes
Accepted
How do I convert a hit on an infinite plane to UV coordinates for texturing in a Raytracer?
If your plane has a normal of $\begin{pmatrix}0 & 0 & z\end{pmatrix}^T$, then your computation
...
6
votes
Accepted
Minimum requirements to uniquely represent a 3D object in space
A rigid body has 6 degrees of freedom, in 3D- space. So that means you need 6 values to represent the object. The common way to do this is to store a position vector for position and 3 rotations. But ...
5
votes
Tone mapping bright images
There are multiple different ways to do tone-mapping, including both local and global methods. I won't discuss local methods (i.e. methods based on using surrounding information as part of the tone ...
3
votes
Is Relief Mapping techniques being used these days?
"Relief Texture Mapping" is comparable to "Parallax Occlusion Mapping" (POM). POM is common in rendering systems/games and more popular then the "Relief Texture Mapping" ...
2
votes
Accepted
Texture Mapping jagged pixel edges
I strongly suspect that you are simply running out of floating point precision (at least in "U" dimension). With this sort of mathematics, the LSBs will soon become noisy resulting in the jagged ...
2
votes
Accepted
Is there a term for mapping between two arbitrary quadrilaterals without using homography / perspective projection?
Yes, this is called bilinear interpolation or a bilinear mapping. The term "bilinear" crops up more commonly in the context of image resizing or resampling, but it's the same basic idea for ...
2
votes
Accepted
Rotation matrix for a 3D object in space
Skimming the math. Starting with a quaternion $Q=w+\left(x,y,z\right)$ then we can rotate $\mathbf{v}$ by:
$$\mathbf{v}' = Q\mathbf{v}Q^{-1}$$
and if $Q$ is unit magnitude this reduces to:
$$\...
2
votes
Accepted
Confusion about HDR image pipeline
Note that the other answer that you linked to is describing only a tonemapping operator, and does not include any exposure scaling at all. It's not replacing your steps 2 and 3 in the process, but ...
2
votes
Deriving formula for perspective correct interpolation
This is to long for a comment so I put it as an answer (but it is really more of a long comment)
Deriving formula for perspective correct texture interpolation : solving for texture coordinate ...
2
votes
How to map texture pixels to the corresponding 3D positions?
Well, there is no 1:1 correspondence the pixel might be in many locations at once.
What your asking is relatively easy. Just iterate through each triangle (f). Then get the texture coordinate of each ...
2
votes
Accepted
Controlling "zoom" and "position" of a cubemap in shaders
Reflections based on a cubemap best represent a reflection at infinity. That is, since the only factor that a cubemap provides is direction, the cubemap acts as though it were at a distance from the ...
1
vote
Accepted
What is mipmapping?
Mipmapping is a pre-computed texture scheme that tries to solve the problem of texturemap aliasing. When a screen pixel from a textured polygon covers many texture pixels, the pixel should be sampled ...
1
vote
Accepted
convert image pixel dimensions to UV
UV coordinates are defined such that (0, 0) is your lower left (or upper left, depending on what you're working with) corner of the image and (1, 1) the opposite corner (technically (1, 1) is outside ...
1
vote
How is this normals map supposed to work?
Yeah, that doesn’t look like any bump, height, or normal map I’ve ever seen—as you’ve identified, there’s only information about the surface contour along a single axis. If anything, it looks like it’...
1
vote
I need to build my own map renderer
If you have the prerendered images, you can "simply" render them onto a grid of quads. This is done with texturing, i.e. you upload the image to your GPU as a texture and apply texturecoordinates to ...
1
vote
Getting texture value of cartesian coordinate from a Obj file
Your question is very broad because it is close again to "how to I render 3D objects". So some people might give you a more precise answer than mine but at least I will try to give you some pointers.
...
1
vote
Texture Mapping jagged pixel edges
In my case, i fixed the problem adding Dx' for interpolation of x-direction.
In edge scan line of x-direction, I use integer-type for speed-up but ingnored dx' as below. I changed variable type from ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
mapping × 28texture × 10
rendering × 6
3d × 4
uv-mapping × 4
transformations × 3
normal-mapping × 3
opengl × 2
raytracing × 2
computational-geometry × 2
mesh × 2
sampling × 2
perspective × 2
c++ × 1
algorithm × 1
mathematics × 1
image-processing × 1
color × 1
webgl × 1
matrix × 1
2d × 1
interpolation × 1
reflection × 1
vertex-buffer-object × 1
line-drawing × 1