Jump to content

Is there any benefits in using an additional attribute over manipulating points/primitives by their numbers?

Recommended Posts

Could somebody please explain, on  http://www.tokeru.com/cgwiki/index.php?title=HoudiniVex I can't understand the reason behind "It's worth pointing out that if you're defining the groups yourself, you're better off using an attribute to identify the pieces, and use that to do your random whatevers." I mean, I don't understand are there any advantages in deleting(for example) some points/primitives by using additional attribute over deleting them by @ptnum/@primnum. 
Thanks in advance.

Share this post

Link to post
Share on other sites

The reason I can think of is consistency.

@ptnum of a given point might change if you delete or modify your geometry. If you define something like 

i@myID = @ptnum;

before you do any modification of the geo, and use @myID to generate random numbers, the result will stay the same, no matter if you delete points or change the point order.



  • Like 1

Share this post

Link to post
Share on other sites

Aha! points/primitives are renumerated each time I delete some of them. It makes sense now, thanks!

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