I saw selective wake-up in release notes 2018b, sounds interesting for performance. How to activate ?
Here some documentation written by our specialists.
Selective wake-up is related to the Auto-sleep feature (https://www.cm-labs.com/vortexstudiodocumentation/Vortex_User_Documentation/Content/Editor/editor_assemb_thresholds.html). It allows to control more precisely the conditions over which a sleeping part can be waken-up.
The new inputs are located in a sub-container of the Auto-Sleep feature.
They are both inputs in order to changing their value during run time takes effect.
The feature adds two more conditions on top of the wake-up conditions of the auto-sleep feature. They add more restrictions to have parts to be woken up. It then allows to have a group of touching parts to stay asleep together even if a small disturbance would have woken up otherwise.
1- If the sleeping part is connected to an other part through a constraint or a contact, the speeds or the accelerations introduced by the connection must be
larger than the auto-sleep threshold multiplied by the "Wake Up Threshold Scale".
Notice that, here the speed and the acceleration are taken in constraint space.
2- If a sleeping part gets waken-up, all other connected part(s) up to a "Wake Up Depth" will be waken-up as well. The "Wake Up Depth" represents the number of parts that can be reached
by "traveling" from part to part through constrains. For example, if "Wake Up Depth" is set to one, only the set of parts directly connected to the waken-up part will be waken-up.
In the clips below, small spheres and their color gives some information. First, their position represent the position of the center of mass of a simulated object.
Second, the color gives the simulation state of a part as follow:
To activate the display of center of mass, right click on the eye icon next to a part, assembly or mechanism:
The next two movies are intended to demonstrate the effect of the Wake Up Threshold Scale. Both clips start with a stack of boxes that are asleep. Note that at this point the simulation cost is at minimum as only few parts are actually simulated. The idea here is to show what means "speed and the acceleration are taken in constraint space". At a certain point in the clips, the top box will be pulled on the side with the mouse spring. This automatically triggers a wake up of the part as this corresponds to adding an external force on the part. Notice also that in this example, the Wake Up Depth as been set to zero, meaning that the waking up will not propagate to the next box under it. Now look at the effect of the Wake Up Threshold Scale. In the clip on the left, the Wake Up Threshold Scale is really high. Therefore, a large speed (or acceleration) must appear in the contact sliding direction (recall:speed and the acceleration are taken in constraint space) before waking up the next box to it. On the clip on the right, the Wake Up Threshold Scale is small and then the waking up appears right away when a velocity appear in the contact.
|High value for Wake Up Threshold Scale||Low value for Wake Up Threshold Scale|
|Selective wake-up disabled||Selective wake-up enabled|
This two movies shows the effect of the "Wake Up Depth" inputs. At the begininng of the sequence the stack of boxes seat on a slowly rotating table. As long the table rotates nothing can fall asleep. At some
point in the sequence the table is stopped to rotate allowing the boxes to eventually fall asleep. At some point later, mouse spring is applied on the top box. On the left movie, the selective wake up is not enabled and when the mouse spring wakes up the top box, it's all the stack that wakes up. On the movie on the right, the relative wake up is activated with "Wake Up Depth" equal to 2. When the mouse spring is applied on the top box, only the two next boxes to it are woken up.