Jump to content
archz2

Trying to understand attrib vop

Recommended Posts

I am trying to figure out the functioning of 'attrib vop' node. Does it only function if I give it point attributes?
 
I have put a sphere and it does not have any attributes for primitives. So I use an attrib promote to promote point attributes to primitives. Then I run attrib vop on primitives and it does not show any results.
63200c74a6431_atvopquestion.thumb.png.4a675fa82654d9de4b1346e12e365fcb.png
 
However, when I run it over points, it modifies the geometry as it should. What is happening?
image.thumb.png.ef973e1eb3fd11d39483fe54fcd87b9e.png
 
 

Share this post


Link to post
Share on other sites

Hi, 

think of attribute VOP as the visual version of VEX (e.g. point wrangle, primitive wrangle etc), instead of typing code you can use nodes inside the VOP to create and modify attributes. They can both achieve the same results, some just prefer visual scripting than coding and vice versa. Just like the attribute wrangle (VEX), Attribute VOP can work on any type (e.g. points, primitives etc), you just have to specify what type you want the VOP to run over (you can even type "primitive VOP" when searching for nodes and you'll be able to place one straightaway instead of having to manually configure the default attribute VOP which by default is set to run over points). 

 

'@P' is a local point attribute used to store the points' positions, and houdini needs that information in order to know where to place points in 3D space. This point attribute is writable meaning you can modify it, hence why when you apply noise to the '@P' in point VOP you see expected results. For primitives the '@P' (which stores the center of a primitive) is a read-only attribute, you can't directly modify it hence why you can't see any results when you apply noise in primitive VOP.

 

Sorry for the long reply, hope this answers your questions! 

  • Like 1

Share this post


Link to post
Share on other sites
3 hours ago, Ziyad said:

For primitives the '@P' (which stores the center of a primitive) is a read-only attribute, you can't directly modify it hence why you can't see any results when you apply noise in primitive VOP.

 

 

This!!! This is so weird! I wonder why they made it read-only attribute. Thanks a lot! Do you know of any example where attrib vop is used to run over primitives directly? That will help me a lot in trying to understand why is there an option for 'primitive' in the drop down menu for 'run over' in attrib vop. 

Share this post


Link to post
Share on other sites

the primitive VOP can be used for any purposes involving creating/modifying attributes for primitives. I made a quick setup to show how you can use the primitive VOP to randomise an extrusion, I've added some notes inside to explain further. Hope it helps!

 

random_extrusion.hipnc

image.png.01d02d932181f3a1eb05af163a8b1339.png

  • Like 1

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

×