Jump to content

Sign in to follow this  
Tim Whiteman

Control 2 car doors with single slider?

Recommended Posts

Hi Cinema 4D friends,

 

I am just starting out trying to learn Xpresso and have managed some very basic success so far. I have looked everywhere for a feature that I need to learn, but am really struggling to find a solution. I have set up a user data controller to be able to control different parts of a car. I have managed to set it up to have a slider for the left and right doors to open independently with a slider using the Range Mapper node, but I would like to be able to create a slider to control both doors opening together. I have tried most approaches and nothing seems to work? I have even tried to copy the existing "left door open" node tree to a newly named user data slider, but that doesn't seem to work either? It seems that you can only have one control slider per null object?

 

If there are any kind folks who know a way of me solving this, I would be most grateful. Even if it is just pointing me in the right direction to find a good tutorial or something.

 

Thank you for reading!

Share this post


Link to post
Share on other sites

Simply use 2 range mapper nodes linked to both doors with different rotation values...

(link user data slider to both range mapper nodes ofcourse)

Share this post


Link to post
Share on other sites
  • Topic Author
  •  

    Thank you for your reply. I think you mean this don't you?


    Screen.thumb.jpg.bd58ce2eac9fcce757bd85fe7c01038f.jpg

     

    I've tried that and it doesn't work. Strangely, even if I copy the same Range Mapper and Door Left as a duplicate (to test) and try adding it to the "Doors Both" control, that doesn't work either?

     

    Screen2.thumb.jpg.1d642f25f748773ad0cc944880fe4e2e.jpg

    Share this post


    Link to post
    Share on other sites

    yes, this way...

    ...here simplified xpresso

    door_opening_xp.c4d

    Share this post


    Link to post
    Share on other sites

    range mapper need tranfer values from percentage values to degrees. Since rotation of both doors are different, also values in range mappers need to be different.

    And everything is based on axis position of objects...

    Share this post


    Link to post
    Share on other sites
    1 hour ago, Tim Whiteman said:

    I've tried that and it doesn't work. Strangely, even if I copy the same Range Mapper and Door Left as a duplicate (to test) and try adding it to the "Doors Both"

    Yes the rotation can only be controlled by one slider. so you parent the door to a null, and use that for controlling both, and the object to control one side at the time.

    Share this post


    Link to post
    Share on other sites
  • Topic Author
  • 1 hour ago, bezo said:

    yes, this way...

    ...here simplified xpresso

    door_opening_xp.c4d 307.18 kB · 0 downloads

     

    1 hour ago, bezo said:

    range mapper need tranfer values from percentage values to degrees. Since rotation of both doors are different, also values in range mappers need to be different.

    And everything is based on axis position of objects...

     

    Thank you very much for your continued help bezo, I really appreciate it!

     

    You're absolutely right when using both doors as a single slider. The problem arises when you try to add a copy of the node tree for a single door. I've enclosed what I mean.

    door_opening_xp_Problem.c4d

     

    I think digitvisions found the solution. It appears that the doors cannot share the exact same objects or null objects, they need to be slightly different. For example. digitvisions put the individual doors in a null of the single door object.

    Share this post


    Link to post
    Share on other sites
  • Topic Author
  • 4 minutes ago, digitvisions said:

    Yes the rotation can only be controlled by one slider. so you parent the door to a null, and use that for controlling both, and the object to control one side at the time.

    Thank you DigitVisions, your solution worked! I completely understand your example. It's a weird concept that Xpresso cannot use the exact same objects for variations of movement and that the exact same objects can be used as long as they're inside a null? Slightly strange workflow, but if that's how it works then I'm happy to adapt! lol

     

    Thank you for your kind help and solution, I am very grateful!

     

    Enjoy the rest of your weekend @digitvisions and @bezo

    Share this post


    Link to post
    Share on other sites

    Here's a question - are you copying by ctrl-dragging or using Ctrl-C / Ctrl V ? There is a big difference with Xpresso and the Object Manager - the latter works and the former doesn't !

     

    CBR

    Share this post


    Link to post
    Share on other sites
  • Topic Author
  • 4 minutes ago, Cerbera said:

    Here's a question - are you copying by ctrl-dragging or using Ctrl-C / Ctrl V ? THere is a big difference with Xpresso - the latter works and the former doesn't !

     

    CBR

    Whoa!!! Mind blown! Thank you so much for sharing your knowledge @Cerbera, that's incredible and I would have never have thought that ctrl+click-dragging would be different from ctrl+c/ctrl+v??! That's got to be a bug?! Although, I think (and I might be wrong) that it doesn't change the fact that the individual doors still have to be contained with a null for them to work separately from the "Both Doors" version?

     

    Definitely a power move though to know that that copy|paste needs to be via keyboard shortcut rather than ctrl-dragging!

     

    Thank you for your help and for moderating such a great and helpful forum! 👏🏻👏🏻👏🏻

    Share this post


    Link to post
    Share on other sites

    Can someone elaborate on the difference between ctrl-drag and ctrl-C ctrl-V ? I'm intrigued...

    Share this post


    Link to post
    Share on other sites

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Reply to this topic...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.

    Sign in to follow this  

    • Recently Browsing   0 members

      No registered users viewing this page.

    ×
    ×
    • Create New...