Assignment 1: Rendering Basics with PyTorch3D

1. Practicing with Cameras

1.1 360-degree Renders

Created a 360-degree turntable animation of the cow mesh using camera transformations around the object.

Cow 360° Render

Cow 360 degree render

1.2 Re-creating the Dolly Zoom

Implemented the dolly zoom effect by simultaneously moving the camera closer while increasing the field of view to maintain object size but change perspective.

Dolly Zoom Effect

Dolly zoom effect

2. Practicing with Meshes

2.1 Constructing a Tetrahedron

Created a tetrahedron mesh from scratch by manually specifying its vertex list and the 4 triangular faces (each face references 3 vertex indices). A tetrahedron always has: vertices = 4 triangle faces = 4

Tetrahedron

Tetrahedron rotation

2.2 Constructing a Cube

Built a cube mesh by defining the 8 unique corner vertices and decomposing each of the 6 square sides into 2 triangles (6 × 2 = 12). Summary: vertices = 8 triangle faces = 12 Each face pair shares its four corner indices; triangles are ordered for consistent winding (counter‑clockwise when viewed from outside).

Cube

Cube rotation

3. Re-texturing a Mesh

Applied procedural vertex coloring to the cow mesh. Two user-adjustable colors --color1,--color2 were blended based on normalized vertex positions to create a smooth spatial gradient.

Re-textured Cow

Re-textured cow mesh

Default colors:

cyan: --color1=[0,1,1] yellow: --color2=[1,1,0]

4. Camera Transformations

Explored different camera transformations and viewpoints to render the textured cow from various angles and distances using relative rotation and translation matrices.

View 1: Rotated Camera

Camera transformation view 1

The camera is rotated about its optical axis (z-axis in camera space) by +90°.

R_relative = [[0, 1, 0], [-1, 0, 0], [0, 0, 1]] T_relative = [0, 0, 0]

View 2: Translated Camera

Camera transformation view 2

Camera orientation remains the same as the front view, but translated further away along the z-axis, making the cow appear smaller in frame.

R_relative = [[1, 0, 0], [0, 1, 0], [0, 0, 1]] T_relative = [0, 0, 3]

View 3: Camera Offset

Camera transformation view 3

The camera is translated to the upper right so the cow appears relatively at the lower left in the frame.

R_relative = [[1, 0, 0], [0, 1, 0], [0, 0, 1]] T_relative = [0.5, -0.5, 0]

View 4: Rotated and Translated

Camera transformation view 4

The camera is rotated around y-axis at the world center by 90° counter-clockwise and translated 3 units along z-axis.

R_relative = Ry(90) = [[0, 0, 1], [0, 1, 0], [-1, 0, 0]] T_relative = [0, 0, 3] T = R_relative @ torch.tensor([0.0, 0, 0]) + T_relative

5. Rendering Generic 3D Representations

5.1 Rendering Point Clouds from RGB-D Images

Converted RGB-D images into 3D point clouds and rendered them from different viewpoints. Created both individual and combined point cloud visualizations.

Point Cloud 1

Point cloud 1 rotation

Point Cloud 2

Point cloud 2 rotation

Combined Point Clouds

Combined point clouds

Union Point Cloud

Union point cloud

5.2 Parametric Functions

Generated 3D surfaces using parametric equations. Created both a standard torus and a custom twisted torus with mathematical transformations.

Torus Point Cloud

Torus point cloud

Custom Twisted Torus

Custom twisted torus

5.3 Implicit Surfaces

Rendered 3D meshes from implicit surface functions using marching cubes algorithm. Generated both torus and heart-shaped implicit surfaces.

Torus Implicit Mesh

Torus implicit mesh

Heart Implicit Mesh

Heart implicit mesh

6. Do Something Fun

Created a 360-degree depth (z-buffer) visualization of the airplane mesh. The depth values are normalized per frame and inverted so that nearer surfaces appear brighter against a black background.

Airplane Depth Visualization

Airplane depth visualization