Skip to main content
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 ...
JarkkoL's user avatar
  • 3,686
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 ...
bram0101's user avatar
  • 1,615
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 ...
Michael Kenzel's user avatar
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 ...
joojaa's user avatar
  • 8,457
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 ...
haasn's user avatar
  • 175
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" ...
pmw1234's user avatar
  • 3,484
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 ...
Simon F's user avatar
  • 4,336
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 ...
Nathan Reed's user avatar
  • 25.3k
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: $$\...
MB Reynolds's user avatar
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 ...
Nathan Reed's user avatar
  • 25.3k
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 ...
pmw1234's user avatar
  • 3,484
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 ...
joojaa's user avatar
  • 8,457
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 ...
Nicol Bolas's user avatar
  • 9,997
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 ...
beyond's user avatar
  • 315
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 ...
Tare's user avatar
  • 1,613
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’...
Noah Witherspoon's user avatar
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 ...
Tare's user avatar
  • 1,613
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. ...
user18490's user avatar
  • 656
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 ...
zeroe's user avatar
  • 11

Only top scored, non community-wiki answers of a minimum length are eligible