Oily film on liquid

Started by cjwidd, October 25, 2017, 08:33:16 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

cjwidd

I've spent a couple days trying to nail this material but coming up short. I then cruised the forum and searched online, but haven't found a solid answer.

Trying to recreate thin-film interference that occurs on the surface of coffee (see attached); unfortunately, you cannot pass the thin film shader (oil) into a dialectric (liquid coffee).

EDIT: Best solution I've found is to take an existing hi-res roughness map and use the 'liquify' filter in Photoshop to create the swirling pattern.

Will Gibbons

I would say that yes... using an image-based texture is a good start. But, you could try applying a metal label to the top of the liquid... then apply an opacity map to the metal, so it's more subtle.

Will Gibbons

Quote from: Will Gibbons on October 26, 2017, 01:10:56 AM
I would say that yes... using an image-based texture is a good start. But, you could try applying a metal label to the top of the liquid with a view-direction color gradient... then apply an opacity map to the metal, so it's more subtle.

cjwidd

#3
Yeah, I'm still working on it (see attached). I'm actually trying something like this^, only with a transparent plastic instead. I find lighting - as usual - goes a long way to achieving the desired result, but it's also about matching the transmission color of the plastic, roughness, etc.

v0

cjwidd

#4
v1

cjwidd


cjwidd


DMerz III

This is a great exploration! It is amazing to me that we've come this far to start looking for ways to solve this realism. Keep it up

cjwidd

Yeah it was a challenging material for me, but it's funny how you can achieve a complex material with a relatively simple graph.

Will Gibbons

Not sure how I missed where this went, but I love the result. Very nice. Well-done. Did you ever create a final rendered piece? I'd love to see the final.

cjwidd

#10
Really appreciate it, thanks! Also, thanks for the Efficient KeyShot User - Materials webinar, very nice.

I got distracted with some other tasking and sidelined the project temporarily. I'll post final renders to the Amazing Shots thread when they are ready.

When I did return to the material, I realized there was an issue that just wasn't resolvable using the matgraph above: I'm passing a transparent material into the main material as a label - it is transparent, and as such, you can see the inside faces of the other piece of the liquid based on the mask; following the method described here. A backface culling mask did not help matters.

As it seems to happen when I'm developing a seemingly complicated material, I end up with a fairly simple matgraph, which in this case consists of multiple combined bump maps and a roughness map. You can see where I left off in the attached image.

Will Gibbons

In regards to issues with transparent labels.. correct. This is why I avoid them at all costs. I'll try a duplicate surface offset by a very small amount (.1mm) or using opacity to make an opaque material appear more transparent. You may be able to get some improvements using the gem material in place of liquid at times.

cjwidd

Will, I'm experiencing some sort of artifacting on the inside face of this glass material. It looks like a low res reflection from an adjacent piece of geometry. Can you identify this?

Will Gibbons

Hmm. Assuming you have enough Ray Bounces (default of 14 should be plenty), I think this has to do with the geometry and some co-planar faces... how is the glass modeled?