Page 1 of 1

SSS - how to make ketchup, thick soup, etc

Posted: Sat Nov 03, 2012 7:41 pm
by druitres
Hi,

I've been trying to get a ketchup-material. Heavy scattering, deep penetration I think describes it. To be honest, I've been trying for days and days but haven't been able to get there. Finally I did it in Mental Ray, which is not what I want (no interactive preview, motion blur/DOF adding too much to rendertimes, too much hassle to set up GI w/r/t reliable flickerfree animation) (the reasons why I'm using Maxwell :))

Has anyone had success with this type of material? Ketchup, thick sauce or soup, mayonaise, yoghurt, cream, butter. My aim is absolute realism, maybe even hyperrealism as is often the case in foodphotography.

The pic is a photographed reference, it's a lumpy/grainy type of ketchup. Note especially the brighter/orange parts where the ridges in the blob are thin and the deep red where the translucency from the back comes through (at least, that's what I think it is). Anyway, help much appreciated!

Image

Re: SSS - how to make ketchup, thick soup, etc

Posted: Sat Nov 03, 2012 8:41 pm
by Half Life
Replace the transmittance color with a custom texture map for the flecks of different colors (spices or whatever) -- replace the global normal with whatever fits your geometry.

https://dl.dropbox.com/u/41250852/katchup.zip

Best,
Jason.

Re: SSS - how to make ketchup, thick soup, etc

Posted: Mon Nov 05, 2012 10:19 pm
by druitres
Thanks Jason.

I loaded & played around with & tweaked your mxm and learned a thing or two. SSS is not so easy to understand so I thought I'd share my results. Maybe it's useful, I got some interesting results along the way.

About the first row, 1-4: sss is very scale-dependant so first I tried different global scale settings to see at which scale your mxm seemed to work best when applied to a blobshape with size 1. I then set global scale back to 1 and adjusted attenuation and coefficient to compensate (if you up scale x 10, that means attenuation must also become 10 times higher, while coefficient should be 10 times lower - I don't know if this makes sense, I just found it out by accident.) This way, I know what size my blob of ketchup is supposed to be (commonly, 1 SI unit = 10 cm).

Second + third row is part random tweaking, trying out different ideas and variations on those ideas. I added short descriptions to make my reasoning clear.

Image

regards,
Jasper

Re: SSS - how to make ketchup, thick soup, etc

Posted: Mon Nov 05, 2012 11:55 pm
by Half Life
Attenuation is very much scale based (which is why it is specified in distance units), so your observations there are true -- however scattering coefficient is not really scale based, but rather it's a multiplier for the scattering color (particularly it's value component). So the brighter the scattering color the lower your can set the coefficient (and vice versa).

As an aside, I have argued elsewhere that it makes more sense to have separate elements in Maxwell materials for the scattering material(s) (the suspended particles in the dielectric medium) properties, personally I prefer the language of chemistry for materials creation and would like to specify scattering particles in "parts per million" density, rather than using a "color X coefficient =scattering" system.

I would prefer this setup:
Layer (SSS Material Name)
- BSDF (Dielectric medium material properties)
- -BSDF/ppm (Scattering material suspended inside the Dielectric properties)


Anyway, back to your tests:

The scattering color (hue/sat) matters much less than the transmittance color... in many cases a grey value will do just fine for the scattering color if you have the right transmittance color( hue/sat).

The asymmetry is basically saying which direction you want the scattered light to be pushed in -- meaning the higher the the asymmetry the more differentiated the object would look when backlit versus frontlit. The Maxwell "physical sky" system uses a very similar setting to control gas scattering effects of the sunlight (eg: appearance of big sun vs. small sun even though the sun itself never changes size). Because visually this "seems" to have the effect of modifying the scattering amount, it can helpful in a static shot to quickly force the results you want, however in an animated shot you may have issues if you push this value too far. I find this more useful in thinSSS (my grass material being a good example) and generally leave it alone in regular SSS.

For what it's worth, it is also advisable to test any SSS material in the lighting you intend to use for the finished shot -- because SSS is very prone to giving vastly different looking results depending on how it is lit.

Also, if I understand correctly you are using a 10 cm blob as your test geometry -- that is absolutely huge... I can't imagine a blob of ketchup being bigger than 3 cm before it would start to self-level/flatten out from it's own weight. Since I had no geometry to test with I used the jewel and SSS small test scenes to set the attenuation... looking at your reference it looked like a teaspoon, so maybe 1-2 cm -- but you know better what you are shooting for than me.

Best,
Jason.

Re: SSS - how to make ketchup, thick soup, etc

Posted: Tue Nov 06, 2012 1:25 am
by Mihai
Jasper, do yourself a favor and determine first of all what the actual size of that geometry should be, in real life. Only then start tweaking the materials. You'll go nuts trying to balance all these while trying to get the look you want (although 7,9 already look very nice). Model the geometry in what every size you want in XSI, determining from the beginning what each SI unit should represent in the real world. It's easy to then specify that size with the Global scale factor in the Render options. Sometimes you may need to model 1 SI unit = 1cm, for better snapping on the grid while modeling etc.

Crash course in SSS:

- start with a glass approach. If the SSS will be mainly red, start with a red tinted glass material, with low attenuation (light fades quickly), in many cases around 5mm.
- add SSS by specifying any other scattering color than black, and a coefficient other than 0. You can even start with grey to keep things simple and see what that does to your red glass.
- in most cases the scattering color is a similar tone as your transmittance color which you used to create the tinted glass. Make it a less saturated version of your transmittance color.

Re: SSS - how to make ketchup, thick soup, etc

Posted: Tue Nov 06, 2012 4:16 pm
by eric nixon
In the case of ketchup, trans should orangey (from vinegar) and scattering should be a dull red with a hint of blue (tomato particles), basically the opposite of what you had in the original material.

Heres a 20 min render,... sss is much faster when you use realistic settings.

Image

Re: SSS - how to make ketchup, thick soup, etc

Posted: Tue Nov 06, 2012 6:36 pm
by Mihai
I beg to differ :mrgreen: It consists of tomatoes which are red, so setting that as the Transmittance color is perfectly valid. Whether you switch the colors around or not depends on scattering coefficient, attenuation. You will get similar looks. Orange because of vinegar.....a bit too much reality no? :)

Re: SSS - how to make ketchup, thick soup, etc

Posted: Tue Nov 06, 2012 7:00 pm
by Half Life
Actually the tomatoes are green -- it's the food coloring that is red.

Best,
Jason.

Re: SSS - how to make ketchup, thick soup, etc

Posted: Tue Nov 06, 2012 7:12 pm
by tom

Re: SSS - how to make ketchup, thick soup, etc

Posted: Tue Nov 06, 2012 9:46 pm
by druitres
Hi Folks, thanks for all the advice.

Mihai: I think I didn't word the first part clearly, I know exactly what size my blob is and should be, that's why I did step 1-4. I need to know that setting attenuation to X mm actually means millimeters as related to my object.

The spoon is a dessertspoon rather than a teaspoon, the blob is about 4,5 cm, the ketchup is of a particularly solid variety (this is all known because it's an ad for an existing product).

Halflife: I too thought it logical to multiply attenuation by the global scale multiplier to get similar results, dividing the coeff by the same amount is just something I found out by accident. I agree it's odd, it does seem to work though. If I don't change the coefficient, it doesn't look the same, and dividing by exactly the multiplier of global scale seems to give the right value.

From what all of you say, does it follow that if the transmittance color is 100% blue and the scattering color 100% red, there will be no or negligible scattering?

Eric Nixon: In my example, the thinner ridges definitely shift towards yellow/orange and the deep parts towards red. Apart from that, your example looks very nice.

Re: SSS - how to make ketchup, thick soup, etc

Posted: Tue Nov 06, 2012 10:11 pm
by Half Life
druitres wrote: Halflife: I too thought it logical to multiply attenuation by the global scale multiplier to get similar results, dividing the coeff by the same amount is just something I found out by accident. I agree it's odd, it does seem to work though. If I don't change the coefficient, it doesn't look the same, and dividing by exactly the multiplier of global scale seems to give the right value.

From what all of you say, does it follow that if the transmittance color is 100% blue and the scattering color 100% red, there will be no or negligible scattering?
It all depends -- if the attenuation you set makes the dielectric medium clear enough, and you create heavy scattering for the red (via the coefficient), then you will see more red influence in that scenario... However, if you set the blue attenuation for a low value and have a low scattering coefficient for the red, then it will be a blue object with very little red influence.

Since we generally set the properties for the dielectric medium first and then add scattering, it's easier to set that to red and just let the scattering component be an subtle accent color. The further apart you place those colors (and the more saturated) the more likely you are to have funky noise... but there are very few right and wrongs here because SSS is very much an "eyeballing" type of material creation.

Best,
Jason.

Re: SSS - how to make ketchup, thick soup, etc

Posted: Tue Nov 06, 2012 11:39 pm
by eric nixon
Image

Image

He did say he wanted realism, and I do believe the trans should be the orange one, not the scattering, its a subtle thing.
I agree its overkill for most. and speed wise there is no difference if you use just red chips at the right intensities, but it does seem like the saturation-intensity sweetspot gets narrower.

Re: SSS - how to make ketchup, thick soup, etc

Posted: Wed Nov 07, 2012 8:03 pm
by druitres
Eric, that looks pretty sweet. Could you upload it to the MXM Gallery? Nothing there yet under the name 'ketchup' :)

Re: SSS - how to make ketchup, thick soup, etc

Posted: Wed Nov 07, 2012 9:26 pm
by eric nixon
Apart from that, your example looks very nice
Sorry, yes I uploaded the wrong render..

Here is tweaked version, 35 min render with hdri, the hue seperation between chips is almost the same about 45degrees. Its a bit oversaturated compared to reality but I think it looks more yummmy this way.

Image

Re: SSS - how to make ketchup, thick soup, etc

Posted: Tue Nov 13, 2012 8:54 pm
by feynman
Mihai wrote:7,9 already look very nice)
7 = McDonald's
8 = Heinz