Jump to content

Sign in to follow this  
Marius Guillemain

Changing a cloned sphere's material

Recommended Posts

Hi, this is my first topic, first of all a big thank you to this community for all the content and sharing..

 

I'm posting here after a long struggle on a XPRESSO problem : i have a thousand moving spheres (cloned ofc) that come in collision with a big cube. I want the collisioned spheres to change material on hit.

 

I read multiple tutorials, watched videos and even found a topic that is pretty similar to my problem :

 

My struggle is that what is changed in the topic is the display color and not the material.

From now on the only thing i have managed to do is this : it changes all the sphere's material on hit.

 

screenc4d.thumb.jpg.59d453b030cde1ba49c03c7948702ab0.jpg

 

Any idea how to change only the collisioned sphere's material ?

 

Have a nice day

Share this post


Link to post
Share on other sites

Posted (edited)

This file has a mat change on collision - although it doesn't stick. Uses Python GetCache() which allows you to iterate through a cloner as if the cloner had been made editable.

 

getcache2.c4d

Edited by jed
error in xp

Share this post


Link to post
Share on other sites
  • Topic Author
  • Thanks you so much jed, i worked out with it a bit, works out great !

     

    Now i have to try to make the color change state stay longer..

     

    Anyway thx for the help !

    Share this post


    Link to post
    Share on other sites
  • Topic Author
  • Thx for the help, but didn't your forget to add collisions to the file ? I only see the scene with a plain effector

    Share this post


    Link to post
    Share on other sites

    Do you have R20? I am using fields in that scene


    Free C4D trainings from MAXON professional on our youtube channel

     

    https://www.youtube.com/c4dcafe

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