Jump to content

Reverse the tranformations on building... or something


kleer001

Recommended Posts

I have this sop solver setup that places blocks on previous blocks within certain rules of transformation and rotation. It even has a simple "collision detection" check. The results are fine, but the thing flips around crazily.

I've tried several ways to accumulate the transformations so that the new piece is moved to the proper place, but it is eluding me. That way the animation of its building would look better.

Any ideas? I think it would have to do with some sort of transformation matrix or something. Maybe. Ugh, so lost.

slatsConstruct_05.hipnc

Link to comment
Share on other sites

whatever you are doing inside the solver, I guess you are mainly asking about how to reverse the transform you are applying to your source geometry with any of the 19 xforms so that the resulting geo after adding new piece stays on the same place

you can simply add xform after adding the new piece and point it's parameters to active input of the switch4 node (it'll be one of 19 xforms you have)

then you can simply check Invert Transformation on that new xform

see the file

and you may need to change the logic you are using to build the blocks as now it'll not flip like crazy so the attribtransfer will not transfer different values per iteration and the evolution will stop easily

slatsConstruct_mod.hipnc

  • Like 1
Link to comment
Share on other sites

maybe create a point with 3 vectors before placing the building,

and then create a matrix from those 3 modified vectors,

and in vops do an extract transform on it to get the rotation and translation.

(and scale you ca do by measuring the vecors before making the new matrix)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...