KeyShot Forum

Technical discussions => Animation => Topic started by: br3ttj on January 07, 2016, 11:41:05 am

Title: VR Animation Rendering Crash - Is Recovery Possible?
Post by: br3ttj on January 07, 2016, 11:41:05 am
Hi All,

Today, KeyShot crashed 90% of the way through a 60 hr. VR Animation render process (frame 1301 of 1440 frames total).  Does anyone know if it's possible to just render the remaining frames (1301 through 1440) and then have KeyShot compile them into the VR Animation?  If not, could the team at KeyShot consider adding this functionality? 
Title: Re: VR Animation Rendering Crash - Is Recovery Possible?
Post by: SebasDesign on January 07, 2016, 01:58:40 pm
i dont know if you tried this but in the render settings you can program it to render a specific period of the animation.. i don't think you can choose the exact frame to start with but you can choose the second closest to that frame...
Title: Re: VR Animation Rendering Crash - Is Recovery Possible?
Post by: APankow on November 04, 2016, 01:20:51 pm
I had this same issue and it caused a missed deadline. Our workaround was to create a sphere/circle of regularly placed points with the horizontal and vertical steps starting from the poles at a similar degree as the default VR turntable/sphere. Then we moved the camera to each point, re-aimed, and queued for render. This way if a render fails, we can just select that point, move the camera, and go.

To do this, you'll need to calculate a "regular placement" of points on a sphere. I put this in quotes because we weren't concerned with the displacement in the up-axis being uniform, only the displacement between angles. Our best guess was the the Default VR sphere starts and ends about 6.25° from the poles and is waistline aligned with the sphere (thus a single vertical step is a regular turntable)

For each point in the VR turntable/sphere :
   
Code: [Select]
x = radius * cosine of θ * sine of Φ   
Code: [Select]
y = radius * sine of θ   
Code: [Select]
z = radius * cosine of θ * cosine of Φ
where :
Code: [Select]
θ = the current vertical step * the vertical increment * (π/180)
Code: [Select]
Φ = the current horizontal step * the horizontal increment * (π/180)   
   π/180 because our calculations need to be done in radians

The increments can be calculated :
Code: [Select]
vertical = ( 180° - (2 * 6.25°))/ total vertical steps   6.25° is how shy of both polls the sphere turntable starts/ends
Code: [Select]
horizontal = 360° / total horizontal steps

To center theses on the equator, we remapped the vertical steps from [0,n] to [-n/2, n/2].
Code: [Select]
if( total_vertical_steps % 2 == 0 )
{
   new_start = -total_vertical_steps / 2;
   new_end = total_vertical_steps / 2
}
else {
   new_start = ( -total_vertical_steps + 1 ) / 2;
   new_end = ( total_vertical_steps + 1 ) / 2
}

Store all of this in a  python dictionary with the indices being your frames and the values being a list of x,y,z  coordinates. Then it's simply a matter of accessing and updating your camera.

*update (converting to Keyshot terms got me confused, we were using geographic terms; this should be accurate now)