compare

   2883   6   2
User Avatar
Member
6 posts
Joined: 6月 2011
Offline
hello,
i'm new in houdini universe.
i was trying to understand basic operation in vex sop but i'm stuck on a simple thing.

basicly, i want move a cube, if he under (0 , 0 ,0) i translate its position to (10,10,10)

first i don't find a way to manipulate the cube, i find only a way to manipulate each vertex.

and by using “compare” and a “if” it's looks like work on ly if x<0 but not y<0 or z<0

how i can do this simple operation ?

Thanks

Attachments:
sop.hipnc (50.3 KB)

User Avatar
Member
299 posts
Joined: 1月 2010
Offline
Contains a VOP network that can manipulate point attributes.

Use a transform node together with a switch or something.
Drive, monkey, drive!
User Avatar
Member
6 posts
Joined: 6月 2011
Offline
hello,
thanks for the answer.
But i'm not sure to understand.

i have difficulty to understand basics like attribute.
in the help file, i don't find a clear way to learn it, the based philosophy missing.
User Avatar
Member
6 posts
Joined: 6月 2011
Offline
i succed, but it's very slow for a simple operation

someone can take my file, and look the best way to do that, i need to learn from concret example.

i still don't find how to manipulate the object instead of manipulate each vertex.

thanks !!!

Attachments:
sop.hipnc (60.3 KB)

User Avatar
Member
279 posts
Joined: 12月 2009
Offline
First, VOP/SOP only proceed on points (and their attributes of course).
You CAN'T create or delete points.
If your cube is a primitive, Houdini take it like a only one point.
Don't forget that VOP proceed for each points.

So if you want move your cube, you will translate points by taking their positions and add values with an ADD vop operator.

There are two tutorials on cmiVFX on VOP/SOP (not free).

Et pour finir, bienvenue dans ce merveilleux monde d'Houdini
User Avatar
Member
279 posts
Joined: 12月 2009
Offline
I have modified your file. All changes are in red and one switch in green.
Play with the switch to use the noise for each points or not.

You don't need to import each x,y,z cube attributes. In the Global node, the P attribute represent a 3D vector of x,y,z of the input VOP/SOP.

Attachments:
sop_FS.hipnc (73.6 KB)

User Avatar
Member
6 posts
Joined: 6月 2011
Offline
merci !!!
  • Quick Links