RBD point object rotation

   12035   6   1
User Avatar
Member
5 posts
Joined: 3月 2012
Offline
Hi all,

Probably a newbie question etc, but I can't figure it out myself so some help would be welcome. I'm probably not grasping some of the basics..

I have scattered some points on a volume. Gives me a point cloud. I used the RBD Point Object tool to instance a box onto the points. With a Point SOP, in the particle tab you can get make random (initial) velocity and point scale.
Now how do I get those boxes to randomly rotate (different rotation per box)?
Going further, now I think about it, how would you add angular velocity, per object?

I've played around with a VOP SOP a little, to change the point normals. But that's, at least for me, not getting the boxes to be entirely random.


I've tried it with a copy SOP method too. Copy the box onto the points. Stamp random rotation ( rand($PT) ) on each box. But then I get kind of the same problem, how do you add a random per box (initial) velocity after you've imported it into DOPs (using eg. the RBD Fractured Object tool)?

I hope it's clear what I'm trying to achieve.
Based on a point cloud, I'd like objects in DOPs with random rotation, colour (I've worked out colour myself haha) and (initial) velocity.
Pretty much everything random per point / per object.

Cheers for any help.
User Avatar
Member
76 posts
Joined: 9月 2011
Online
With the point sop you can give the point normals random values between 0-1, this will give you boxes with initial rotations between 0-360 degrees after copy sop, I'm not sure if you were having difficulty with that.

If your doing an rbd fracture - after the connectivity sop, your prims should be given a class attribute that is unique to each object/piece, this could be used to drive the initial velocity.
User Avatar
Member
5 posts
Joined: 3月 2012
Offline
That is indeed what I'm having difficulty with. I can get a somewhat random rotation. But they're mostly all still pointing sort of upwards.
It's not that when you type in a 0.5 value, they rotate 180 degrees. You know? It's a vector, not rotation.

The class attribute makes sense. Where would I use it though? In the RBD initial state rotation fields? That rotates all objects at once..

Thanks for your reply.
User Avatar
Member
2624 posts
Joined: 8月 2006
Offline
Hi,
See attached for a workflow. Using one of my tools for randomizing the normal direction of points. Note the alignment of the objects in Z axis still applies.

regards

Rob

Attachments:
rse_sop_rand_normals_v001.otl (19.4 KB)
rse_dop_rbdpointobject_attributes.hip (241.3 KB)

Gone fishing
User Avatar
Member
5 posts
Joined: 3月 2012
Offline
Thank you, that's pretty much how far I got with my own VOP SOP. I'll show you what I mean with not entirely random. I've only replaced your cone with a cube that has the top side coloured blue.

In view 1 you get almost all cubes' blue faces, and in view 2 you get pretty much none. Is that what you mean by “alignment of the objects in Z axis still applies” ?

Attachments:
side01.jpg (164.1 KB)
side02.jpg (150.5 KB)

User Avatar
Member
2624 posts
Joined: 8月 2006
Offline
Hi nothing can be entirely random as it would be chaos …… . This time N for each point is sourced from an object where no point has the same normal vector. This is then passed into the otl and randomized. I am beginning to think that if the normal vectors all face the same direction to begin with you already get a biased direction for N.

Use the switch to toggle between the two different point sops. I must admit I had not noticed this before.if I get time I might look at another approach

rob

Attachments:
rse_dop_rbdpointobject_attributesbiased.hip (257.5 KB)

Gone fishing
User Avatar
Member
5 posts
Joined: 3月 2012
Offline
Well.. appear to be random then.. hehe.

I also tried to just put some random values based on the point number into the Point node's N values. So you wouldn't need the AtribTransfer. That works fine (for me) too.

Anyway, works great. Just what I wanted.
Cheers!
  • Quick Links