arabago96 commited on
Commit
54918e4
·
verified ·
1 Parent(s): 0be6ae4

Update trellis/utils/render_utils.py

Browse files
Files changed (1) hide show
  1. trellis/utils/render_utils.py +2 -7
trellis/utils/render_utils.py CHANGED
@@ -88,13 +88,8 @@ def render_frames(sample, extrinsics, intrinsics, options={}, colors_overwrite=N
88
 
89
 
90
  def render_video(sample, resolution=512, bg_color=(0, 0, 0), num_frames=300, r=2, fov=40, **kwargs):
91
- # Start with front-facing isometric view (corresponding to second 4.1 in original 120-frame video)
92
- # 4.1 seconds * 15 fps = 61.5 frames, which is (61.5/120) * 2π 3.246 radians
93
- front_isometric_offset = 3.246 # radians, approximately 186 degrees
94
-
95
- # Apply the same offset to both yaw and pitch wave to maintain the exact camera position
96
- yaws = torch.linspace(front_isometric_offset, 2 * 3.1415 + front_isometric_offset, num_frames)
97
- pitch = 0.25 + 0.5 * torch.sin(torch.linspace(front_isometric_offset, 2 * 3.1415 + front_isometric_offset, num_frames))
98
  yaws = yaws.tolist()
99
  pitch = pitch.tolist()
100
  extrinsics, intrinsics = yaw_pitch_r_fov_to_extrinsics_intrinsics(yaws, pitch, r, fov)
 
88
 
89
 
90
  def render_video(sample, resolution=512, bg_color=(0, 0, 0), num_frames=300, r=2, fov=40, **kwargs):
91
+ yaws = torch.linspace(0, 2 * 3.1415, num_frames)
92
+ pitch = 0.25 + 0.5 * torch.sin(torch.linspace(0, 2 * 3.1415, num_frames))
 
 
 
 
 
93
  yaws = yaws.tolist()
94
  pitch = pitch.tolist()
95
  extrinsics, intrinsics = yaw_pitch_r_fov_to_extrinsics_intrinsics(yaws, pitch, r, fov)