Assignment 1: Rendering Basics with PyTorch3D¶

Name: Simson D'Souza, Andrew ID: sjdsouza, Email: sjdsouza@andrew.cmu.edu¶


1: Practicing with Cameras (15 Points)¶

1.1 360-degree Renders (5 points)¶

Cow 360-degree Render
Figure 1: Cow 360-degree Render

1.2 Re-creating the Dolly Zoom (10 points)¶

Dolly Zoom
Figure 2: Cow Dolly Zoom

2. Practicing with Meshes (10 Points)¶

2.1 Constructing a Tetrahedron (5 points)¶

We need 4 vertices and 4 triangular faces.

Tetrahedron
Figure 3: Tetrahedron

2.2 Constructing a Cube (5 points)¶

We need 8 vertices and 12 traingular faces.

Cube
Figure 4: Cube

3. Re-texturing a mesh (10 points)¶

Cow Re-texture
Figure 5: Cow Re-texture

Colors Set:

  1. Green: torch.tensor([0, 1, 0])
  2. Blue: torch.tensor([0, 0, 1])

The front of the cow is colored green and the back is colored blue. With interpolation, a smooth gradient effect is observed, transitioning from green to blue.


4. Camera Transformations (10 points)¶

  1. Transformation 0: Description: Identity rotation (no rotation), no translation. \begin{array}{l} R = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix} \quad T = \begin{bmatrix} 0 \\ 0 \\ 0 \end{bmatrix} \end{array}
Camera Transform 0
Figure 6: Camera Transform 0

  1. Transformation 1: Description: 90° clockwise rotation about the z-axis, no translation. \begin{array}{l} R = \begin{bmatrix} 0 & 1 & 0 \\ -1 & 0 & 0 \\ 0 & 0 & 1 \end{bmatrix} \quad T = \begin{bmatrix} 0 \\ 0 \\ 0 \end{bmatrix} \end{array}
Camera Transform 1
Figure 7: Camera Transform 1

  1. Transformation 2: Description: Identity rotation (no rotation), translation of +3 units along the z-axis (move back). \begin{array}{l} R = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix} \quad T = \begin{bmatrix} 0 \\ 0 \\ 3 \end{bmatrix} \end{array}
Camera Transform 2
Figure 8: Camera Transform 2

  1. Transformation 3: Description: Identity rotation (no rotation), translation of +0.5 units along x (move right) and −0.5 units along y. \begin{array}{l} R = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix} \quad T = \begin{bmatrix} 0.5 \\ -0.5 \\ 0 \end{bmatrix} \end{array}
Camera Transform 3
Figure 9: Camera Transform 3

  1. Transformation 4: Description: 90° counterclockwise rotation about the y-axis, translation of −3 units along x (move right) and +3 units along z. \begin{array}{l} R = \begin{bmatrix} 0 & 0 & 1 \\ 0 & 1 & 0 \\ -1 & 0 & 0 \end{bmatrix} \quad T = \begin{bmatrix} -3 \\ 0 \\ 3 \end{bmatrix} \end{array}
Camera Transform 4
Figure 9: Camera Transform 4

5. Rendering Generic 3D Representations (45 Points)¶

5.1 Rendering Point Clouds from RGB-D Images (10 points)¶

Construct 3 different point clouds:

  1. The point cloud corresponding to the first image
  2. The point cloud corresponding to the second image
  3. The point cloud formed by the union of the first 2 point clouds. The following are the gifs in the above order shown side by side.
No description has been provided for this image
Figure 10: Image 1 Point Cloud
No description has been provided for this image
Figure 11: Image 2 Point Cloud
No description has been provided for this image
Figure 12: Image 1 & 2 Combined Point Cloud

5.2 Parametric Functions (10 + 5 points)¶

  1. Torus
Torus
Figure 13: Torus
  1. Trefoil (New Object)
Trefoil
Figure 14: Trefoil

5.3 Implicit Surfaces (15 + 5 points)¶

Some of the tradeoffs between rendering as a mesh vs a point cloud:

  • Rendering as a mesh provides smooth surfaces and realistic shading, making it higher quality for visualization, but itis computationally heavier.
  • Point clouds are faster to render and easier to generate directly from sensors, but they often look sparse and noisy without surface reconstruction.
  • Meshes generally use less memory, while raw point clouds can be large and unstructured. Overall, meshes are better for presentation and analysis, while point clouds are more convenient for quick inspection and real-time use.
  1. Torus
Torus Mesh
Figure 15: Torus
  1. Ellipsoid (New Object)
Ellipsoid Mesh
Figure 16: Ellipsoid
---

6. Do Something Fun (10 points)¶

Created a solid cylinder and tried different textures.

Cylinder Textures
Figure 17: Cylinder with various textures

7. Sampling Points on Meshes (10 points) (Extra Credit)¶

Following are the gifs of sampled 10, 100, 1000 and 10000 points from the original cow mesh

No description has been provided for this image
Figure 18: Original Cow Mesh
No description has been provided for this image
Figure 19: Sampled 10 points
No description has been provided for this image
Figure 20: Sampled 100 points
No description has been provided for this image
Figure 21: Sampled 1000 points
No description has been provided for this image
Figure 22: Sampled 10000 points

In [ ]: