Results 1 to 17 of 17
  1. #1

    How to make a bubble material - LuxRender and Cycles

    I'm making this short tutorial because someone asked me to after I posted a few Bubble renders, so hope it helps

    Resources:
    - A HDRi world image for good lighting, I used this one: http://www.openfootage.net/?p=355

    - The NanometerColor node group by bashi from here: http://www.pasteall.org/blend/14413
    http://blenderartists.org/forum/show...olor-NodeGroup
    (You'll want to import the node tree called NanometerColor, that is shown in the tutorial)

    - A bubble model :P

    Here is what the final result can look like: (Cycles one could probably be improved more, toning/brightness etc...)

    Cycles: 960*540 CPU Only 3:30 (min:sec)

    Click image for larger version. 

Name:	CyclesBubble.jpg 
Views:	604 
Size:	91.4 KB 
ID:	185843

    LuxRender 1280*720 CPU Only 18:00 (min:sec)

    Click image for larger version. 

Name:	LuxRenderBubbles.jpg 
Views:	624 
Size:	174.6 KB 
ID:	185842

    ************************************************** ***********
    Cycles Method:

    1. Open your model that you want the bubble in.

    2. Import the NanometerColor node tree from the downloaded blend (Node_Cycles_NanometetColor.blend)

    To do this while your model is open: Press 'Shift - F1' > Locate Node_Cycles_NanometetColor.blend > Open it > Click 'NodeTree' > Select 'NanometerColor' > Press 'Enter'

    3. Create a new material for your bubble, and open the node editor. Add 2 Glass BSDF, 1 Gradient Texture, 1 Mix Shader and 1 Material Output to the material.

    4. In the Node Editor, click 'Add' > Group > Select 'NanometerColor'.

    5. Set the materials up like this:
    - Both Glass to IoR 1.33, roughness 0 (0 looks better, otherwise really low) and to RGB 1,1,1 (so its a clearer (not dark) material)
    - Mix Shader to 0.9
    - NanometerColor to 370nm

    6. To connect the nodes:
    - Factor from the Gradient Texture into the Manual 0-1 of the NanometerColor
    - Image from the NanometerColor to the color of a Glass BSDF
    - Connect the Glass BSDF (one from above) to the top of the Mix Shader, the other Glass BSDF to the bottom.
    - Connect the Mix Shader to the Material Output

    Node setup as shown below:

    Click image for larger version. 

Name:	BubbleNodeSetup.JPG 
Views:	876 
Size:	50.3 KB 
ID:	185845

    7. Lastly, (strongly recommended) add a Solidify Modifier of thickness 0.0003 (300nm) to your bubble object. Remember to apply scale first. Select Bubble Object > 'Ctrl - A' > 'Scale'

    8. [Optional] Choose a HDRi world image (for best results) or make sure the scene is well lit.

    9. Done!

    ************************************************** ***********

    LuxRender Bubble Material:

    Having LuxBlend and LuxRender pre-installed is assumed.

    1. Open your model that you want the bubble in.

    2. Create a new material on the bubble object.

    3. Set material type to 'Glass' with the following settings:
    - IOR 1.33
    - Film IOR 1.33
    - Thin film thickness (what simulates the coloured film) 192nm (192)

    The material when setup correctly:

    (Can only attach 3 per post, will attach image below)

    4. Lastly, (strongly recommended) add a Solidify Modifier of thickness 0.0003 (300nm) to your bubble object. Remember to apply scale first. Select Bubble Object > 'Ctrl - A' > 'Scale'

    5. [Optional] Choose a HDRi world image (for best results) or make sure the scene is well lit.

    6. Done

    ************************************************** *************

    I hope this is useful Any hints/improvements post below



  2. #2

    Continued:

    LuxRender Glass Material Setup:

    Click image for larger version. 

Name:	LuxGlass.JPG 
Views:	115 
Size:	43.3 KB 
ID:	185923

    Solidify Modifier:

    Name:  Solidify.JPG
Views: 3558
Size:  23.6 KB

    Scaling your model to a real world size is important, as the thickness of such bubbles is appropriate for a 3cm bubble (or larger) but not a 2m big bubble.



  3. #3
    Member bashi's Avatar
    Join Date
    Nov 2010
    Location
    Bern, Switzerland
    Posts
    969
    Hi zeealpal, nice to see the NanometerColor in use ;-)

    In the cycles render i'm missing a bit of colors ;-)

    Here is my soap Bubble: pasteall
    Click image for larger version. 

Name:	SoapBubble.png 
Views:	266 
Size:	852.1 KB 
ID:	185952
    bwide.wordpress.com - Free NodePack, 70+ Cycles + Compositor
    Happy Destruction with: Bullet Constraints Tools



  4. #4

    Hey

    Originally Posted by bashi View Post
    Hi zeealpal, nice to see the NanometerColor in use ;-)

    In the cycles render i'm missing a bit of colors ;-)

    Here is my soap Bubble: pasteall
    Click image for larger version. 

Name:	SoapBubble.png 
Views:	266 
Size:	852.1 KB 
ID:	185952
    Yeah, I wasn't sure how to make my Cycles one look better... is there any chance you could look at my scene and try improve it? That node tree is great



  5. #5
    Member bashi's Avatar
    Join Date
    Nov 2010
    Location
    Bern, Switzerland
    Posts
    969
    Originally Posted by zeealpal View Post
    Yeah, I wasn't sure how to make my Cycles one look better... is there any chance you could look at my scene and try improve it? That node tree is great
    Try a Input-> Layer Weight/Facing Node instead of your Gradient Node... should give some colors ;-) Pretty much how i made mine (Just added some Noise to it)
    bwide.wordpress.com - Free NodePack, 70+ Cycles + Compositor
    Happy Destruction with: Bullet Constraints Tools



  6. #6
    Member brankovukelic's Avatar
    Join Date
    Oct 2009
    Location
    Belgrade, Serbia
    Posts
    165
    Still rendering in Lux here, but after a bit of experimenting, I think 300 microns is a bit too thick for a 3cm ball of soap. In reality (as per Wikipedia), the soap bubble averages 1 micron, so I think even 10 would be physically too thick. I've got a 5cm bubble here with 10 microns thickness and it looks OK-ish.

    Btw, I also find I get better results in Lux if I add a glossy coating with IOR set to 1. It's not physically correct by any stretch of imagination, but it looks better.

    EDIT: Still experimenting but I've found a post on Lux forums advising use of Architectural glass + thin film for this. So far, it seems to get rid of the black outline so I think it's a keeper..
    Last edited by brankovukelic; 05-Sep-12 at 18:53.
    Intel Core i5 4670K (OC'd to 4.2GHz)
    16GB RAM 1600MHz
    MSI Radeon HD R7870 OC

    flickr gallery



  7. #7
    Thanks, Ill experiment and update it too



  8. #8
    Member
    Join Date
    Apr 2011
    Location
    Edmonton, Canada
    Posts
    107
    Thanks!

    My result:
    Click image for larger version. 

Name:	KV1cW.png 
Views:	179 
Size:	317.4 KB 
ID:	196576



  9. #9
    Originally Posted by spect3r View Post
    Thanks!

    My result:

    Click image for larger version. 

Name:	KV1cW.png 
Views:	179 
Size:	317.4 KB 
ID:	196576
    That's quite pretty Cycles I presume?



  10. #10
    Member
    Join Date
    Apr 2011
    Location
    Edmonton, Canada
    Posts
    107
    Originally Posted by zeealpal View Post
    That's quite pretty Cycles I presume?
    Yep Thanks again, love the material node you created. It's near perfect



  11. #11
    I'm trying to get a realistic looking soap bubble, but I keep getting this colorful blob. can anybody help?
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	Untitled.png 
Views:	161 
Size:	1.74 MB 
ID:	197597  




  12. #12
    Originally Posted by ProfUnicorn View Post
    I'm trying to get a realistic looking soap bubble, but I keep getting this colorful blob. can anybody help?
    Hmm, it appears the Gradient Node is causing this, I wonder if recent updates to Cycles may have caused this? Try change the gradient node from 'Easing' to 'Spherical'.

    If you need the realism, then it would be easier with LuxRender, otherwise someone more proficient in Cycles might have to help



  13. #13
    Member karlis.stigis's Avatar
    Join Date
    Sep 2010
    Location
    Riga, Latvia
    Posts
    213
    Click image for larger version. 

Name:	Screen Shot 2013-03-22 at 3.09.43 AM.png 
Views:	123 
Size:	1.38 MB 
ID:	223949
    Hi, I looked at your shader, but it was not working as good as I would want.. so I made my own version.. without all the mathematics, but just to make it look good.. here is example.

    Attachment 223952

    Here is animation test with particle fluid meshing.. looks crappy due to lack of good mesher.
    http://imageshack.us/clip/my-videos/...ebzsqqzgf.mp4/
    Last edited by karlis.stigis; 13-Jun-14 at 18:25.
    -------------------------------------------------------------------------
    www.hypnosis.lv
    Hypnosis Group on Vimeo



  14. #14
    Hi, I was very interested in this Bubbles_Test.blend, but somehow none of the links in here work for me... what's wrong with them?



  15. #15
    Member karlis.stigis's Avatar
    Join Date
    Sep 2010
    Location
    Riga, Latvia
    Posts
    213

    Soap Bubbles

    I don't know why, but can't get that link to work..
    I copied the file here temporarily, so get it while it's there:
    https://dl.dropboxusercontent.com/u/...ader.blend.zip

    As with bubbles in real life, it's very important what kind of light and reflections you have to get them look good.
    I included hdri environment texture for preview (it's just pulled from internet somewhere)

    Hope you like it.. and will be happy to see your results.
    -------------------------------------------------------------------------
    www.hypnosis.lv
    Hypnosis Group on Vimeo



  16. #16
    Here's what I got (in Cycles) after some fiddling around. I'm quite happy with it.

    Click image for larger version. 

Name:	Bubbles2.jpg 
Views:	21 
Size:	148.3 KB 
ID:	323039

    And here's my node tree:
    Click image for larger version. 

Name:	NodeTree_Bubbles.PNG 
Views:	58 
Size:	111.9 KB 
ID:	323042
    It's a bit messy right now, sorry for that.
    That Value -node under the seperate RGB node is the multiplier for the intensity of the "rainbow" effect.

    The UV map is also kind of weird. I've put the two sides of the sphere overlapping each other to eliminate seams in the bubble.

    Thanks for making the tutorial, and thanks to the other people on this thread, helped a lot!
    Last edited by ollpu; 26-Jul-14 at 07:34. Reason: Images didn't work



  17. #17
    After some more fiddling, (playing around with the fresnel node) I got this:
    Click image for larger version. 

Name:	Bubbles_fresnel_jpg.jpg 
Views:	21 
Size:	214.4 KB 
ID:	323044
    It's not exactly realistic, but looks cool nonetheless.

    Here's the nodes for that:
    Click image for larger version. 

Name:	Bubbles_fresnel_nodes.PNG 
Views:	62 
Size:	183.6 KB 
ID:	323045



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •