Skip to content

Instantly share code, notes, and snippets.

View zc-alexfan's full-sized avatar

Zicong Fan zc-alexfan

View GitHub Profile
@zc-alexfan
zc-alexfan / render.py
Created May 14, 2025 19:37
Render normal with pytorch3d from a mesh
import torch
from pytorch3d.renderer import (
FoVPerspectiveCameras, RasterizationSettings, MeshRenderer,
MeshRasterizer
)
from pytorch3d.renderer.mesh.shader import ShaderBase
from pytorch3d.renderer import FoVPerspectiveCameras
from pytorch3d.renderer.cameras import look_at_rotation
from PIL import Image
import numpy as np
@zc-alexfan
zc-alexfan / Railroad_formula.ipynb
Last active May 19, 2019 16:42
Railroad formula
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.