Need a way to imitate Z-Offset with Eevee in Blender 2.92

Hello there!

After having no luck finding a Render Engine that has this feature explicitly, I now have to figure out a way to achieve the same effect just with Eevee and 2.92.

I need a way to selectively make objects render slightly in front of other ones in order to more easily make faces (because I reeeeeally hate face modeling)

For example, this is a character I made in 2.79:


And her face looks great from any angle, which is because the eyes and mouth are actually like this:


They’re inset in such a way that they’re positioned correctly when rendered on top, which was then done via the Z-Offset option. Eevee doesn’t have that because of the way it renders, right? Something about doing the opposite of Blender Internal’s method because it’s more ‘realistic’?

Anybody know any tricks that might work for that, while also ensuring that face parts don’t render on top of other objects that may pass between then and the camera, or the back of the character’s head?

Some kind of dynamic displacement towards the camera? (Musing: Wouldn’t work because the method I’m using for the eye texture involves projecting a texture via object mapping. Unless the mapping objects can also be affected?)

Alpha cutout projection via shader nodes?

Render layers with Z-Depth/Z-Buffer tomfoolery?

Some mechanical monstrosity with camera-facing bones and literal, physical offset?

Putting the face into a separate scene and projecting the camera view of that scene onto the face?

Compositor wizardry with colored masks per character where a face layer renders in front of the specified face mask color per character somehow?

A holdout shader somehow limited to a single object without messing with the rest of the render?

1 Like

I think you have to explain the reason for this a little more. You have a head and some other objects as mouth and eyes which are not placed a little in front of the head so you wanna have some offset ?? So why don’t you just offset those objects ? In the second image one can detect the edges of the eyes but the texture is missing (because it’s some kind of z-buffer fighting) ???

1 Like

Only thing I can think of is to add a solidify modifier or shrink wrap above surface.
Maybe geometry nodes, but I really haven’t played with that yet.

1 Like

Thanks for the reply!

The intent behind the technique I’m trying to achieve is to make the face without having to go to all the trouble of face modeling with its annoying topology and rigging (so tedious). It allows me to be far lazier more efficient

The difference between putting the face inside the head model instead of just on the surface is that it allows me to have the head and hair shaped in any way I want, while still having the eyes and mouth look good and natural at any angle, and that I can give the character any sort of expression that might expand the eyes or mouth in an extreme way without worrying about how they’ll clip into everything else.

It also allows for certain details like fancy eyelashes or the eyebrows to be done however an artist wants without having to worry about them clipping into the face or being covered by parts of the hair- it’s an excellent method for stylized characters.

If I just physically offset the face feature objects instead, they’d be sitting in front of the face, perhaps, but in order to have them be in front of the hair and any accessories that might be about, I’d have to offset them so much that they might be sitting almost a foot from the face. That might not be bad from directly in front, but from the side they’d be floating in mid-air.

Here’s another angle that might exemplify it a bit better:

Z-Offset on:

Actual model:

-You can see how having the angle of the eye independent of the face’s geometry can have a nice effect on her right eye.

-She has really long eyelash bits that would otherwise clip through the hair and be hidden by the crown

-The eyes in general would have to be offset to be above the face, and also above the crown, which would be difficult with physical offset and normal rendering

-Being able to set how much the objects render in front of objects instead of them being over everything allows for the far corner of the mouth to be ‘hidden’ by the face’s curvature, in effect, like it should be, but without having to inset the geometry in a way that might look strange from certain angles.

Thanks for the suggestions!

The issue with Shrinkwrap is that it would apply the shape of the face and override the facial features’ own shape, which is something I want to avoid.

Solidify has some benefits, but it may face the same issues I’m having with my previous idea. It would project the surface to be above the face, but it would also need some way to make said projection go towards the camera at all times- I’m attempting something like that using a crazy bone system that looks at the camera and offsets other bones that have the layers of the face attached but it’s a bit to complex for my liking.

I’m stuck in 2.92 at the moment, and Geometry Nodes are really limited there, sadly.

I appreciate the suggestions!

Hmm, so maybe rendering the *underlying" face on a different scene and compositing it over the rest??

1 Like

That was a concept I thought I’d try- do you know if it’s possible to prevent the faces from showing through other objects or characters? Maybe with a depth pass or something?

One thing I intend to try tomorrow is using the Z-Combine node in the compositor and modifying the Z value there


It’s a bit more difficult to preview than the old, built-in Z-Offset setting, since you have to use renders, but using Z-Combine and Map Value nodes in addition to a handful of View Layers allow you to set up something imitating said Z-Offset stuff!

Here’s the end result with the actual character I was attempting it with:


And here’s the Compositor node setup:

I have a base layer for the initial bit, and two “Overlay” layers, each with slightly more Offset in the Map Value Node’s settings than the previous one- this lets me have several parts that render over other parts that render over other parts and so on.

The only issue is that, even though the facial features are successfully rendered on top of the face, itself, their Freestyle lines still seem to be considered occluded and don’t render at all- I’ll probably make a new thread about that at some point.

Thanks for the help everyone!