arabago96 commited on
Commit
43b7518
·
verified ·
1 Parent(s): cea51c4

Update trellis/utils/render_utils.py

Browse files
Files changed (1) hide show
  1. trellis/utils/render_utils.py +4 -4
trellis/utils/render_utils.py CHANGED
@@ -88,10 +88,10 @@ 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 at 45 degrees from front and rotate from there
92
- start_angle = 3.1415 / 4 # 45 degrees in radians
93
- yaws = torch.linspace(start_angle, 2 * 3.1415 + start_angle, num_frames) # Full rotation starting from 45 degrees
94
- pitch = torch.tensor([0.4] * num_frames) # Fixed pitch for isometric-like view (slightly above)
95
  yaws = yaws.tolist()
96
  pitch = pitch.tolist()
97
  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
+ # Start at 135 degrees (45 + 90 more) and rotate from there
92
+ start_angle = 3.1415 * 3 / 4 # 135 degrees in radians (45 + 90)
93
+ yaws = torch.linspace(start_angle, 2 * 3.1415 + start_angle, num_frames) # Full rotation starting from 135 degrees
94
+ pitch = torch.tensor([0.6] * num_frames) # Higher pitch for proper isometric view
95
  yaws = yaws.tolist()
96
  pitch = pitch.tolist()
97
  extrinsics, intrinsics = yaw_pitch_r_fov_to_extrinsics_intrinsics(yaws, pitch, r, fov)