Mapping onto Polygons Wikipedia Explicit per-vertex coordinates…
Perspective Correction Wikipedia One does not simply interpolate values over a projected triangle…
Perspective Correction Worldspace midpoint Screenspace midpoint The lines sweep out the same points, but at different ‘t’ values
Perspective Correction A B P Not with ten thousand interpolators could you do this! It is madness! Project interpolated points != Interpolate projected points
Perspective Correction 1/w will interpolate u/w will interpolate
Perspective Correction Given vertices (x,y,z,w) and UV coords (u,v) –Compute 1/w at each vertex –Compute u/w, v/w at each vertex Use multiplication! –Interpolate 1/w, u/w, v/w in screenspace –Divide u/w,v/w by 1/w at each pixel “Perspective Divide”
Texture Atlas Properties of good UV layout: –Minimizes stretch –Maximize packing efficiency –Easy for artist to paint into Unlike that one… –Automatic is possible, but manual often preferred Zhou et al.