All posts related to V3
By bograt
#376468
I was having a look back at this thread: http://www.maxwellrender.com/forum/view ... r+in+glass
I was wondering, currently what is the best method for rendering liquid in a glass? and what would be the approach for putting air bubbles or dielectrics into the liquid?
Tom, I noticed you upload a nice render to the gallery some time ago. Did you use the technique mentioned in the thread I linked to?
Cheers,

Jules
User avatar
By seghier
#376469
i ask about that in realflow facebook page but they don't reply
in maxwell this is the right method to create real effect
Image
but what we do with complex shapes ? and when we use realflow ?
i tried render a demo scene ; liquid in glass but the result not good like in the realflow manual (with the same scene )
User avatar
By eric nixon
#376482
These two renders use the method in the diagram.

Transparent around an sss;
Image

and SSS around a transparent; (only works in MW3);
Image

To get the sss latte foam looking as though it was touching the glass, I cheated a little using a boolean cut to remove the glass surface at the foam edge.
what would be the approach for putting air bubbles or dielectrics into the liquid?
This is from another thread, a somewhat simplified diagram, but still informative;
Image
By numerobis
#376486
wow! 8) very nice and clean renders. Is this using the 'liquid in glass" setup above or something different?
Would be nice to know the sl and render times...


edit : "These two renders use the method in the diagram."
ok, thanks
Last edited by numerobis on Mon Jan 13, 2014 3:34 pm, edited 1 time in total.
By photomg1
#376502
agree with you numerobis ,

I wish someone would post an obj/fbx version of a model showing this working correctly , so we could all study it .I still have some issues with this and is one of the few things that really bugs me in maxwell.
By bograt
#376509
Thanks Eric, They look great! I was hoping a new solution had been implemented into newer versions of Maxwell.
As discussed in the thread, the method seems to work but for complex models it is a frustrating workaround.
Thanks

Jules
By hatts
#376517
photomg1 wrote:I wish someone would post an obj/fbx version of a model showing this working correctly , so we could all study it
Here you go. In the .ZIP you can find an MXS with the geometry, a textures folder, and an OBJ.
Quick render below shows the result.

Image
User avatar
By eric nixon
#376523
That example file works ok, but it is missing 1 detail. If you look at the big diagram, the green line which is the glass geo that follows the top surface of the liquid, this should have a polygon selection applied to it with a duplicate of the glass mxm, the duplicate needs to have clear transparency AND no spec, because the spec reflection is provided by the liquid underneath.

Basically that top geo just needs the ND + attenuation of the glass (so that maxwell understands the light path) it doesnt need anything else. Actually I disagree slightly with the diagram because I think the top geo should always have roughness 0, not necessarily the roughness of the liquid (which also may be 0). Anyway thats what I've been doing. Maybe Tom can confirm this.
Last edited by eric nixon on Mon Jan 13, 2014 6:08 pm, edited 1 time in total.
User avatar
By Mihai
#376524
I don't think that's needed Eric, as the diagram mentions - in that infinitesmal gap, it's as if the glass top surface isn't there. Try with just the same glass material surrounding the liquid - and yeah most likely you don't want to use any roughness on the liquid. I think Thomas was mentioning that in case you had a rough glass material. The liquid should always be rough 0 or it doesn't make sense.

So in the case of glass having some roughness, yes you would need a split surface there with roughness 0. Well, even if the glass has a rough 1 or so, I think it will still be fine and you don't need that separate green surface.
User avatar
By eric nixon
#376526
No that wont work, you want to see the spec of the liquid on top, which is already there by default, so you need to adjust the glass area on top, because otherwise you will get the extra spec that you dont want. Also that would slow it down slightly with the light bouncing between parallel surfaces.

EDIT: just realising I forgot something which makes the the 'ribena render' above invalid; The top surface which has no spec should have the roughness of the cup, I'll do a re-rendner now. hang on.

Thankyou Mihai, for making me think about this detail.
By photomg1
#376527
Mihai and Eric , could you post a sample file of what you both mean ….. it would be fantastic for anyone new (or someone who finds it hard to get it to work like me :lol: ) to be able to download a mxs file like Hatts did . There really should be a definitive example version available to download from V3/V2 documents. As it is a common problem.
User avatar
By eric nixon
#376529
Erm, just found out something I didnt expect...

When the situation is a rough transparent cup, and therefore to get correct light path you need the green line as per the diagram. In this case the roughness prevents the liquid spec from showing, so the spec must be added to the green line geometry instead, and this requires two bsdf's in both the mxm's used for the cup. In my scene my cup mxm already had two bsdf's so it wasnt a problem, here is quick 10min test;

Image

here is the packed scene, if it helps. I'm not sure the diagram is correct for every scenario.... I am a bit confused though,.. my head is a mess today.. :?

It seems that if the spec needs always to be on the green line surface, then it should be muted slightly (using a 2nd mxm applied to poly-selection) because the glass cup will have too much spec compared to the liquid.

https://www.mediafire.com/?5nmsi25049tc5hh
By photomg1
#376531
Massive thanks to you as well Eric ! ,

I've been finding myself confused with this topic all along if its any consolation . :D at least you and Hatts have been getting very good results …

when you say you are not sure that diagram is not correct for every situation , what are you thinking of ? because for me I always wondered when I look at it its going to create a crazy mesh on the glass object if it was an image of liquid being poured out of a bottle for example . I seem to remember simmsimaging doing some images like that in maxwell with success so its just me who needs to get his head around it . :D

Hatts that file is a massive help , I'm sure yours will be as well Eric when I check it out after I finish a render.
Sketchup 2025 Released

Thank you Fernando!!!!!!!!!!!!!!!!!!!!!!!!!!! hwol[…]

I've noticed that "export all" creates l[…]

hmmm can you elaborate a bit about the the use of […]

render engines and Maxwell

Funny, I think, that when I check CG sites they ar[…]