I have been trying to get my head around creating a colloidal fluid material (like juice, dirty oil, milk…) in Cycles.
I have been playing with volumetrics and seem to get so far but not really anywhere.
Has anyone got a basic shader to use as a starting point. Or any tips.
White volume scatter/ absorption really does my head in.
Not sure what colloidal means, but did you try subsurface scattering?
The type of fluid I’m after is like orange juice. Colloidal fluids are basically a fluid with bits suspended in it. Like milk not ice cream (which is also a colloidal fluid but more dense so SSS would work for it). It’s sought of hard to see it in milk but it is pretty much whitish water with milk solids suspended in it. So SSS sought of doesn’t work. It sought of does if you use a Fresnel with a transparent top layer. But that’s still not right.
I’m sure it’s a volumetrics thing but I can’t get that to look right either.
Hey yardie. I’ve given it a shot since I’ve been doing a lot of tests with heavy SSS shaders recently and this is a nice training exersie. About 30 min of playing around and I get something like this. Tell me what you think and I’ll post nodes if you like it. The model is meant to be a stream of orange juice like you see in commercials all the time, the model is a bit janky but its the best i could do without running a fluid sim.
If you want to see transparency in very thin areas a more complex shader is required I think. And you’re probably right with it being more of a volumetric shader than a shader with SSS although they are similar. I’ll keep testing this is fun
Well, if I get milk with lumps of solids in it, I stay away - just saying
(Sorry, couldn’t resist).
Throwing some transparency and upping the SSS scale will probably get you closer to orange juice (see below).
interesting effect here
but can someone explain why you get like antoher sphere inside ?
a different approach might be to seperate the fluid to 2 compnents: the fluids and the particles suspended in it, where the fluid is one material, and the particles are created using a particle system. i haven’t tried implementing it, so it might be a bad idea, but if it works, it can be used to simulate many different materials (including the eye drops i took for eye infection recently :p)
Colloidal particles wouldn’t be visible as discrete particles - so a particle system would be overkill.
The largest a suspended particle can be and still be considered a colloid is 0.001mm (and they can be as small as 0.000001mm).
Colloidal fluids would be best simulated using volumetric scatter/absorption, SSS with transparency - or even a glass/translucent mix - depending on the exact type of fluid (milk, juice etc).
This is fantastic thanks heaps.
Orange juice was probably a bad choice of example. In that the pulp is also suspended, which is sort of a different problem. But it is something that also needs to be solved ( tricky bit there is the density variation as it settles to the bottom). It’s great to see other people’s approach to the same problem.
Most of the fluid in every day life is one type of colloid or another so the further we get on this the more useful it will be.
Thanks heaps for everyone’s input so far.
Thanks Moony you got where I’m coming from.
Also, good call CarlG. But they do actually call the actual milky bits milk solids. Skim milk has less than full cream. But then dodgy milk would be another cool problem.
I’m starting to think that this needs something like Bartek’s procedural wood.
I’m away from my computer till tomorrow night so I can’t play with the ideas yet.
Tomtuko I’m trying to get my head around the colour ramp multiply part, what does it do? Looks cool but I would like to understand what is going on.
you are absolutely right. just checked my chemistry reference; somehow, i was under the impression that for some types of colloids, the particles are visible.
although for the pulp, that may still work.
Yep - the pulp (assuming the OP doesn’t drink smooth orange juice) is a separate issue, although should be fairly straight forward once the liquid matrix they float within is nailed down.
The new point density feature may help with suspended pulp situations.
I think I know what you’re after.
The hard part is doing stuff like that which is non-homogenous. Perhaps texture coordinates with a vector channel separated out controlling a color ramp that influences density would work? Basically you want the denser stuff to get that look it has as it slowly separates and precipitates out of the liquid.
Sounds interesting to try and solve, I think I’ll follow up with a pastebin post if I get something interesting.
Going on the concept…
I’ve only been able to get something that looks murky rather than milky, but I think proper density mapping is needed to really get something heterogenous with clumps or distinct particles. (Seems only two or three Cycles procedural textures have an actual 3D aspect to their output.) Probably not the most optimal material but it’s still something to play around with. Like most Cycles volume mats, it takes long to render and it’s difficult to judge what is going on with a low sample count. (Tends to be too noisy.)