Author Topic: Blue Cheese Shader  (Read 8929 times)

2019-06-07, 01:46:41
Reply #15

pokoy

  • Active Users
  • **
  • Posts: 1850
    • View Profile
So I found some time to improve it... image attached. It comes with a flag!
This setup might work well enough for most cases, but additional work would be needed on the geometry to make sure it looks realistic.
Jonathan, I'll post the scene tomorrow (later when I'm back on the office, that is) but just so you know, I'm using two (free) 3rd party noise maps for the color/displacement/masking, these are way more efficient than any of those shipping with Max, they're available from maxplugins.de. I hope this isn't a problem, for example if you plan to render on a render farm.
The shader setup works OK without any additional geometry but the mold pieces/flakes add a nice touch, they can be easily scattered with CScatter, I'll include them.

You'll have to tweak a few things when you use it on other objects, I'll post the info tomorrow with the scene. Is max 2018 OK or do you need something else?

2019-06-07, 02:02:59
Reply #16

speltospel

  • Active Users
  • **
  • Posts: 47
    • View Profile
    • closeupvisual.com
Nice, i like it!
can you make 2017 version of file?



2019-06-07, 16:16:27
Reply #17

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12711
  • Marcin
    • View Profile
It looks so real I can smell it.
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2019-06-07, 16:33:07
Reply #18

John.McWaters

  • Active Users
  • **
  • Posts: 268
    • View Profile
    • JohnMcWaters.com
Nice, i like it!
can you make 2017 version of file?

Yes, if you would be willing to share this work with us, that would be awesome!

2019-06-07, 16:35:31
Reply #19

TomG

  • Administrator
  • Active Users
  • *****
  • Posts: 5434
    • View Profile
It looks so real I can smell it.

Coming in Corona 10, "olfactrics" ;)
Tom Grimes | chaos-corona.com
Product Manager | contact us

2019-06-07, 16:44:34
Reply #20

pokoy

  • Active Users
  • **
  • Posts: 1850
    • View Profile
Preparing the scene right now... should be here in the next hour or so.

2019-06-07, 16:45:37
Reply #21

felicialee

  • Users
  • *
  • Posts: 4
    • View Profile
I don't eat this type of cheese but the challenge was worth it. If you'd like to try it without scanning, I'll upload a scene for you tomorrow, see attached image.
This one involves roughly modeling the cheese geometry, displacement on the cheese with a few noise maps which adds geometry details, deformation, holes etc, scattering the mold with PFlow (Corona Scatter might work too, will try tomorrow) and the good thing is all shaders are separate giving you a lot of control. I guess it should also be relatively easy to roughly model some cheese crumbs. And it'll save you all the scanning work - if it looks good enough for what you need, that is.

I like your version very much, which made me interested in cheese again.


Moderator's note - removed spam links.
« Last Edit: 2020-05-27, 10:41:42 by romullus »

2019-06-07, 16:48:10
Reply #22

pokoy

  • Active Users
  • **
  • Posts: 1850
    • View Profile
It looks so real I can smell it.

Coming in Corona 10, "olfactrics" ;)

Please no, I love doing disgusting shader stuff, this would kill me :D

2019-06-07, 18:33:58
Reply #23

Juraj

  • Active Users
  • **
  • Posts: 4743
    • View Profile
    • studio website
Oh this new version almost looks edible :- ) Super good job.
Please follow my new Instagram for latest projects, tips&tricks, short video tutorials and free models
Behance  Probably best updated portfolio of my work
lysfaere.com Please check the new stuff!

2019-06-07, 19:15:07
Reply #24

sebastian___

  • Active Users
  • **
  • Posts: 200
    • View Profile
Both the render on the first page and the last render - the blue-green is just a little too saturated. I'm also not sure how to get the white fuzzy parts.

About the disgusting part, I was also a little reluctant, but it helps if you think the mold is related to "medicinal" molds. So don't think mold=bleah, but think mold ... vitamins ... healthy stuff :)
 Gorgonzola dolce or cremosso is the best.

2019-06-07, 19:30:04
Reply #25

pokoy

  • Active Users
  • **
  • Posts: 1850
    • View Profile
So, here's the French Fromage File :D
Scene file for Max 2015-2018 is attached (Corona 3 hotfix2). Scene uses centimeters, best is to keep it that way.
See attached pics for scene renders - one is a shader-only version, the other one uses additional mold geometry scattered with CScatter. If you don't want to fiddle with the scattered stuff the shader-only version might be enough.

IMPORTANT - You'll need two 3rd party maps for the BlurBeta Plugin Pack - Electric and WaterCell - available in one zip from maxplugins.de. Search for 'BlurBeta' and it should list them, download any of them to get the entire zip file, make sure to visit the subpage that matches your Max version.

Layers and objects:

Cheese Main - our main cheesy hero, can be any geometry but should have round edges so the displacement doesn't freak out. It uses CoronaDisplacement set to 0.8 pixel or so, set it to 3 or so for IR to keep it smooth if you change the displacement map (explained below)
Cheese Mold CScatter - additional mold pieces scattered with CScatter
Cheese Mold Distribution (can be hidden) - the object used for distribution of the mold pieces (useful if you want the pieces only on a certain part of cheese, theCScatter uses its bounding box, not the volume, but we're using the cheese geometry in a distance map to make sure the mold pieces aren't visible where they shouldn't so no problem here)
Cheese Mold Source (can be hidden) - 4 mold pieces that should resemble something like mold crumbs

Shaders (open the classic mat-ed for best overview):

1st Row
Slot 1 - L_Cheese_Complete - CoronaLayerMtl with the main cheese material as base and an additonal layer with the mold as a shader
Slot 2 - Cheese Mold - This is the mold as a shader, applied as a layer on the cheese material. Right now the mask used for this layer is based on noise maps, should you have a 3d scan, it's probably best to create a new mask based on AO or something else. The mask used here will only work fine with the displacement map used on the cheese since it shares a few noise maps.
Slot 3 - Cheese Mold CScatter - This is the material used on the scattered mold pieces. It uses a distance map as a mask for its opacity, with the cheese geometry used as the distance shader. This is a bit finicky and hard to get right. Lots of options here.
Slot 4 and 5 - the mighty French paper flag :D

2nd Row
Slot 1 - Color_Cheese - self explanatory
Slot 2 - Color_Mold_Green - same
Slot 3 - Color_Mold_White - in some places (done with AO) the green mold turns white, sort of a cheap hack but works OK

4th Row
Slot 1 - Cheese displacement - this is super important for the main cheese geometry. It's a composite map with numerous noise maps to drive the displacement. This map has a huge effect on the outcome of the surface imperfections and the mold since the cheese material uses 2 of the maps as mask to show the mold material.
4 of these maps use a mask, which is in...
Slot 2 - MASK_Cut_Surface - This map uses MatIDs of the main cheese geometry to introduce the cut surface. Normal Displacement is ID1 (just white so it doesn't mask anything), cut surface is ID2 - this is a stretched noise that produces the cut stains, color #1 is dark to diminish the displacement, color #2 is brighter to introduce more displacement. If you don't need the surface with the cut stains, either remove this map from the Cheese displacement map where it's used - mentioned above - or delete the map in ID2 and set its color to white.

Lot of stuff is done with AO, CoronaColorCorrect, noises, and a few maps are instanced across shaders and masks... it's probably not really easy to understand but it should be clear if you run IR and enable/disable maps, masks etc.

Make sure you don't change the cheese geometry/displacement mask while the CScatter geometry is visible during IR - it may crash!

Hope it makes sense, ask anytime if you don't see through the mess.

I still don't want to eat it but the challenge was a good one :D

2019-06-07, 22:07:25
Reply #26

John.McWaters

  • Active Users
  • **
  • Posts: 268
    • View Profile
    • JohnMcWaters.com
IMPORTANT - You'll need two 3rd party maps for the BlurBeta Plugin Pack - Electric and WaterCell - available in one zip from maxplugins.de. Search for 'BlurBeta' and it should list them, download any of them to get the entire zip file, make sure to visit the subpage that matches your Max version.

Where are you supposed to place the dlt files? I tried both the plugins folder and the stdplugs folder and 3dsMax gave me an 'failed to initialize' on startup each time.




2019-06-08, 01:58:52
Reply #27

pokoy

  • Active Users
  • **
  • Posts: 1850
    • View Profile
Ah I thought this info would be included in the zip from maxplugins.
Plugin files go into the plugins folder as usual but the blurlib file has to be put into the stdplugs folder in order for the plugins to initialize correctly. Sorry forgot to include this info.

2019-06-08, 11:58:29
Reply #28

Jonathan.b

  • Active Users
  • **
  • Posts: 9
    • View Profile
Pokoy !

Thank you so much man !

I'll try that tomorrow, sound realy good and thanks for all the explainations ! I work on 2016 but I see you already export the scene from 2015 !

Can't wait to work on it !

2019-06-08, 17:17:16
Reply #29

pokoy

  • Active Users
  • **
  • Posts: 1850
    • View Profile
You're welcome! Hope it makes sense, if not, just ask.

The flat cut surface is a quick and dirty solution, to look good from all angles it would need a blurred transition. I didn't want to make the file more complex but it could probably be easily done with data channel and/or a vertex map. But if you're going to use a scanned mesh it's probably not important in your case.