16-825 Assignment 1: Rendering Basics with PyTorch3D

Name: Kashish Gandhi Andrew ID: kgandhi2


1. Practicing with Cameras (15 pts)

1.1 360° Renders (5 pts)

A full turntable of the cow mesh, sweeping the camera azimuth from 0° to 360°.

360 turntable of the cow mesh

1.2 Dolly Zoom (10 pts)

Field of view and camera distance change together so the cow’s apparent size stays constant while the background perspective warps.

Dolly zoom effect on the cow

2. Practicing with Meshes (10 pts)

2.1 Tetrahedron (5 pts)

Vertices: 4  ·  Faces: 4

360 turntable of a hand-built tetrahedron

2.2 Cube (5 pts)

Vertices: 8  ·  Faces: 12

360 turntable of a hand-built cube

3. Re-texturing a Mesh (10 pts)

color1 (front, smallest z) = [0, 0, 1] (blue) color2 (back, largest z) = [1, 0, 0] (red)

Each vertex’s color is linearly interpolated between the two based on its normalized z-position along the front-to-back axis.

Cow mesh with a front-to-back color gradient

4. Camera Transformations (10 pts)

Baseline render, produced by R_0, T_0:

Baseline camera transform render

Transform 1

R_relative rotates the camera 90° around its own viewing axis (a roll, using the rotation matrix [[0,-1,0],[1,0,0],[0,0,1]]). This doesn’t change the camera’s position or what point it’s looking at — it just spins the captured image itself, so the cow appears rotated 90° within the frame (lying on its side) rather than the camera having moved anywhere in the scene. T_relative is zero, since no repositioning is needed for a pure roll.

Camera transform 1

Transform 2

R_relative rotates the camera 180° around the vertical (y) axis ([[-1,0,0],[0,1,0],[0,0,-1]]), orbiting it all the way around the cow to view it from directly behind, at the same height and angle as the baseline. T_relative = [0,0,6] compensates for the fact that applying this rotation to the original translation flips the camera to the wrong side of the origin (behind, rather than in front); adding this restores the camera to a sensible viewing distance in front of the cow’s back, roughly matching the baseline’s distance.

Camera transform 2

Transform 3

R_relative is the same 180° rotation around the y-axis as Transform 2, again viewing the cow from behind. T_relative = [0,0,4.5] applies the same repositioning correction as Transform 2, but with a smaller magnitude — placing the camera noticeably closer to the cow than in Transform 2, so the cow appears larger in frame while still viewed from behind.

Camera transform 3

Transform 4

R_relative rotates the camera 90° around the vertical (y) axis ([[0,0,1],[0,1,0],[-1,0,0]]), orbiting it a quarter-turn around the cow to view its side profile instead of its front or back. T_relative = [-3,0,3] corrects the camera’s position after this rotation — the rotation alone leaves the camera off-axis and at the same depth as the object itself, so this term re-centers the camera and restores a sensible viewing distance directly out from the cow’s side.

Camera transform 4

5. Rendering Generic 3D Representations (45 pts)

5.1 Point Clouds from RGB-D Images (10 pts)

Left to right: point cloud from image 1, point cloud from image 2, and the union of both.

Three RGB-D point clouds side by side, rotating

5.2 Parametric Functions

Torus (10 pts) — sampled from the parametric torus equation, hole clearly visible while rotating.

360 turntable of a parametric torus point cloud

Bonus shape (5 pts) — sphere, sampled from the parametric sphere equation.

360 turntable of a parametric sphere point cloud

5.3 Implicit Surfaces

Torus mesh (10 pts) — extracted via marching cubes from the implicit torus function.

360 turntable of an implicit torus mesh

Mesh vs. point cloud tradeoffs (5 pts)

Meshes and point clouds are pretty different when it comes to quality, speed, memory, and how easy they are to build.

Bonus shape (5 pts) — metaball pair, blended via an implicit field.

360 turntable of an implicit metaball mesh

6. Do Something Fun (Extra Credit, +10 pts)

For this part, I made a snowman using multiple shapes combined into one scene with join_meshes_as_scene. The snowman is 3 spheres stacked on top of each other, biggest on the bottom and smallest on top for the head. I built these spheres myself using the same parametric equation from part 5.2, but this time as an actual mesh with triangles instead of just points (I looped over theta and phi and connected nearby points into triangles). I also added 2 small cubes: an orange one for the nose sticking out of the head, and a black one on top for the hat. The tricky part was making sure every piece used the same type of texture before combining them. join_meshes_as_scene gives an error if you try to combine a mesh that uses per-vertex colors with a mesh that uses an image texture, so I had to load everything with flat colors instead of using an actual image texture on any part.

360 turntable of a snowman scene built from spheres and cubes

7. Sampling Points on Meshes (Extra Credit, +10 pts)

Original mesh, then point clouds sampled with 10, 100, 1000, and 10000 points (area-weighted face sampling + random barycentric coordinates), shown side by side.

Cow mesh and four point-cloud samples at increasing density, side by side