i wanted to help someone with the skin wrap modifier, he tries to deform prt particles based on a deforming mesh, everything is fine, position updates correctly but he wanted to know if its possible to have the rotation of the particles follow the deformations of the mesh, i said he should try to cache the orientation and then update it also when loading into pflow again, but it seems the wrapper does not generate data for the rotation is that correct ? only workaround would be reading the closest surface point normal and apply the rotation change to the original rotation right ? Just wanted to ask in case there is a quicker solution for this issue
Our deformation pipeline is a bit strange as it is the base object (PRT Loader or PRT Volume) that does the deforming, so it does not depend on what modifier you are running.
It does not support the Orientation channel but it does deform the Normal and Tangent channels (which represent two of the 3 axes of the transformation matrix - the X and the Y). So if the PRT sequence contains the Normal and Tangent channels, once the deformations are performed and the result saved in a new PRT sequence, a KCM could be used to build a new Orientation.
You take the deformed Normal, calculate the Normalized Cross of Deformed Normal and Deformed Tangent and get the Deformed Z. Then you take the cross of the Deformed Normal and the Deformed Z and get a new Tangent that is orthogonal to both. This is necessary because the bending of space will make the deformed Normal and Tangent non-orthogonal to each-other.
I will try this in a minute and see if it works as expected.
I am testing this and not getting the correct result from ToQuat, so there might be something broken.
We are investigating.
EDIT: Looks like the ToQuat is producing a flipped value. This used to work in previous Betas, so something might have been broken lately. Once it is fixed, the cross of Normal and Tangent trick should work to produce deformed orientations.
We have fixed the handling of Quats in the upcoming Beta 6 build and the cross products from Normal and Tangent now produce identical Orientation values, so bending a PRT Loader with Normal and Tangent can produce an Orientation channel via KCM that looks like the Orientation is bending too. I will post an example in the Docs.
awesome bobo ! so curious about the legendary beta 6 already
It looks like it will be posted Monday - we had to fix some things and run out of time today.
I wrote the tutorial and can upload it before leaving, but it won’t work with the old build, so you will have to wait for Beta 6.
Here is the tutorial, as I said, it requires the Beta 6 which is not posted yet.
software.primefocusworld.com/sof … tation.php
Stay tuned…