Author Topic: Blue Cheese Shader  (Read 9038 times)

2019-06-05, 18:05:00

Jonathan.b

  • Active Users
  • **
  • Posts: 9
    • View Profile
Dear all,

Did you ever make a Blue Cheese shader like this? Do you have any idea how to do it ?
I'll scan the cheese and use it in 3dsmax




Kind regards and thank for your help
« Last Edit: 2019-06-05, 18:54:46 by Jonathan.b »

2019-06-05, 18:23:32
Reply #1

Designerman77

  • Active Users
  • **
  • Posts: 507
    • View Profile
Wow... now that's a tasty task.

Spontaneously I see the cavities as Mograph-objects (in C4D) with a strong random-effector. Cheese with a bit of volume-effect / SSS.
Or the cavities as displacement would be more simple.

The green-blue Roquefort-mold... I guess can be a super simple shader then... hmmm, except for that bi-color areas.


2019-06-05, 18:38:06
Reply #2

pokoy

  • Active Users
  • **
  • Posts: 1861
    • View Profile
Hmm is this for Max or C4d? Because the mold could be done with geometry but it would be software dependent I guess.

2019-06-05, 18:54:11
Reply #3

Jonathan.b

  • Active Users
  • **
  • Posts: 9
    • View Profile
Thanks guy's , I edited my first message to answer you an complete my demande

2019-06-05, 18:58:48
Reply #4

Designerman77

  • Active Users
  • **
  • Posts: 507
    • View Profile
Yeah, 3d scan... :)

2019-06-05, 22:53:33
Reply #5

pokoy

  • Active Users
  • **
  • Posts: 1861
    • 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.

2019-06-05, 23:36:33
Reply #6

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8834
  • Let's move this topic, shall we?
    • View Profile
    • My Models
Looks equally as digusting as original! :]
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2019-06-05, 23:41:35
Reply #7

Designerman77

  • Active Users
  • **
  • Posts: 507
    • View Profile
Pokoy, very good work!

The mold looks a bit like flakes laying on the surface and partially protruding it. I mean sticking out from it... in some areas.

You think you can get it to stick perfectly on the surfaces?

Then it´s a perfect Roquefort. A tasty cheese... :)))

Cheese shaders should become a Corona-standard... LOL


2019-06-05, 23:53:48
Reply #8

Jonathan.b

  • Active Users
  • **
  • Posts: 9
    • View Profile
Pokoy YOU ROCK IT !

That's great ! Exaclty what I'm looking for, I'll change the flake and that's it. I'll use the scan cause it's easy and I'll be sure to have the exact details I need.

Seriously ! thanks and congrats ! It's realy nice

Can't wait to enter the scene.

2019-06-05, 23:58:44
Reply #9

pokoy

  • Active Users
  • **
  • Posts: 1861
    • View Profile
I guess I'll invest another 1.5 hours tomorrow to hopefully meet the visual requirements of Roquefort lovers around the world :) sorry OP, this one will never be finished!
I do agree with romullus on the taste, however, but I pretend it's... sweet and delicious!

2019-06-06, 00:01:32
Reply #10

pokoy

  • Active Users
  • **
  • Posts: 1861
    • View Profile
Also,.what is the anticipated resolution/size? Similar to the screen size on a monitor or bigger?

2019-06-06, 11:11:52
Reply #11

Jonathan.b

  • Active Users
  • **
  • Posts: 9
    • View Profile
yes 1080p

Actualy some of the blue cheese are not so strong ! some are preaty good in fact, but other are .... strong ... even for me, a french guy.

2019-06-06, 16:06:32
Reply #12

speltospel

  • Active Users
  • **
  • Posts: 47
    • View Profile
    • closeupvisual.com
I love blue cheese. also say thanks to him for penicillin.

I would also like to see a scene Pokoy.

2019-06-06, 18:27:41
Reply #13

Juraj

  • Active Users
  • **
  • Posts: 4762
    • View Profile
    • studio website
Damn, Pokoy's version looks like someone left it one week on balcony floor under sun. Would rather eat my socks.

I think good rule is to not over-do micro-bump, when you cut/slice the cheese, that surface stays very smooth, the roughness is very microscopic. (think equivalent of gloss 80perc. not 40).
Leave that micro-disp/bump on the outside curve only.

Scan + SSS should do decent trick for rest.
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-06, 19:40:02
Reply #14

pokoy

  • Active Users
  • **
  • Posts: 1861
    • View Profile
Sorry but I did only play briefly today, unexpected work came around the corner, I thought it would be done by now but it's not.

Will keep improving the cheese! Good suggestion, Juraj, indeed a fresh cut shouldn't look that way.

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

pokoy

  • Active Users
  • **
  • Posts: 1861
    • 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: 12754
  • 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: 5462
    • 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: 1861
    • 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: 1861
    • 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: 4762
    • 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: 1861
    • 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: 1861
    • 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: 1861
    • 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.

2019-06-08, 21:55:09
Reply #30

John.McWaters

  • Active Users
  • **
  • Posts: 268
    • View Profile
    • JohnMcWaters.com
What geometry is supposed to be plugged into the distance map for the material 'L_Cheese_Complete'? It's part of the 'MASK_Cheese_Mold' that's plugged into mask 1.

2019-06-08, 22:42:27
Reply #31

pokoy

  • Active Users
  • **
  • Posts: 1861
    • View Profile
Was it empty when you opened the file?
Either way, it should be cheese_mold_distribution or something like that. This map controls the general distribution of the shader mold on the surface and currently   it masks out only a small part of the mesh so it can also be disabled without affecting the general look too much.

2019-06-09, 15:12:04
Reply #32

Jonathan.b

  • Active Users
  • **
  • Posts: 9
    • 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.
yes I rely on the scan to give me the details :)

2019-06-11, 10:19:35
Reply #33

pokoy

  • Active Users
  • **
  • Posts: 1861
    • View Profile
Back in office, adding some thoughts and 'disclaimers' I forgot to mention when posting the scene:

- based on what you want - high-res cheese hero asset or just another item on the table - your mileage will vary. I have not really checked different POVs, different lighting conditions etc so it's perfectly possible the shader will 'fall apart' when using in your scene
- I tried to use translucency but felt it was the wrong approach, SSS was faster and better to control IMO, if you think the look is off, try translucency/volumetric scattering instead
- play with the SSS depth parameter, lowering it will make the cheese more solid, probably needed depending on lighting
- reflection may be too high with too much gloss, currently the cheese looks quite 'moistly' (not sure if it's the right word here), having barely any real-world experience with this kind of cheese I can't really tell...
- with animation, you'll have to change displacement to scene units based, currently it's screen-space based
- I have used one of the photographic LUTs, using a different or no LUT at all will definitely produce a different (worse) look... you will probably have to tweak the shader then

I hope it's giving some a good starting point, or even an example of how *not* to do it if you don't like the result ;)


2019-06-12, 11:23:33
Reply #34

Achilles3000

  • Active Users
  • **
  • Posts: 6
    • View Profile
Penicillin you can get from different food.

Peaches and so on :).

Great Shader tho.