Spaces:
Running
on
Zero
Running
on
Zero
Update trellis/utils/render_utils.py
Browse files
trellis/utils/render_utils.py
CHANGED
@@ -94,9 +94,11 @@ def render_video(sample, resolution=512, bg_color=(0, 0, 0), num_frames=300, r=2
|
|
94 |
|
95 |
# Use a more consistent isometric pitch angle (around 35.26 degrees)
|
96 |
isometric_pitch = 0.615 # approximately 35.26 degrees in radians for true isometric
|
97 |
-
|
|
|
98 |
|
99 |
yaws = yaws.tolist()
|
|
|
100 |
extrinsics, intrinsics = yaw_pitch_r_fov_to_extrinsics_intrinsics(yaws, pitch, r, fov)
|
101 |
return render_frames(sample, extrinsics, intrinsics, {'resolution': resolution, 'bg_color': bg_color}, **kwargs)
|
102 |
|
|
|
94 |
|
95 |
# Use a more consistent isometric pitch angle (around 35.26 degrees)
|
96 |
isometric_pitch = 0.615 # approximately 35.26 degrees in radians for true isometric
|
97 |
+
pitch_variation = torch.linspace(0, 2 * 3.1415, num_frames)
|
98 |
+
pitch = isometric_pitch + 0.1 * torch.sin(pitch_variation)
|
99 |
|
100 |
yaws = yaws.tolist()
|
101 |
+
pitch = pitch.tolist()
|
102 |
extrinsics, intrinsics = yaw_pitch_r_fov_to_extrinsics_intrinsics(yaws, pitch, r, fov)
|
103 |
return render_frames(sample, extrinsics, intrinsics, {'resolution': resolution, 'bg_color': bg_color}, **kwargs)
|
104 |
|