Page 1 of 1

Instancer Transfer Attributes

Posted: Sun Sep 20, 2020 9:13 pm
by DamageJack
How can I word this without completely embarrassing myself.

I have geometry with a group (can be prims or points, promote later if necessary)
I Mops-instance the geometry.
The group does not survive Packmaggeddon. It's lost in the packing, I imagine. This is a bit embarrassing not to understand.

But...there's 'Transfer Attributes' field. My syntax for that would be "@group_groupname'?

Can I gird my group's loins to survive the guantlet of Packing/Instancing?

Richard aka DamageJack

back in the day, we had something called DiTools for CInema 4D, made by a german coder named Remotion. It was brilliant, and I used it on some 2003 NBATV idents. Then came a mad coder named David Farmer (aka 'darf'), who wore cowboy boots with shorts and phoned the Maxon office in Friedrichsdorf at all hours (I have this from the Maxon folk, with whom I'm sometimes buddy-buddy). David made Jenna. He also made all the crazy noises before disappearing from the scene. Then Per Anders kinda took over, went into the Maxon world with the X-Particles guy known as 'obeardy' and out popped the Mograph Module.

And that's your geneology as I know it, Mr. Storm of Toads. Cheers...

Re: Instancer Transfer Attributes

Posted: Sun Sep 20, 2020 10:36 pm
by toadstorm
That's quite a story! I've had nice conversations with one or two of the Maxon folk before but admittedly I know next to nothing about Cinema 4D... that was more Moritz' forte. I'm a long-time Maya guy that switched over to Houdini (as much as possible) years ago.

Anyways, regarding packing... any groups or attributes that exist on the geometry itself at the time of packing are "packed into" each instance. It's possible to transfer attributes across from the source geometry to the packed primitives, but as you can imagine there is some potential for lossiness there as a packed primitive is represented by only a single point and a single primitive. If you unpack, your groups and attributes are still there, it's just that at the packed level you can't directly access them except in certain circumstances (like in shaders).

You can't transfer groups using the snippet group syntax `@group_mygroup`... that's for VEX snippets / wrangles only. If you just need the groups after the fact, my advice would be to unpack. If you just need a group comprised of all of the objects of a certain type going into the Instancer, you could just create a group post-instancing based on the `i@mops_index` attribute that's automatically created by an Instancer, or use the Partition SOP to create groups based on each unique value of `i@mops_index`. If you're trying to accomplish something more specific than this, feel free to upload a reproduction of the problem here and I'll help you work something out.

Re: Instancer Transfer Attributes

Posted: Mon Sep 21, 2020 6:40 pm
by DamageJack
And we’re all the winners in that conversion event from Maya. C4D had this phase from version 7.303 until Mograph appeared when it was lost in the woods. I’d go to Maxon events and pound the table about focusing on motion graphics. They were already doing it behind the NDAs of course. Paul Babb is one of the best dudes you’ll ever encounter. All my little C4D stories are a result of being sole moderator on the forum for several years...

Back to the issue.

I procedurally applied a color to my source geo as a prim attrib. I transferred that using the instancer functionality, picked it up on the other side, then from that attrib made a group, and that group is able to be kicked out via alembic to cinema. The attrib would transfer as well as a vertex map, if I chose.

I guess I stumbled onto a hinky but handy (and trivially simple) workflow.