This repository contains solutions for Assignment 1 of the 16-825 course, focusing on rendering basics using PyTorch3D. The results for each question can be reproduced by uncommenting the corresponding function calls in main.py. Comments in the code indicate the relevant question numbers.
To execute the code in main.py, follow these steps:
cd sragi_code_proj1
python -m starter.mainAll results will be saved in the submissions folder.
- Practicing with Cameras
- Practicing with Meshes
- Re-texturing a Mesh
- Camera Transformations
- Rendering Generic 3D Representations
- Do Something Fun
This mesh consists of 4 vertices and 4 faces, forming 4 triangles.
This mesh consists of 8 vertices and 12 faces, with 2 triangles forming each of the 6 square faces.
In this example:
color1 = [0.5, 0, 1]color2 = [1, 0.5, 0]
R_relative and T_relative describe the rotation and translation of the object's coordinate frame relative to the camera's coordinate frame. For example:
R_relative = [[0, 1, 0], [-1, 0, 0], [0, 0, 1]]
T_relative = [0, 0, 0]This configuration means:
- No translation from the current position.
- Rotation aligns the object's x-axis with the camera's y-axis, the object's y-axis opposite to the camera's x-axis, and the z-axes remain aligned.
- x = (2 + r/2 * cos(α/2)) * cos(α)
- y = r/2 * sin(α/2)
- z = (1.5 + r/2 * cos(α/2)) * sin(α)
Where:
rranges from -1.5 to 1.5αranges from 0 to 2π
- Rendering Quality: Meshes appear smoother but may lose finer details, while dense point clouds retain high-resolution data.
- Storage: Meshes are compact, whereas point clouds require more memory. High-precision meshes, however, also demand significant storage.
- Editing: Meshes are easier to edit and widely supported by CAD software. Point clouds, though harder to edit, are directly captured by sensors like LiDAR.
- Equation:
4 * (φ² * x² - y²) * (φ² * y² - z²) * (φ² * z² - x²) - (1 + 2 * φ) * (x² + y² + z² - 1)² = 0 - Ranges:
x,y,zrange from -1.5 to 1.5φis the golden ratio (approximately 1.618)
This is a Trefoil Knot that dynamically tightens and loosens over time. Additionally, colors flow through it:
- Red along the X-axis.
- Cyan along the Y-axis. 16-825 Assignment 1: Rendering Basics with PyTorch3D














