Get Remaining Frame Fraction

 
 
 

Each particle gets simulated for the period of one frame. At the start of the simulation, this node returns a 0 value; at the end, it returns a 1 value, which means that the simulation is completed for this particle.

Normally, the simulation happens all at once inside the Simulate Particle node: this node applies the force to the particle's motion, updates the particle's position, and then sets the SimulatedFrameFraction value to 1. However, sometimes the simulation is done in smaller pieces, such as when calculating where a particle hits an object during the simulation of the frame.

If a particle moves from point A to point B during one frame of simulation, but within that frame it hits an object, the frame fraction is set to the ratio of the time already used up to the point where the particle hits the object. In this case, the Get Remaining Frame Fraction compound returns the remaining frame fraction (portion) that is left to simulate. The remaining frame fraction is a value between 0 and 1.

Plug this compound's Result output into any port that can accept a scalar (per point) value.

Category: Data Access

Output Ports: Result

Creative Commons License Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License