A new version of Cineversity has been launched. This legacy site and its tutorials will remain accessible for a limited transition period

Visit the New Cineversity
   
 
Animating Spheres that Change Color on Collision
Posted: 29 April 2020 04:16 PM   [ Ignore ]  
Total Posts:  4
Joined  2020-04-21

Hello there.  New to C4D so bear with me.  I’m trying to create an animation where there are blue spheres (say 500 total) and red spheres (12 to start) moving around in an enclosed sphere.  I’d like the blue spheres to permanently change to red, when they come into contact or close proximity to a red sphere.  Then every time a red comes into contact with a blue, it changes to blue to red.  Basically showing an exponential growth of red spheres - so 12 turn into 24, 48, 96, etc. 
I’ve tried extensively to figure this out, going thru many tutorials but my skills are lacking.  If I use particle emitters, I don’t know how to individually change the spheres when they collide. 

I’m trying to create a 3D animation similar to the 2D one in the article below (different data, different scenario). In the first main animation of the 200 person town, one or two sick dots (orange) collide with the blue dots (healthy) and turn the dots orange, and so on, until the entire town is orange.  We have tried using a particle effect, or cloner, but cannot figure out the right way to set up the collider, that changes the color on collision, stays that color, then change other blue to orange.  Have been able to set up one object changing another, but not to this scale with so many spheres.  Also, not literate in xpresso, but certainly want to learn.  Thanks!!

https://www.washingtonpost.com/graphics/2020/world/corona-simulator/

Profile
 
 
Posted: 29 April 2020 08:13 PM   [ Ignore ]   [ # 1 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Hi tef11,

The simplest would be:
There is a ready use Modifier in X-Particles:
https://insydium.ltd/support-home/video-manuals/x-particles-video-manual/modifiers/control/xpinfectio-modifier/#1807

It works with distance, which means you either define a value below the “6feet” or take the distance that is given while the spheres would bounce. The Modifier has two stages, which are expressed in color for incubated and infected.

I try currently to get the PassAB from Thinking Particles to work for me, but I obviously have not smoothed out some of the bumps. I might have something later.

Cheers

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES, DCS

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile
 
 
Posted: 30 April 2020 02:52 AM   [ Ignore ]   [ # 2 ]  
Total Posts:  4
Joined  2020-04-21

Hi Dr. Sassi,

Thank you for the response.  I don’t have X-particles, however it seems like it would be good to use for this.  If you do have a work around with the available tools in C4D R21, that would be fantastic!  I’d love learn how to do this, and especially use xpresso and TP’s more.

Appreciate any help you can give!  Thanks.
Be well.
Talley

Profile
 
 
Posted: 30 April 2020 06:05 AM   [ Ignore ]   [ # 3 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Hi Talley,

So far, I have run only in a kind of feedback loop. As the information needs to be stored somewhere that an infection has happened.

I have put quite some time into it today, but so far, I have nothing that can determine the difference between a collision of non-infected and one-sided infections.

I will update this thread when I find something. It was another long day, and midnight is typical of my cue to stop.

My best wishes, stay safe, stay healthy.

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES, DCS

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile
 
 
Posted: 30 April 2020 05:58 PM   [ Ignore ]   [ # 4 ]  
Total Posts:  4
Joined  2020-04-21

Dr. Sassi -

Thank you for looking into this, appreciate it.  It appears that X particles is the way to go, so we are looking into purchasing it now.
If you do come up with anything without it, please pass it along! 
Best,
Talley

Profile
 
 
Posted: 30 April 2020 06:22 PM   [ Ignore ]   [ # 5 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Hi Talley,

Typically I like to do things natively, hence why I explore the options to get it done anyway. It is, of course, sometimes evident that plugins saving a lot of time. This was the case here.

The idea that I want to follow next is simply to push one sphere and let it play out dynamically. Cache it. Then transfer the data to Thinking particles, so I have to deal only with the social distancing and transfer.

Which should work with groups.

After that, the groups are the “object” entry in two new cloners. Those reproduce the initial scene with two different colors.

So far, the theory, but dynamic and PassAB are not really on the sweet spot in terms of providing single frame data with the shortest distance. So far, my previous explorations.

Cheers

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES, DCS

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile
 
 
Posted: 30 April 2020 07:58 PM   [ Ignore ]   [ # 6 ]  
Total Posts:  4
Joined  2020-04-21

I understand, it would be nice to be able to do it without the plugins.  I look forward to seeing what you come up with.
Thanks.

Profile
 
 
Posted: 30 April 2020 09:05 PM   [ Ignore ]   [ # 7 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Hi Talley,

I hope I found the shortest and most straightforward way. Fingers crossed.

Screen capture, scene file:
https://www.amazon.com/clouddrive/share/4rqq1zZumg9xf5tReuwEPNlQy1pEeA8JsbKoFK1bbzW

Sometimes the groups don’t release the patients; a short frame f"back&fore;” will send them home.
Before I try to explore this problem, I wanted to give you an update.

The idea was described above. [post #5]

Create an animated/dynamically scene that is cached. This is the Motion source. But it stays invisible.

From there I go and create TParticles, and give them a unique ID from the start [channels]
Which means, where ever they go, they have an ID with them. This ID is equal to the MoGraph part. So communication is quite simple.

I place “Patient Zero” in TPGroup 3 [UserData]. Whoever will get close to this one, will get infected. This is based on the distance given [UserData].

Long story short, the Group 2 and 3 will have their own Cloner. Please note in any place of Cinema 4D that, if in doubt, it is processed top to bottom. Never ever underestimate the trouble – ignoring this.

Have fun.

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES, DCS

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile