Author Topic: Oily film on liquid  (Read 2580 times)

0 Members and 1 Guest are viewing this topic.

Offline cjwidd

  • Sr. Member
  • ****
  • Posts: 269
    • ArtStation
Oily film on liquid
« on: October 25, 2017, 08:33:16 pm »
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.
« Last Edit: October 25, 2017, 08:40:24 pm by cjwidd »

Offline Will Gibbons

  • Hero Member
  • *****
  • Posts: 2849
  • willgibbons.com
    • My Website
Re: Oily film on liquid
« Reply #1 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... then apply an opacity map to the metal, so it's more subtle.

Offline Will Gibbons

  • Hero Member
  • *****
  • Posts: 2849
  • willgibbons.com
    • My Website
Re: Oily film on liquid
« Reply #2 on: October 26, 2017, 01:11:22 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.

Offline cjwidd

  • Sr. Member
  • ****
  • Posts: 269
    • ArtStation
Re: Oily film on liquid
« Reply #3 on: October 26, 2017, 01:14:08 am »
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
« Last Edit: October 26, 2017, 04:56:31 am by cjwidd »

Offline cjwidd

  • Sr. Member
  • ****
  • Posts: 269
    • ArtStation
Re: Oily film on liquid
« Reply #4 on: October 26, 2017, 03:29:40 am »
v1
« Last Edit: October 26, 2017, 04:56:24 am by cjwidd »

Offline cjwidd

  • Sr. Member
  • ****
  • Posts: 269
    • ArtStation
Re: Oily film on liquid
« Reply #5 on: October 26, 2017, 04:56:09 am »
v2

Offline cjwidd

  • Sr. Member
  • ****
  • Posts: 269
    • ArtStation
Re: Oily film on liquid
« Reply #6 on: October 26, 2017, 05:22:31 am »
v3


Offline DMerz III

  • KeyShot Beta
  • Hero Member
  • *****
  • Posts: 817
  • David Merz the Third
    • MerzTheThird
Re: Oily film on liquid
« Reply #7 on: October 26, 2017, 11:11:26 am »
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

Offline cjwidd

  • Sr. Member
  • ****
  • Posts: 269
    • ArtStation
Re: Oily film on liquid
« Reply #8 on: October 26, 2017, 03:23:55 pm »
Yeah it was a challenging material for me, but it's funny how you can achieve a complex material with a relatively simple graph.

Offline Will Gibbons

  • Hero Member
  • *****
  • Posts: 2849
  • willgibbons.com
    • My Website
Re: Oily film on liquid
« Reply #9 on: December 18, 2017, 02:20:18 pm »
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.

Offline cjwidd

  • Sr. Member
  • ****
  • Posts: 269
    • ArtStation
Re: Oily film on liquid
« Reply #10 on: December 19, 2017, 12:43:33 am »
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.
« Last Edit: December 19, 2017, 12:45:17 am by cjwidd »

Offline Will Gibbons

  • Hero Member
  • *****
  • Posts: 2849
  • willgibbons.com
    • My Website
Re: Oily film on liquid
« Reply #11 on: December 19, 2017, 08:22:50 am »
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.

Offline cjwidd

  • Sr. Member
  • ****
  • Posts: 269
    • ArtStation
Re: Oily film on liquid
« Reply #12 on: December 19, 2017, 07:38:20 pm »
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?

Offline Will Gibbons

  • Hero Member
  • *****
  • Posts: 2849
  • willgibbons.com
    • My Website
Re: Oily film on liquid
« Reply #13 on: December 20, 2017, 07:18:20 am »
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?