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)¶
1.2 Re-creating the Dolly Zoom (10 points)¶
2. Practicing with Meshes (10 Points)¶
2.1 Constructing a Tetrahedron (5 points)¶
We need 4 vertices and 4 triangular faces.
2.2 Constructing a Cube (5 points)¶
We need 8 vertices and 12 traingular faces.
3. Re-texturing a mesh (10 points)¶
Colors Set:
- Green: torch.tensor([0, 1, 0])
- 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)¶
- 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}
- 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}
- 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}
- 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}
- 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}
5. Rendering Generic 3D Representations (45 Points)¶
5.1 Rendering Point Clouds from RGB-D Images (10 points)¶
Construct 3 different point clouds:
- The point cloud corresponding to the first image
- The point cloud corresponding to the second image
- 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.
![]() Figure 10: Image 1 Point Cloud |
![]() Figure 11: Image 2 Point Cloud |
![]() Figure 12: Image 1 & 2 Combined Point Cloud |
5.2 Parametric Functions (10 + 5 points)¶
- Torus
- Trefoil (New Object)
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.
- Torus
- Ellipsoid (New Object)
6. Do Something Fun (10 points)¶
Created a solid cylinder and tried different 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
![]() Figure 18: Original Cow Mesh |
![]() Figure 19: Sampled 10 points |
![]() Figure 20: Sampled 100 points |
![]() Figure 21: Sampled 1000 points |
![]() Figure 22: Sampled 10000 points |
In [ ]:






