Notifications
Clear all

[Closed] Envelopes StartPoints?

Hi Guys,

          I want to position the start and endpoints of envelopes in world coordinates.
          
      Before setting them I want to get their current pos like this:
          [i]skinOps.getStartPoint <Skin> <BoneID>[/i]. The problem is it returns very small values. I thought it might be relative to the bone itself, but im not so sure about that.

     skinOps.GetStartPoint $.modifiers[#Skin] 27
      [0.999873,-0.000265498,0.000935998]
      skinOps.GetEndPoint $.modifiers[#Skin] 27
      [0.001065,-0.000265498,0.000935998]

The bone has a length of 25, so these values look strange to me. Maybe im just stupid

          Cheers,
          Marcus
3 Replies

i’d guess its local to the mesh the skin mod is applied to
so to convert it to worldspace u’d do sumthing like:

( skinOps.GetStartPoint $.modifiers[#Skin] 27) * $.transform

GetStartPoint and GetEndPoint return value in system units in the bone coordinate system. As bone’s length skin is using distance between (Bone_Local_Center_Maximum) and (Bone_Local_Center_Minimum)
Bone_Local_Center_Maximum of the bone corresponds to [0,0,Bone_Length] (default Envelope Start Point)
Bone_Local_Center_Minimum of the bone corresponds to [0,0,0] (default Envelope End Point)


--convert envelope point to world point 
envelope_point *= envelope_bone.objecttransform
 
--convert world point to envelope point 
world_point *= inverse envelope_bone.objecttransform

Hi,

@Insanto: Thanks a lot, I tried your solution before, but it returns similar values for completely different bones.

@denisT: Thanks it works like a charm :thumbsup:. Did you find that out by try&error? Because the documentation on that is pretty minimal :)