How to make two objects into a hinge

In DS is there a way to make two objects to move like a hinge like on a door or gate? In short how'd do ya make a hinge? LOL

Comments

  • ParadigmParadigm Posts: 423
    1. position the objects where you want them to hinge
    2. create a null object
    3. position the null object so it's center is at the place of rotation
    4. parent one object to the null and then the null to the other object
    5. rotate the null
  • ebergerlyebergerly Posts: 3,255
    edited April 2019
    Yeah, I'd do what Paradigm suggests. Though I think I'd parent both objects to the null so they both only rotate around the hinge joint. And maybe lock their other axes so they only rotate around the null/joint. Though knowing me as I do, I think I'd probably bring both objects into Blender and modify their origins/centers of rotation first. Maybe you can do that with the joint editor thingy but I dont like it.
    Post edited by ebergerly on
  • ebergerlyebergerly Posts: 3,255

    Hey wait, you still have to move the origins/centers of rotation of both objects to make sure they rotate at the correct point, or else they'll still rotate about their own origins, not at the desired hinge point. So yeah, I'd bring them into Blender and do that. Of you can use Joint Editor if you can figure it out. I always get confused with it. 

    And then you probably want to set limits on the rotation values so they don't rotate into each other. You do that in the Parameters/Transforms/Rotation and click on the gear icon and set min and max values for rotation on the correct axis, and then "Use Limits" 

  • AllenArtAllenArt Posts: 7,175
    edited April 2019

    JGreenlees shows how to rig a rigid prop with weight mapping.

    Laurie

    Post edited by AllenArt on
  • ebergerlyebergerly Posts: 3,255
    AllenArt said:

    JGreenlees shows how to rig a rigid prop with weight mapping.

    Laurie

    Yeah, I don't think all that's needed just for a simple hinge.

  • ParadigmParadigm Posts: 423
    edited April 2019
    ebergerly said:

    Hey wait, you still have to move the origins/centers of rotation of both objects to make sure they rotate at the correct point, or else they'll still rotate about their own origins, not at the desired hinge point

    That's why you only parent one to the null. The null will rotate on it's own center of rotation and the parented items will move to retain it's relative position to the object. The non-parented object stays still. If you parent both the the null you haven't accomplished anything but spininng them around the null! 

    Post edited by Paradigm on
  • ebergerlyebergerly Posts: 3,255
    edited April 2019
    Paradigm said:
    ebergerly said:

    Hey wait, you still have to move the origins/centers of rotation of both objects to make sure they rotate at the correct point, or else they'll still rotate about their own origins, not at the desired hinge point

    That's why you only parent one to the null. The null will rotate on it's own center of rotation and the parented items will move to retain it's relative position to the object. The non-parented object stays still. If you parent both the the null you haven't accomplished anything but spininng them around the null! 

    Oh, okay, I see what you're doing. You're not really tieing them together as a single object, you still have two objects, and only one rotates correctly around the hinge point. I kind of assumed you'd want them together as a single (parented) object, like a laptop with a hinged screen.

    So the way I'd do it is this:

    1. Change the origin/center of rotation of both objects to the desired hinge point, either by jumping out to a modeller app or using the Joint Editor (Tools/Joint Editor, then slide the green arrow to the desired hinge point...not sure what the red arrows do).
    2. Decide what rotation limits you want for each object and set that in the Parameters/Rotation gear setting for the appropriate axis, and lock the others so they don't accidentally rotate on the wrong axis or rotate into each other (the little padlock icon next to the gear).
    3. Add a null and parent both objects to the null, or add them to a Group, so you can grab them as a single object. 

     

    Post edited by ebergerly on
  • ebergerlyebergerly Posts: 3,255
    edited April 2019

    Ahh, okay...the red arrows in the Joint Editor are used if you're going to do a "point at". The object will point at another object as defined by an arrow from the green arrows to the red arrows. So in the image below, the cube will point at an object by pointing it's top left corner at the other object. 

    Joint.JPG
    687 x 723 - 23K
    Post edited by ebergerly on
  • Silent WinterSilent Winter Posts: 3,876
    ebergerly said:

    Ahh, okay...the red arrows in the Joint Editor are used if you're going to do a "point at". The object will point at another object as defined by an arrow from the green arrows to the red arrows. So in the image below, the cube will point at an object by pointing it's top left corner at the other object. 

    Thanks - I've learned something new (and useful :) )

  • I have a question. How do you go about making a set of sliding doors like in star trek? Can they slide apart using only one slider, or must they have individual sliders for left and right doors?

  • Silent WinterSilent Winter Posts: 3,876

    I have a question. How do you go about making a set of sliding doors like in star trek? Can they slide apart using only one slider, or must they have individual sliders for left and right doors?

    You'd set up individual bones (thus having 2 sliders) and then combine them into 1 slider using ERC freeze. (I don't have a tut handy but searching for this term (via a search engine, not daz forum search - use site:daz3d.com/forums to limit the search to the forums if you like) should bring something up).

  • ebergerlyebergerly Posts: 3,255

    Looks like you might be able to write some scripts to access an object's properties/translation values and maybe make an open/closed slider control that modifies each objects' X position based on an equation...

    That is, if you want to go learn about DAZ scripts...

  • ebergerlyebergerly Posts: 3,255
    edited April 2019

    Oh, wow, there's some sample scripts that are ready to run, and there's even one that gives sliders you can use to adjust an object's position. It defaults to adjust rotation, but I just changed them to say Translate. Cool. Needs a little more investigation on how to adjust two nodes/objects simultaneously so they're related, but it seems pretty straightforward. 

    How come nobody told me about the cool Script IDE and all the pre-made scripts? Very cool. 

    Script.JPG
    1648 x 853 - 127K
    Post edited by ebergerly on
Sign In or Register to comment.