Soap bubbles
Posted: 02 January 2018 04:16 AM   [ Ignore ]  
Total Posts:  94
Joined  2010-08-21

I am trying to simulate the way that soap bubbles adhere to each other. The contact areas literally flatten giving almost a voronoi look to the bubbles. I wanted to achieve it with spheres, cloner and dynamics and I got a pretty good gathering of bubbles, but it escapes me how I can achieve the flattening of the spheres where there is contact. Any ideas?

Profile
 
 
Posted: 02 January 2018 06:11 AM   [ Ignore ]   [ # 1 ]  
Moderator
Avatar
Total Posts:  4882
Joined  2011-03-03

Hi vytas_rauckis,

I have no fast solution for that, to create a natural cluster of bubbles, let me explain.

The practical part:

The soap-bubbles typically find a specific balance of all participating bubbles where the tension is equalized among all in direct contact, and so on.

This was practically used, to my knowledge, in the architecture design of Frei Otto. We studied his light-weight buildings back in the days.
An example is given here, even more targeting roof curvatures:
https://www.youtube.com/watch?v=-IW7o25NmeA

A longer introduction to this theme is here:
https://www.youtube.com/watch?v=rEXj69hCi44

As you might notice, this is not a simple “formula”.

In other words, to place spheres randomly in space and “draw” their contact areas as flat elements wouldn’t be correct. The whole “physics” in such a cluster is complex.


The CG part, I guess that mathematical precision is not the target here.

So, here is the closest I get with my first idea, and it is not really where I think it should be. But perhaps it delivers some ideas.
The VoronoiFracture gives of course the “cut” not only to its neighbors. So there is a limitation on top of that, it might extend the cut if the cluster is more uneven. I share this file, as it show some limitations if the cluster of bubbles is spreading out.
Two scene files: (You might ignore these or just check them out as a brain storming file
https://www.amazon.com/clouddrive/share/0qJiewzK8OsLRniP4jLAYlzrUPYNAjfgtaHwKCuPFVZ
The point production (XPresso) could be simplified, but given the current state of the idea above, I think it is not the prime problem.

For the texturing, please have a look here:
https://www.youtube.com/watch?v=FxjROrq8U4w&index=66&list=PLD428BE966FF3B1E9

All in all, one would need to Boole all the Spheres to get one surface and then fracture it. Again, if the set up has some “branches” of bubbles, the points might cut…

Here is a manual suggestion. (See image below), based on your lead to use Voronoi Fracture.

With the little gap the seam is nice.
Scene file: First step of exploring a possible workflow, by setting up the membranes with Splines, which was a test, but I guess the Voronoi can deliver this, with a tight sphere mesh to start with as well, but here is the set up …
All files are in this collection
https://www.amazon.com/clouddrive/share/rD38g7crCgMwnv5AfyKEP07bUGPxYtvcBKcrsjSlUb6
… and here is then the next step, which uses as well the Boole set up under a Voronoi Fracture.
This set up uses the “Current State To Object” function, and while a gap was introduced in the Voronoi Fracture to get the mesh[es], the resulting meshes receive an Extrude [M~T] with Create-Caps on, to give each of the four segments a thickness. The material thickness is below half of the initial gap. All parts from the file …_22 that were used are deleted and only the polygon based result is left for clarity. The Selection Tag (produced without the gap of the Voronoi): Current State To Object, then Edge To Spline, then Sweep.


The Sweep set up simulates the little fluid accumulation along the contact areas. Again, real bubbles pull them self to a equalized position, this was not the target here.

All the best

edit: all scene files are now in one collection. /edit

Image Attachments
CV2_r19_drs_18_MGsb_21.jpg
 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.

Photography For C4D Artists: 200 Free Tutorials: Texture, Panorama, HDRI, Camera Projection, etc.
https://www.youtube.com/user/DrSassiLA/playlists

Profile
 
 
Posted: 03 January 2018 06:13 AM   [ Ignore ]   [ # 2 ]  
Moderator
Avatar
Total Posts:  4882
Joined  2011-03-03

P.S.: Just one more, I think this is the fastest way, and please take the material set up as a sketch only. Again, it just creates a Voronoi contact set up, not a real soap bubble equilibrium result. All bubbles are the same size. Voronoi Fracture takes in this example the object Axis, and the half-way of it to create the split. The size of the bubble is not recognized.

It uses a free plug-in:
https://nitro4d.com/product/magic-merge/

Scene file collection, as above:
https://www.amazon.com/clouddrive/share/rD38g7crCgMwnv5AfyKEP07bUGPxYtvcBKcrsjSlUb6

One minute clip: [you can download it for a better viewing experience]
https://www.amazon.com/clouddrive/share/KyrFh7JSgXKUEf8RygPLXrMFXt768X7CgKCk1u13iIU

Enjoy

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.

Photography For C4D Artists: 200 Free Tutorials: Texture, Panorama, HDRI, Camera Projection, etc.
https://www.youtube.com/user/DrSassiLA/playlists

Profile
 
 
Posted: 03 January 2018 11:35 AM   [ Ignore ]   [ # 3 ]  
Moderator
Avatar
Total Posts:  4882
Joined  2011-03-03

Alternative: (Posted on January 02, no idea why it is now all of the sudden dated January 04, [edit] now back to the 3rd.) .

In this set up a plug in is used to overcome the Boole limitations. The NitroFit: Boole allows for “merging” many objects ad once. (I used a the R16)

The result is a surface that Voronoi Fracture can use.  The Voronoi Fracture set to Inverse to create the inside elements. Note that I have added one single point to the Platonic Object, a center [zero] point.

While the Voronoi Fracture was set up, and had no gap, based on zero Offset Fragment, I used the “Current State To Object”, while the Selection>Surface Break Edge was enabled, to get a more smooth connection. See Sweep Object.

The Phong angle worked well around 15º for the outer surface.

Scene file/screen shot:
https://www.amazon.com/clouddrive/share/KOOLymAqO7icpXjPobqAFnLqFzajSC4IqOUyuRo2Peb

Perhaps the Voronoi Fracture Object delivers already all you need in one step.

Let me know if you have a question.

All the best

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.

Photography For C4D Artists: 200 Free Tutorials: Texture, Panorama, HDRI, Camera Projection, etc.
https://www.youtube.com/user/DrSassiLA/playlists

Profile
 
 
Posted: 05 January 2018 03:27 PM   [ Ignore ]   [ # 4 ]  
Total Posts:  94
Joined  2010-08-21

Thanks you Dr. Sassi. This is how this worked out for me.

Image Attachments
BubbleBathLayout_sm.png
Profile
 
 
Posted: 05 January 2018 03:34 PM   [ Ignore ]   [ # 5 ]  
Moderator
Avatar
Total Posts:  4882
Joined  2011-03-03

Thank you very much, vytas_rauckis!

So nice to see the result. Nice work. Thanks for sharing. grin

I hope you and the client have success with it.

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.

Photography For C4D Artists: 200 Free Tutorials: Texture, Panorama, HDRI, Camera Projection, etc.
https://www.youtube.com/user/DrSassiLA/playlists

Profile
 
 
Posted: 05 January 2018 03:50 PM   [ Ignore ]   [ # 6 ]  
Total Posts:  94
Joined  2010-08-21

The bubbles do not have as much a thin film feel as I would have liked but I think that was a factor of making sure the “raspberry blackberry” color is faithful in the bubbles. I would like to learn how to make the thin film feel better and still have the desired overall color.

Profile
 
 
Posted: 05 January 2018 07:14 PM   [ Ignore ]   [ # 7 ]  
Moderator
Avatar
Total Posts:  4882
Joined  2011-03-03

There is some information in the Help Content, vytas_rauckis!

Please go to the entry in the Application Help Content, scroll down and you find a Scene file icon. Double click on it, and then go to the Reflectance Layer_1.
Note: the online version has only an icon, no scene file connected with it.
https://help.maxon.net/us/#XTHINFILM

In the scene the effect is based on the light and bright objects. But also the background behind the bubbles.
In the material, the two parameters as well the Texture/Gradient have the main influence. Note here, the influence of the gray values, especially with animated noise.

With 100% transparency, the least amount of color will be seen of course.

As usual, to explore the main parameters, set them up as animation, to see in a movie how they change over time. Typically the scene files in the Help Content provide a sweet spot, go a little bit above and below for the animation.

Perhaps mix some “Spectral Shader” amount into the surface.

An example with more color:
Scene file collection, as above
https://www.amazon.com/clouddrive/share/rD38g7crCgMwnv5AfyKEP07bUGPxYtvcBKcrsjSlUb6
I left refraction to 1.0 please adjust to your liking.
OR a simplified version (low poly), etc.
All can be created by using the donation ware
https://nitro4d.com/product/magic-merge/

The tutorial from Patrick should certainly accelerate the exploration, to get savvy with it in no time.
https://www.cineversity.com/vidplaytut/use_c4d_thin_film_shader_to_render_oily_surfaces_and_bubbles


My best wishes

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.

Photography For C4D Artists: 200 Free Tutorials: Texture, Panorama, HDRI, Camera Projection, etc.
https://www.youtube.com/user/DrSassiLA/playlists

Profile
 
 
   
 
 
‹‹ Alembic Motion Blur      NURBS, Part 1 ››