using vopsop to get rid of copysop

   5097   9   0
User Avatar
Member
172 posts
Joined: 3月 2012
Offline
i am basically trying to replace the copysop by a vopsop in the following file
I started from a solution that Tamte provided in another thread.thanks tamte
Now i am almost there but all my polygon are flipped 180 by x and z
I tried many vopsop nodes as rotation matrix transform etc.. but couldnt find out how to fix the issue

here is the file
hope u can help

Attachments:
vopsop replace copysop.hipnc (260.2 KB)

User Avatar
Member
8839 posts
Joined: 7月 2007
Online
it would take a long time blindly trying all the VOPs

first of all, you have just normals, there is no way how to convert directional vector to rotation without any hint
so you need an up vector for that (you would need the same for Copy SOP anyway)

you can calculate up vectors based on topology using Polyframe SOP
you need to do it for both, rest and animated points, because you need to rotate the pieces just by the difference of rotations defined by original and deformed object's topology
then some matrix math in VOP sop and done

here is the file

BTW: you don't need height parm, since you have deformed position
and you don't need to offset points prior to Ray SOP since it has bias parm which will offset origin of the ray in normal direction internally
and keep number of threads on vopsop at default since it actually means one per core so it will scale with your machine instead of being constant 8

Attachments:
vopsop_replace_copysop_fix.hipnc (270.7 KB)

Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
172 posts
Joined: 3月 2012
Offline
Tamte thanks a million again

i did try to bring the up vector, but i didn't know how to use it once inside Vopsop.

if i used the P attribute instead of my height attribute my pieces would be scattered since they add (i couldn't isolate the ty from the P)

i find sop level ok to understand after a couple of trial and tutorials, but vopsop feels like a rabbit hole with a whole new deeper univers filled with infinite possibilities, and i dont know where to start as it is very abstract to me, vopsop feels like beeing neo in the matrix , it is a long learning curve, but eventually when u get it you can play with everything.

Do you have any advice of how to learn vopsop (other than tutorials).
where to start from?


thanks again
User Avatar
Member
2624 posts
Joined: 8月 2006
Offline
sami.tawil
Tamte thanks a million again

Do you have any advice of how to learn vopsop (other than tutorials).
where to start from?

The help manual has a number of example VOPs . Plus you should keep yourself a online notebook to collect files and make notes. The forums contain plenty of files that have vop examples.

Rob
Gone fishing
User Avatar
Member
172 posts
Joined: 3月 2012
Offline
yes i do keep a collection of files
your page is also bookmarked, i looked at your vopsop page yesterday

what i am looking for is to get a deeper understanding of how normal upvector, matrix etc interact mathematically.
What i am saying is that i know i need an up vector for example to fix any unwanted rotation, but that s it…i always have to try the 3 vector before finding which one works,…i would like to know which one i have to choose from the start, meaning understanding clearly what i m doing.

thanks
User Avatar
Member
20 posts
Joined: 12月 2011
Offline
Actually you don't need foreach loop, polyframe sop (and hence up-vector), ray sop, sort sop…

Attachments:
3ak_vopsop_replace_copysop_133-1.hipnc (217.0 KB)

User Avatar
Member
8839 posts
Joined: 7月 2007
Online
@bloomendale -be careful about stripping of features you think are not necessary, just because it works on simple grid

foreach is not important in this simple case, but for example sami.tawil had in his original scene clustering turned on, so the piece ids will no longer match points and therefore some kind of reindexing or computing new points is needed

and since you stripped up-vector completely, your pieces will be flipping in cases beyond flat grid deforming in Y, so it's better to add some proper rotation computation, polyframe is just a mean to get tangent vector based on topology which can be used as up vector for cases like this
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
172 posts
Joined: 3月 2012
Offline
EDIT: this file is falling cracking ground without dynamic

that s the original file i am trying to apply tamte teknic to.
that s isn't the file i am wokring on just the original one.

i thought i would share as it my help some people.

There is a tool i created which is a multi-fragmentation voronoi with lots of options extracted as parameters, as well as metaballs already included at impact point so you can blow up the object just by adding magnet force in the dop. u can just save it as preset to get it back whenever you want, it is originally as subnet
u can either plug the same object or a different object in the 2nd input

There is also a curve activator. Plug the shape and a curve and the curve will change the shape color using carve(also as parameter on the tool)

if anyone gets this file i suggest that u try to stick tamte example on it, it will get rid of the copysop and delete node and make the cooking 20 time faster.

Attachments:
interactive voronoi.hipnc (493.3 KB)

User Avatar
Member
20 posts
Joined: 12月 2011
Offline
tamte
@bloomendale -be careful about stripping of features you think are not necessary, just because it works on simple grid

foreach is not important in this simple case, but for example sami.tawil had in his original scene clustering turned on, so the piece ids will no longer match points and therefore some kind of reindexing or computing new points is needed

and since you stripped up-vector completely, your pieces will be flipping in cases beyond flat grid deforming in Y, so it's better to add some proper rotation computation, polyframe is just a mean to get tangent vector based on topology which can be used as up vector for cases like this

Absolutely. My example is only for initial setup.
another specifications - different setup)
User Avatar
Member
2624 posts
Joined: 8月 2006
Offline
sami.tawil
yes i do keep a collection of files
your page is also bookmarked, i looked at your vopsop page yesterday

Thats exactly why I keep it, I must freely admit knowing / using vops does not come easily to me and I often refer to my notes to adapt and make new VOP's set ups.

Rob
Gone fishing
  • Quick Links