Jump to content

custom transform pieces

Recommended Posts

Hi all.

I'm trying to use the transform pieces sop without using a dop simulation. i'm deforming some low res geo and I want to translate their centroid animations to the hi res pieces with no luck at all.

Can someone help me please?

Thanks in advance.



Edited by homeless3d
  • Like 1

Share this post

Link to post
Share on other sites

The first problem is that You got a mismatch between the number of highres and lowres pieces. Second You have to plug in points to the template and rest inputs.
I don't know how You are animating the pieces but maybe You have a possibility to convert that animation to points. Otherwise You would have to write some VEX or create a attribute vop to calculate the rotation of your pieces.
Hope that helps.


Share this post

Link to post
Share on other sites

Thanks Dennis


I have now the same number of pieces on the highres and lowres geos, and I converted the animation and template to points with all the attributes promoted to the points and still doesnt works. I also played with up and N attributes on the points and with orient also but I only get the offset of the position without rotations :(
Any help will be much apreciated.

Share this post

Link to post
Share on other sites

I sort of got this to work, but its not pretty.


Transform pieces assumes you're working with packed geo right from the start. The hip file has packed highres geo, but regular lo-res geo (and regular static lo-res geo). Packing the 2 lo-res shapes won't magically know how to create @orient for your rotated pieces, all it'll do is calculate the centroid of the shifted pieces, which is what you've already seen.


A point deform works, but it won't be able to separate on the edges of each piece, so you'd get the high res shape deformed, but with the edges welded together. It would work if you did them one by one in a for-each loop.


But to get _that_ to work, you need to have matching name attributes on all 3 shapes, which is the approach I went with, and to not get confused, delete hires shapes that don't have a matching lores shape (your highres selection doesn't match the lo-res).




-set 'hires', 'static', 'anim' attributes on each mesh so they can be identified later

-temporarily pack the lo-res rest mesh

-set a 'hit' attribute on it

-attrib transfer 'name' and 'hit' from lores packed static to highres packed static, with 0 falloff, so points have to be directly lined up for the transfer to happen

-blast highres packed points where hit=0

-unpack hires geo

-merge highres, lores anim, lores static. they should now have matching name attributes


in a for each loop, set to loop on 'name':

-isolate highres, anim, static

-feed those to point deform


As I said, ugly, but works.


You'd be better off using the transfer pieces as it was originally intended, and animate your shatter with packed geo and/or packed rbd.





Alternatively it's probably possible to create orient attribs per packed piece using the geo you have now, but that was more maths than my mind could handle at 11pm. :)

Edited by mestela

Share this post

Link to post
Share on other sites
On 3/1/2016 at 7:15 AM, petz said:

here´s another one...





Great stuff guys!

Hey petz,  I was trying to write something like this for a while. Love your method. I have a question, do you think it is possiable to do the matrix transform by the macthing name attr? Instead of prim-uv?




Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now