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
   
 
Softbody dynamics and volumes
Posted: 02 August 2019 08:59 PM   [ Ignore ]  
Avatar
Total Posts:  34
Joined  2011-12-21

I have made a growing irregular shape (a tumor) with a volume mesher and fields. I want this growing structure to push a way tube (a nerve). For this I used a soft body interaction between the rigid body (the tumor) and the soft body (the nerve). This set up works. But whatever I try a distance between the surface of the growing tumor and the soft body is always present. I think it is not due to the soft body settings but something else I can’t find. I have added subdivisions to the nerve but this resulted in erratic behavior. tried the same set up with spline dynamics but adynamic spline seems not to interact with volumes. IS there a way to get the nerve following the growing tumor better?

Profile
 
 
Posted: 03 August 2019 12:39 AM   [ Ignore ]   [ # 1 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Hi Geertjan,

Sadly our attachment system is currently broken. I have sent you an upload link. Sorry about that! I assume that is not a file you can share? I will keep it private.

One question, is the Dynamic Tag> Collision> Mode> Shape set appropriately? Automatic will, most of the time, do not very well, except for simple objects.

This is a wild guess, as I have not seen anything so far. Could you use the Dilate/Erode filter to shrink the cancer object in size for the dynamics? When the Nerve is cached in its movement, perhaps even with a Point Cache or Baked as Alembic, you could get the Cancer Cell back to its real size and the gap would be closed (…no dynamic at this point, just cache). Again, just a guess.

All the best

P.S.: here is a rough sketch of how a Dilate/Erode filter in Volume could work. One volume to get the Dynamics fine-tuned, the other one for the rendering.
https://www.amazon.com/clouddrive/share/TLvzJvo0xzU0yTpiZep9JLlS8EISExaPQ5ZJ84hfEr9

 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: 03 August 2019 03:35 AM   [ Ignore ]   [ # 2 ]  
Avatar
Total Posts:  34
Joined  2011-12-21

Hi Sassi.

I’lll send you the file. The Collision is set to static mesh. I tried different settings but that did not close the gap..  I didn’t try the dilate erode filter.  Any solution that works would be perfect.
Y found the when I enlarge the n-side in the sweep that I use a a dynamic object it bridges the gap. But then the nerve is too big:-(

Profile
 
 
Posted: 03 August 2019 05:04 AM   [ Ignore ]   [ # 3 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Hi Geertjan,

I have sent you the file back, with a different setup.

One set up was to get as close as possible with the dynamic, but I think the constant change of the Volume Mesh, while it is growing, is not really helping.

The idea that I followed then was based on the Collision Deformer.
Mini screenshot:
https://www.amazon.com/clouddrive/share/4tKIjsABAS2txEU1SispMOXQIFDgneW7JOOv3VSQX9G

The Volume Mesher is not delivering the smaller geometry in your scene to it, so I forced this update via a Connect Object.

This Connect Object was then used in the Collision Deformer, with a Plane, as the Collision Deformer doesn’t use volume-based objects. I used a Point Cache here.

This Plane is then used in the Surface Deformer. It deforms the Object and has the option to set an Offset, so you can change the distance to the cancer object.

It is pretty stable and can hold even a little bit more complex objects than a Capsule.

I have set up a sketch, just with Primitives to show the flow of the information. Scene-file:
https://www.amazon.com/clouddrive/share/t2HTa3S7u7R25KoatPBpgshkrISVANJeeQF95u4zGoW

I hope that works for you.

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: 03 August 2019 04:29 PM   [ Ignore ]   [ # 4 ]  
Avatar
Total Posts:  34
Joined  2011-12-21

Wonderfull set up, I never used the point cache and I would have never thought of using it in conjunction with a connect object to get the information through from the volume. But that said I am also still puzzled about how this works.
The collision deformer is deforming the plane with the volume. But how exactly is the pointcache and the connect object involved? The capsule then is deformed with the surface deformer using the plain and its point cache????

Thanks again Sassi as alway’s every time I get stuck using the wrong set up, and spending hours to to get around problems that I should have avoided in the first place you get me up and running again.grin

Profile
 
 
Posted: 03 August 2019 06:20 PM   [ Ignore ]   [ # 5 ]  
Avatar
Total Posts:  34
Joined  2011-12-21

I did some experiments with your set up. I can’t get it working with another object than the capusule. I tried a sweep (after I did a current state to object) and a cylinder. Do I have to recalculate the piont cache?

Profile
 
 
Posted: 03 August 2019 11:28 PM   [ Ignore ]   [ # 6 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Hi Geertjan,

If you like to replace the Capsule, do the following:

Create an object that has enough resolution to follow the Plane information.
Place under that object the Surface Deformer. Adjust the needed values (see below)

Screen Capture
https://www.amazon.com/clouddrive/share/qolxUAwvzAQ5zB9xDoqxE7JRiU4yKZe9ZdLm0nDNsif

The full information flow is as follows:
The Connect Object generates the Volume Information, without it, the Collision Deformer has not the right information.
Based on the Collision Deformer, the Plane becomes deformed, and the size of the Plane represents the area in which an object can exist to be deformed.
This Plane can be used already in the Surface Deformer, but each frame will be calculated newly, hence the Point Cache, to do this only once. If the Volume setup changes, cache again.
The Plane is then used as a base for the Surface Deformer. The UV of the Plane is crucial, as the object is placed on the Plane like an image would be.
The Surface Deformer works on the Final object in this workflow, i.e., the nerve in your example. Since the UV space is normalized, from 0-1 in both directions, the Object will be larger or smaller, if applied. Hence the adjustments, as in the Screen capture. In other cases the UV or VU, as well as, ZY, XZ or YX might need to be adjusted newly.

I hope that answers your questions, if not, please let me know.

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: 04 August 2019 04:01 PM   [ Ignore ]   [ # 7 ]  
Avatar
Total Posts:  34
Joined  2011-12-21

Ok that’s clear. Now I understand why my new object’s get so deformed. I will try some experiments:-)
Thanks again Sassie.

Profile
 
 
Posted: 05 August 2019 12:26 AM   [ Ignore ]   [ # 8 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

You’re very welcome, Geertjan, thanks for the reply.

Let me know if there is anything else.

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