Jump to content

Sign in to follow this  
vtooth

Change Colour on Dynamic Collision

Recommended Posts

Posted (edited)

I have set up a scene where a ball collides with a row of dominoes in a cloner. Everything is looking great, but I cannot for the life of me figure out how to have the clones change color after being struck by the previous clone. Basically, I need the dominoes to change color as they are falling, preferably initiated by the dynamic collision from the previous clone in the line. I truly hope someone might have some good advice for me! Thank you in advance!

Edited by Cerbera
Retitled for accuracy / moved to correct section

Share this post


Link to post
Share on other sites

If you make the cloner editable, it's easy. This scene uses a Python list to store the collision data

 

doms 3.c4d

 

I'm like the guy who only has a hammer, and sees everything as a nail - I see every problem as needing XPresso + scripting...

Share this post


Link to post
Share on other sites

I also couldn't find solution for using clones. My idea was to bake animation of clones and then transfer animation data to polygonal objects and get collision detection that triggers material change. I couldn't find the way to lock the new material though..Probably use of freeze node or similar would work.

But boy... jed's example is great !
 

Colour_Change_On_Collision.c4d

Share this post


Link to post
Share on other sites

@bentraje I've had problems in the past trying to interface iteration with a Python node - every iteration step is seen as a Python event, triggering a calculation.

 

In this file, if you add a line to print the list, in the console there's 40 lines per frame - in some circumstances this can lock things up.

Share this post


Link to post
Share on other sites
  • Topic Author
  • Wow, I cannot thank y'all enough for taking the time to help me out on this! I had no idea it would be so complex, hopefully I can make sense of it with my fairly simplistic knowledge of the program! It looks awesome nonetheless! 

    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...