Hi,
What’s the correct way to create air bubbles inside liquid?
Right now I’ve got the normals of the air bubble meshes inverted inside the liquid mesh, but it looks odd.
Maybe the right way is to not invert the air bubble normals, but assign a separate material with an IOR of 1.0 to it?
Thanks in advance for your help.
Air bubbles inside liquid
Forum rules
Please upload a testscene that allows developers to reproduce the problem, and attach some images.
Please upload a testscene that allows developers to reproduce the problem, and attach some images.
- MetinSeven
- Posts: 137
- Joined: Sun Aug 18, 2019 10:19 am
- Location: Netherlands
- Contact:
Air bubbles inside liquid
visualizer • illustrator • animator • 3D designer — metinseven.nl
Re: Air bubbles inside liquid
Can you show a picture and maybe upload a small testscene?
- MetinSeven
- Posts: 137
- Joined: Sun Aug 18, 2019 10:19 am
- Location: Netherlands
- Contact:
Re: Air bubbles inside liquid
Sure. I've attached the scene.
Maybe it's correct, but I'd expect the air bubbles to be lighter instead of darker.
Maybe it's caused by the blurry glass rays?
Any other LuxCoreRender advice, such as the optimum settings for caustics, and light strength vs. scene scale, are also very welcome.
Thanks!
Maybe it's correct, but I'd expect the air bubbles to be lighter instead of darker.
Maybe it's caused by the blurry glass rays?
Any other LuxCoreRender advice, such as the optimum settings for caustics, and light strength vs. scene scale, are also very welcome.
Thanks!
- Attachments
-
- Air bubbles.blend
- (390.2 KiB) Downloaded 157 times
visualizer • illustrator • animator • 3D designer — metinseven.nl
Re: Air bubbles inside liquid
Ideally, I would create two separate materials. LuxCore has the concept volumes being separate from the material, and you can assign different volumes to the interior or exterior of a material.MetinSeven wrote: ↑Thu Jul 09, 2020 8:46 pm Hi,
What’s the correct way to create air bubbles inside liquid?
Right now I’ve got the normals of the air bubble meshes inverted inside the liquid mesh, but it looks odd.
Maybe the right way is to not invert the air bubble normals, but assign a separate material with an IOR of 1.0 to it?
Thanks in advance for your help.
To create this I used 2 volumes:
- Air: IoR 1.0, Priority 1
- Water: IoR 1.33, Priority 0 (default)
When volumes intersect, the higher priority volume is used. That way the bubbles can be modelled as usual, with normals facing outside.
Using the volumes for these materials:
- Water: Glass, Interior 'Water', Exterior 'Air'
- Air: Glass, Interior 'Air', Exterior 'Water'
When the water and air volume intersect where the bubbles are, the air volume is used as it has a higher priority.
- Attachments
-
- Air bubbles.blend
- (288.47 KiB) Downloaded 184 times
- MetinSeven
- Posts: 137
- Joined: Sun Aug 18, 2019 10:19 am
- Location: Netherlands
- Contact:
Re: Air bubbles inside liquid
Very interesting, thanks a lot! LuxCoreRender obviously needs a more scientific way of thinking, I like that.
visualizer • illustrator • animator • 3D designer — metinseven.nl
- MetinSeven
- Posts: 137
- Joined: Sun Aug 18, 2019 10:19 am
- Location: Netherlands
- Contact:
Re: Air bubbles inside liquid
If I'm not mistaking, you can leave away the volume nodes in the water material. Only the air material needs both volume nodes.
visualizer • illustrator • animator • 3D designer — metinseven.nl
Re: Air bubbles inside liquid
Some notes from my side:
- You don't need volumes for this particular case, using a single material and inverting the bubble normals is fine. Volumes are mostly required if you have more than one transmissive medium interacting with each other. However, they are also required for volumetric effects (absorption, scattering) which is why I used a single volume for the water material here (see below)
- For physically correct absorption, use a volume with absorption color instead of the glass transmission color. It vastly improves the realism here, because the transmission color is simply applied at each bounce, while the absorption color takes the distance traveled into account and is independent from the bounce count.
- This particular scene doesn't require "add light tracing" or the caustics cache, so I turned them off
- I wouldn't use rough glass for water, but that's a matter of artistic decisions for the desired result
- To capture all relevant specular bounces in the glass, you might need to raise the total and specular depths. In this scene I raised the depth step by step during a viewport render, until all black spots were gone. I ended up with 10 required bounces.
- Attachments
-
- Air bubbles (1).blend
- (297.86 KiB) Downloaded 163 times
- MetinSeven
- Posts: 137
- Joined: Sun Aug 18, 2019 10:19 am
- Location: Netherlands
- Contact:
Re: Air bubbles inside liquid
Thanks a lot Simon! I'm learning more and more about LuxCoreRender, and like it more and more too!
visualizer • illustrator • animator • 3D designer — metinseven.nl
- MetinSeven
- Posts: 137
- Joined: Sun Aug 18, 2019 10:19 am
- Location: Netherlands
- Contact:
Re: Air bubbles inside liquid
Here's the end result. Thanks again for your help.
Have a nice weekend!
Have a nice weekend!
visualizer • illustrator • animator • 3D designer — metinseven.nl