Jump to content

bbbaaarrr

Members
  • Content count

    4
  • Donations

    0.00 CAD 
  • Joined

  • Last visited

Community Reputation

1 Neutral

About bbbaaarrr

  • Rank
    Peon

Personal Information

  • Name
    Bartek
  • Location
    Poland
  1. rbds to follow point positions *and* orientations *SOLVED*

    Hey Johannes, There you go... First thing to remember is to set proper piece transform attributes before the sim. It messes them up otherwise... Per http://www.tokeru.com/cgwiki/index.php?title=HoudiniDops#RBD_extract_correct_transform_attributes matrix m4 = primintrinsic(0,'packedfulltransform',@ptnum); matrix3 m3 = matrix3(m4); @orient = quaternion(m3); @scale = cracktransform(0,0,2,0,m4); v@pivot = primintrinsic(0,'pivot',@ptnum); Put the above to a wrangle before the dop. Then inside the DOPnet put the following to a geometry wrangle: int dotQuat( vector4 q1; vector4 q2 ) { int dotQ = (q1.w*q2.w+q1.x*q2.x+q1.y*q2.y+q1.z*q2.z) < 0; return dotQ; } vector4 q = @orient; vector4 q1 = point( 1, "orient", @ptnum ); int reverse = dotQuat(q1, q) ? -1 : 1; q *= reverse; v@w = qconvert(qmultiply(q1, qinvert(q))); As you can see the above is directly pasted from the example code. That's only for the rotation part. The @P part is trivial as setting @P or @v directly... Thanks!!! B.
  2. Hi, I need to animate a group of packed RBD prims scattered on animated set of points. The points are scattered on animated deforming geometry. They derive of course @P as well as @orient based on surface normal and tangent vectors. Now I want to simulate RBDs that would try to follow those positions and orientations closely, but retain their dynamic properties as well (so they collide properly). So far I managed to achieve reliable position following based on http://www.tokeru.com/cgwiki/index.php?title=HoudiniDops#RBD_follow_targets but now I'd like to set the torque accordingly. My way of thinking is that I should somehow calculate the torque based rbd @orient with original input point @orient (analogously to how I calculated the position delta), but anything I do produces just rotational chaos... Anyone with C4D background should see here that MoGraph's dynamic rotation following is what I'm after... Cheers, B.
  3. scatter on thin geometry

    Thanks for the hints... I went the texture space way... had to do a little funny loop through a COP to get the density map in UV space (as it was a point attribute before) but it seems after a few tweaks to the relaxation parameters I ended up with exactly the result that I wanted! Yaay! Now I'm wondering if there is a way to somehow save my mapping between the scattered points and my geometry so that when the creature starts deforming the points will stick to where they were... but that's another subject.. Thanks! B.
  4. scatter on thin geometry

    Hi All, I am scattering points on a creature. So far so good. I can get pretty much what I'm after. I'm using density driven by attribute which is noise based. The scattered points are relaxed nicely to get an organic distribution. Now my problem is - some parts of the creature are really thin, like fins of a fish. Here, the scatter function thinks points that end up on the opposite sides of the fin add up to the density, so there are far fewer points that I would need. Is there a way to discriminate points by their normal vector before the relax function kicks in? I.e. when calculating density based on proximity, just ignore points with opposite-facing normal? Cheers, B.
×