With this properly setup, we can now our Mesh Scene transform to our initial Bounding Box SDF transform.
For this:
-
Drag and drop your Exposed transform property from the Blackboard to your graph.
-
Create a transform operator.
-
Set this operator with the SDF information (Bounding box center and Scale).
-
Create a Transform(Matrix) operator.
-
Wire the Exposed property transform in the Transform port of the Transform(Matrix) operator.
-
Wire the Transform operator in the Matrix port.
-
Finally, wire the Transform(Matrix) output to the SDF Field Transform port.
-
Make sure that every transformation is in WorldSpace.
With this in place, the transform should match. Note that I’ve used a Position Shape (SDF) in the output (to Show you a live interaction), but the concept is the same as what we’ve previously discussed.
Now, there’s another method to make it work…
Sometimes, it makes sense for a VFX to be attached to a Mesh. In this case, the setup would be more simple. Indeed, no exposed transform is needed or the necessity to “apply” the Mesh Transform.
For this just use the SDF Bounding Box transform in Local Space and attach your VFX to your scene Mesh.
And finally, another solution that I sometimes use, is to make sure to center the Mesh in my DCC application and also scale it so that it’s 1 unit size (Fitting in a 1,1,1 Bouding Box). It’s not often possible to do this in production, as VFX artist tends to use meshes from other teams that cannot be edited this way. But let’s take a look.
I’ve reimported another Human mesh of 1 unit size and centered on (0,0,0).
By doing so, when I want to bake it with the SDF tool I can change the Box Center to (0,0,0), and Size to (1,1,1).
This also means, in this case, that a lot of space is wasted. as my mesh isn’t uniformly scaled at all. But this waste space could be okay for a “roundish” rock for example.
When your baked SDF is a perfect Box like this you can just take your Scene Mesh transform directly. This also means that you don’t need to memorize or store the information from the SDF bake tool.
I hope that this will bring some clarity and help you understand the delta between your Scene Mesh and Particles.
I do hope that in the future, I will try to revisit this workflow to simplify it a bit, especially the transform part.
Have a wonderful day and don’t be shy share your results 