using vopsop to get rid of copysop
5047 9 0- sami.tawil
- 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
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
- tamte
- Member
- 8787 posts
- Joined: 7月 2007
- Offline
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
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
Tomas Slancik
FX Supervisor
Method Studios, NY
FX Supervisor
Method Studios, NY
- sami.tawil
- 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
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
- circusmonkey
- 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
- sami.tawil
- 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
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
- bloomendale
- Member
- 20 posts
- Joined: 12月 2011
- Offline
- tamte
- Member
- 8787 posts
- Joined: 7月 2007
- Offline
@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
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
FX Supervisor
Method Studios, NY
- sami.tawil
- 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.
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.
- bloomendale
- 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)
- circusmonkey
- Member
- 2624 posts
- Joined: 8月 2006
- Offline
-
- Quick Links