Volume Absorption not working as in Tutorial

So im watching this Blender Guru Tutorial: https://youtu.be/fdWUjEMzDhg?t=406

And he does the Volume Absorption thing for the coffee.

Not the density works in my model, but i cant change the color like he did. Mine just stays white/clear and doesnt pick up the yellow im trying to get

In fact, when i drop the roughness to 0, it turns fully black https://i.postimg.cc/hPngvx2z/Desktop-Screenshot-2022-04-07-12-01-38-86.png

help?

Im in Blender 3.0.1

Are you sure you are showing the correct images - all I see in your links is what looks like a chrome cylinder.

Volume absorption only works if you either have no surface shader, or a transparent surface shader (such as glass, transparent, refraction etc).

Try disconnecting the principled shader and see if that helps.

i just hid the other cups and everything to give a better look.

now it does this: https://i.postimg.cc/BZRjBDDQ/Desktop-Screenshot-2022-04-07-12-21-56-11.png

What scale is your coffee/cup - the absorption density depends on the scale.

I have applied absorption shader to the default cube with a density of 300 - and it turned pure black. I suspect 300 is far too high for the scale of your objects. This image shows the difference between absorption = 300 and absorption = 10 on the default cube.

Try turning down the density to 1 and see what happens, then increase it gradually. Unless you have exactly the same object scale as Blender Guru did - you won’t be able to replicate his absorption values.

Ya it’s similar. My coffe cup is 9.5 cm in depth and the coffee part is even smaller.

But I dont think i applied the scale…

Are you sure you are following the tutorial correctly.

Your last image shows you have used the volume scatter node - not volume absorption. These two nodes behave very differently.

try as i might, it just inst working.

Dont know - your setup seems to work for me.

Can you upload your blend file

ok. is this what i should get?

i have some very high key and fill and rim lights going on…

Yep that looks right. Maybe there is something wrong with the coffee object you are trying to apply the material to.

Have you checked things like overlapping faces, normal direction etc? Try applying the subsurf modifier, or try a voxel remesh.

ok i did something. i added a circle and applied the same material as the cube on that. the density has to be made 0.5 but it looks exactly like the cube.

now the problem is, when i lower it in the mug, it becomes this:

it turns black. and i have no idea why

You’ll get weird results if you apply volumetric materials to 2 dimensional objects (like a circle).

Try the same experiment on a cylinder object.

Also - check your render settings - make sure you have enough bounces.

It should not be a problem to use a volumetric material for a bidimensional object. I always use volume absorption on pools and ponds and never had any problems. I believe the problem must be in the cup instead of the shader or the plane.

As you can see here, I used a bidimensional object as my coffee and I have no problems with volume absorption.

Are you sure you don’t have any invisible geometry in your cup model which could mess up the coffee shader as you put the geometry inside the cup?

It is though - you can get weird results.

In both of the cases below, the material on the cube and plane are identical.

The rear two objects have volume scatter and the front two have volume absorption.

In both examples - the material looks different based on whether it’s applied to a solid 3d object or a 2d plane. The scatter shader darkens incorrectly at the edges of the plane - whereas in the cube this doesn’t happen. The volume absorption looks totally wrong when applied to the plane.

I tend to work on the principle that for materials involving volumes (glass, liquids, smoke etc), it’s best if the model represents the real world object as far as practically possible.

In some circumstances the material may give you a reasonable result if you apply it to a physically implausible object - but in others, it may not give the desired result.

It’s just one more variable you don’t need.

It darkens the edges because the rays there are spread around until they find a surface to bounce. If you think a bit about you would understand. That does not happen if the object is inside a hole.

You cannot expect to use bidimensional objects to achieve the same results as tridimensional ones in those conditions. It will not work for obvious reasons.

This is a project I made using a plane with volume absorption, Can you see any problem there?

Like I said - it’ll work in some situations, but it’s just one more variable to account for.

Look at the number of threads where people have tried to use the glass shader on 2D objects and had problems - where the simple answer was to simply add thickness to their 2d object.

If you get into the habit of modelling based on physical reality and not on impossible geometry (e.g. model objects solidly - rather than just having single sided planes which are physically impossible) - you can avoid many of the pitfalls.

More experienced people may be able to take shortcuts and get it to work if they understand the interactions between geometry and materials - but for less experienced people it can cause issues.

Single sided 2d objects do not exist in the real world - if you follow this basic principle, you’ll avoid many pitfalls.

Ok… so should I try a cylinder to make the coffee shader part?

@Calandro @moony

If you have geometry to bounce the rays properly behind the bidimensional object you would have no problems, cause the shader will count the depth until the ray reaches another surface. I did not say you can use bidimensional objects in any other case. Of course, you are going to have problems in other situations as the depth could be infinite if you don’t have any surface to calculate it.

It doesn’t matter how many threads you are going to find talking about “the issue” if you understand the nature of the process it only shows that many people struggle to understand how the shader works. It doesn’t mean that it doesn’t work properly.