Random attribute values on points with randomVOP

   4693   9   0
User Avatar
Member
246 posts
Joined: July 2005
Offline
This is a ridiculously simple question, but it's been a while. How do I get random point attributes in the attributeVOP? I've got the global point number running though a randomVOP and then into an addattributeVOP but all of the points are getting the same value…
User Avatar
Staff
2591 posts
Joined: July 2005
Offline
stu
This is a ridiculously simple question, but it's been a while. How do I get random point attributes in the attributeVOP? I've got the global point number running though a randomVOP and then into an addattributeVOP but all of the points are getting the same value…

Hi,

Try the new point wrangle SOP:
f@float_attrib = random(@ptnum);
v@vector_attrib = random(@ptnum);


But using an Attribute VOP, it sounds like you're doing the right thing. ptnum (not primnum) -> seed
User Avatar
Member
246 posts
Joined: July 2005
Offline
Thanks Mark,

Did a behaviour change? I can't seem to replicate these results (using the randomVOP, addattributeVOP, etc.):

https://vimeo.com/52551778 [vimeo.com]

Edit: Something changed, just tried it in H13, worked fine.
User Avatar
Member
2624 posts
Joined: Aug. 2006
Offline
Hi Stu,
If I understand correctly , attached is an example of what you might want to do in the attribute vop.

Rob

Attachments:
rse_myrandom_number.hip (90.8 KB)

Gone fishing
User Avatar
Member
246 posts
Joined: July 2005
Offline
That's great, thank you! Looks like it is the addattributeVOP that is falling down for me.
User Avatar
Member
2624 posts
Joined: Aug. 2006
Offline
The who system changed back in h14 , yes I am still confused and unsure due to my muscle memory getting in the way. The add attribute is kind of redundant now

Rob
Gone fishing
User Avatar
Staff
2591 posts
Joined: July 2005
Offline
stu
Thanks Mark,

Did a behaviour change? I can't seem to replicate these results (using the randomVOP, addattributeVOP, etc.):

https://vimeo.com/52551778 [vimeo.com]

Edit: Something changed, just tried it in H13, worked fine.

There should be a note at the bottom of the parameters in the “Add Attribute” VOP which says something to the effect:
Add Attribute VOP
Note: This only changes defaults; use Bind Export VOP to set values.

Does that show up in your version?
User Avatar
Member
246 posts
Joined: July 2005
Offline
We've been through this mark, you know how I feel about reading (slinks away, tail between my legs ).

Thanks all!
User Avatar
Member
246 posts
Joined: July 2005
Offline
Let me expand on my previously demonstrated ineptitude:

I need to randomly choose between instanced geometry and the old method (as shown in the video) doesn't work anymore - what's the preferred way to do so (VOPs please, I'd like an interface at the end of this)? What's the best way to assign the “instance” point attribute string in a way that allows a variable to be included as a modifier? ie. /obj/instance1, /obj/instance2, etc.?
User Avatar
Member
246 posts
Joined: July 2005
Offline
Ugh…again, nevermind: @attribname (duh)

I'll get there…someday.
  • Quick Links