Super Mario 64-Style Model Stretching
Luke Plewa

About

Mouse to World Coordinates

GPU Trilinear Interpolation

This project is inspired by the Super Mario 64 menu screen which featured a stretchable Mario face. The Luigi model is available for free use on TurboSquid.com. I improved the texture by adding a certain professor's face. I am using a special OBJ loader for TGA texture files from Robert Kooima.

One of the technical challenges of this project was the conversion of mouse to world coordinates. This conversion is necessary for the user to be able to manipulate the frame. In a lab, we covered the conversion from window to world coordinates onto a 2d scene with a fixed camera. In this project, the camera is able to move around in 3d space to better take advantage of the depth of the control points.

In class, we covered GPU bilinear interpolation in a lab. In this project, I implemented GPU trilinear interpolation. The amount of control points passed in is the product of the width, height, and depth of the frame. The control points are passed into the vertex shader as a uniform array. In the vertex shader, the position of the vertex is computed by interpolating across the eight control points which bound the vertex. The index of these appropriate control points is passed in as an attribute.