DOPs modify and attribute eg: angvel

   10496   18   0
User Avatar
Member
40 posts
Joined: July 2009
Offline
Hi,
In my DOP sim, I want to be able to control the angvelx attribute, with some kind of expression, for every object in my fractured RBD.
Something like if(angvelx> 10, 10, $ANGVELX )

How can this be set up inside DOPs?
User Avatar
Member
512 posts
Joined: July 2009
Offline
sorry I don't have Houdini in front of me right now, but what you're looking for is when you hit tab in the network view under “position”, it's either the motion DOP or another one of those nodes. There you should find the angular velocity fields which you can then modify with your expression!

cheers,

Manu
http://vimeo.com/user2522760 [vimeo.com]
http://stormbornvfx.com/ [stormbornvfx.com]
Manuel Tausch
User Avatar
Member
40 posts
Joined: July 2009
Offline
Thanks for replying.

I know where the angvelx is located. But I dont know where to put an expression to make a difference, and how the expression should look, in order to accomodate all fractured groups eg: using dopfield() and $OBJ variables. i cannot find a single example where such a variable gets modified.
User Avatar
Member
512 posts
Joined: July 2009
Offline
ok I attached a sample file for you, it shows how you can clamp the angular velocity with an expression.
Another way to do it would be to use a drag force and let it only affect angular velocity. If you want to know more about it you can have a look on how the rbd auto freeze node accesses angular velocity, just lay down the node in your network, rightclick > allow editing of contents > dive into it and have a look at the node that contains the ang vel data.

cheers!

Attachments:
modifyAngularVelocityInDops.hipnc (188.7 KB)

http://vimeo.com/user2522760 [vimeo.com]
http://stormbornvfx.com/ [stormbornvfx.com]
Manuel Tausch
User Avatar
Member
40 posts
Joined: July 2009
Offline
Thats a perfect example - thanks for sharing - I just could not find a simple useage of accessing the channels for these values. This opens up a lot of possibilities and answers for me now.
Ive had a lot of success with the Auto Freeze , but not explored its guts … i heard it was not very successful with bullet. Any ideas about that?

Thanks again
User Avatar
Member
512 posts
Joined: July 2009
Offline
so far I can tell you that Bullet actually switches the rbd objetcs active state from 1 to zero, so on the technical side of things it works. BUT I couldn't actually notice a huge performance jump as soon as objects get frozen, so I think it can be improved a lot. You should browse a little bit on the beta forum to get more information about that …
glad I could help!
http://vimeo.com/user2522760 [vimeo.com]
http://stormbornvfx.com/ [stormbornvfx.com]
Manuel Tausch
User Avatar
Member
40 posts
Joined: July 2009
Offline
Oh. I see what you mean.
My next task now is to try to control active values from SOP attributes (eg color) . It seems there are a few ways to do this, but am not sure which route, - sop-solver, or to somehow use a point cloud with the attributes and associate this with my fractured groups …
User Avatar
Member
512 posts
Joined: July 2009
Offline
I assume you want to activate objects over time?
here's a hint.
Try to go the SOP Solver route, let every object have a centroid or center of mass and make sure both objects have an attribute on them which keeps them associated. Then you can color those points based on what ever activation you want to achieve (running a sphere through the points for example) and transfer the color attribute within a vopsop from each point back to the points of its original object. Next you make sure every object that has been colored gets an attribute with the value of one and now you can access those attributes in the DOP context to drive your activation.

Let me know if you get stuck
http://vimeo.com/user2522760 [vimeo.com]
http://stormbornvfx.com/ [stormbornvfx.com]
Manuel Tausch
User Avatar
Member
40 posts
Joined: July 2009
Offline
Thanks.

I think time is too short to experiment. Unfortunately. I will have to go back to glue networks.
Thanks
User Avatar
Member
40 posts
Joined: July 2009
Offline
Hello again.
So I did get the point to fractured object relationship working,
although im using a point() to simply lookup the attribute value from a point cloud that has same ‘ids’ as the dop fractured object ids.
Not sure exactly why you mention using a sop solver though. Is there a particular reason for the sop solver - the examples of useage are sketchy to say the least, so its not like i can just plug it in and test it haha.
User Avatar
Member
512 posts
Joined: July 2009
Offline
you don't necessarily need to use a sop solver, but i.e. when you only want to activate objects with a small sphere, you want to make sure those objects stay active and don't lose their attributes.
I attached a file which displays quite nicely what I'm talking about!

Attachments:
SopSolver_FrameStamp.hipnc (114.8 KB)

http://vimeo.com/user2522760 [vimeo.com]
http://stormbornvfx.com/ [stormbornvfx.com]
Manuel Tausch
User Avatar
Member
40 posts
Joined: July 2009
Offline
Thanks for that. Thats a good way to bake in attributes.
Any idea if there is a way to actually just bring in one point attribute and sop solve only that.
Taking in all the geometry via sop solver seems a bit heavy handed.
I guess, in some cases a solver could be used in SOPs, but im intrigued if an attribute like ‘Cd’ could be brought into DOPs, solved (as in use a sop solver) and then use modify data dop to add this to existing DOP geometry?
User Avatar
Member
512 posts
Joined: July 2009
Offline
yes, that's exactly what the SOP solver is designed for, to grab DOP geometry and change it on the fly while it's simulating, a great feature in Houdini, which I use all the time.
As for using the SOP Solver only for one attribute. Hmm never did that but it should work, you could split your tree in SOPs and kill all the attributes but one on the one side, put this into the SOP Solver and then transfer the altered attribute with an attribte transfer SOP or a VOP SOP back to your original geometry. Give it a shot !

Oh and check out the shipped examples, there's some good stuff on the SOP Solver!
http://vimeo.com/user2522760 [vimeo.com]
http://stormbornvfx.com/ [stormbornvfx.com]
Manuel Tausch
User Avatar
Member
40 posts
Joined: July 2009
Offline
Oh i meant actually doing that all in Dops. In sops thats easy for me, but Dops syntax and expression is totally alien to me, and very frustrating to learn the simplest things …
For example, to simply pull in a point cloud, and access attributes off that, eg ‘Cd’ point attribute. So lets say i take a point cloud into Dops via the sop geo (ior sop solver) and merge it in with my stream, as a new Dop object: what command would you use to access the point attributes off that data structure? the DOPNET OBJNAME Geometry attribute syntax doesnt fit together like a sop path…

Anyway, I am making progress, but slower than id hoped for. I need more variety in the shipped examples as they usually beat on the same paths .
User Avatar
Member
512 posts
Joined: July 2009
Offline
if you're trying to access point attributes a point() expression should do the trick, it be better if you'd post a hipfile so I could be of more help
http://vimeo.com/user2522760 [vimeo.com]
http://stormbornvfx.com/ [stormbornvfx.com]
Manuel Tausch
User Avatar
Member
40 posts
Joined: July 2009
Offline
unfortunately cant post a file ,as its h12

If I use the point command i have no idea how to express:
/obj/dopnet , objname=obj0 Geometry , points 0 and 1 xyz values.

Since unlike SOPs, you cant just go to that node name and access the points…

Sorry bout this, but thanks for your responses !
User Avatar
Member
40 posts
Joined: July 2009
Offline
ah i have it. never mind! point(“/obj/dopnet1bj0/Geometry”, 0, “P”, 1)

This Dop syntax is very weird !
User Avatar
Member
512 posts
Joined: July 2009
Offline
point($OBJID, 0, “Cd”, 0) should also work!
http://vimeo.com/user2522760 [vimeo.com]
http://stormbornvfx.com/ [stormbornvfx.com]
Manuel Tausch
User Avatar
Member
40 posts
Joined: July 2009
Offline
Now that is strange why does that work? The $OBJID is just a number.
It must be how the point function gets processed inside Dops ?
  • Quick Links