transforms2points, points2transforms

21 views
Skip to first unread message

Paolo DE LUCIA

unread,
Sep 26, 2025, 3:22:15 AM (4 days ago) Sep 26
to gaffer-dev
Hello gaffer gurus,
I come to you with some sort of gaffer challenge :

I have a city made of dozens of buildings, sometimes placed by hand, sometimes by an instancer. I'm preparing the breakdown of this scene and would like to add a value to the transforms of these buildings to drop them from the sky, in a specific direction/timing.
My first idea to do that was to query all the transforms of my buildings in worldspace and create a pointCloud from it. Then, I would have used the closestPointSampler to get the UV of an underlying plane and write it back to the transforms after some tweaking.
I used to do that pretty easily on forests with the instancer node, manipulating the P of my source pointCloud but keep on failing when dealing with transformed objects.
(I'm joining the scene that illustrates the effect)
Ideally, I'd like to feed the closestPointSampler with a list of worldPositions instead of the P primvar of a geometry, and send it back to the transforms.
Any idea is welcomed (even with transformQuery/transform nodes).



testPointsTransform.gfr

John Haddon

unread,
Sep 26, 2025, 4:30:26 AM (4 days ago) Sep 26
to gaffe...@googlegroups.com
Hi Paulo,

This may not be exactly what you're looking for, but I think it's close enough that it'll at least give you some ideas. It's a simple example I knocked up a while back for someone else who was making breakdowns.

In my example I've used an Instancer to place the objects, but the "drop" part is downstream, and works on the transforms rather than the points. So it doesn't care if the source was an instancer or not. There are two variants - in both you specify the drop motion using an animation curve - you can edit that in the Animation Editor by selecting the TimeWarp node. The TimeWarp is used to control the timing of the drop for each object. In the "Random" variant they're all just offset randomly in time. In the "Wipe" variant, you control the timing by animating the coordinateSystem in X - the animation starts as it passes each object.

Hope that helps...
Cheers...
John




--
You received this message because you are subscribed to the Google Groups "gaffer-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gaffer-dev+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/gaffer-dev/c0ad9864-15e3-4a7d-ade3-301f02b00442n%40googlegroups.com.
randomDrop.gfr

Paolo DE LUCIA

unread,
Sep 29, 2025, 10:14:48 AM (19 hours ago) Sep 29
to gaffer-dev
Oh my...
This is exactly what I was looking for.
So cool to see how the transformQuery can evaluate each object transform RELATIVELY to the custom coordinateSystem !
About the timeWarp... well. It looks to me it's used like a OSLsplineFloat, with an input from the animCurve and the other one from the offset to the transform. Pretty neat, but I couldn't connect it the same way through the UI (animCurve.curves.curve.out -> timeWarp.in).
Again, I can't thank you enough for that example, a lot to learn from it.
Reply all
Reply to author
Forward
0 new messages