Hologram shader

A place for unofficial tutorials posted by MH users

Moderator: joepal

Hologram shader

Postby grinsegold » Wed Nov 29, 2017 2:05 pm

Mimicking a hologram is less trivial than you may have thought. It's features are:

-transparency
-formed out of light
-though transparent, we only want to see the front of the object. No overlapping

In a 2D environment you would just overlay a semi-transparent layer of your character, but in 3D we still have to count how many layers a light ray could possibly penetrate. We want a semi-transparent face of the Emperor, but we don't want to see the interior backface of his hoody, right?

So we have to tell the renderer that we only want to see the surface of the character that's next to us. We limit the penetration (See node 3-5):

Bildschirmfoto zu 2017-11-29_13-29-24.png
simple case


As you can see, neither the backface of the body nor the other occluded parts are visible.

It gets a bit more complicated if you have objects that contain transparency like the eyes. I think the easiest way is to separate transparency where we can, so we select the eyes, then with [numpad slash] we go into local view, enter edit mode, deselect everything with [a] once or twice, hover the mouse cursor over the inner mesh layer of both eyes and press [L] to select all linked vertices under the cursor, then we press [p] to separate the mesh from the outer eye object. Now we have High-poly and High-poly.001. The inner mesh we now can treat as every other diffuse mesh. The easiest way to handle the outer mesh is to get rid of it for good. Yes, that's cheating, and the emperor wont have shimmering eyes,but i haven't found a way to solve the issues that rise from trying to keep the eyes wet:

Bildschirmfoto zu 2017-11-29_14-13-13.png
eyes


The lashes are a special case. We can't separate transparency like we did with the eyes. We want them to be visible only if not occluded by anything and yet transparent in some areas. But since the texture contains transparency, the render engine will count a penetration there, before it may hit the skin of the head behind it. But the skin is only allowed to be visible at a direct view. Looking through a transparent plane onto it will make it invisible again.

Bildschirmfoto zu 2017-11-29_14-55-16.png
The problem with alpha maps in front of the hologram


So with our way to detect front faces and making every other ray invisible, we can't use the lashes that way, unfortunately. The easiest way seems to be to replace the lashes by strand particles. Real lashes. It's easier than it sounds.

It is likely that you get artefacts like the ones shown on the picture below:

Bildschirmfoto zu 2017-11-29_14-58-18.png
artefacts caused by too little transparency path depth


This can easily be solved by increasing the light paths settings for transparent rays in the render tab of the properties-panel:

Bildschirmfoto zu 2017-11-29_14-58-35.png
fixed


So: Avoid transparency in front of your hologram. Use real hair. Unfortunately this also means you can't use cloth with alpha channel.
If you can't avoid using alpha mapped cloth, you will have to render your character with transparent background and regular shader, and overlay that on top of your footage with your favourite video editor. This way it will also be much easier to add effects like noise or bandings.
grinsegold
 
Posts: 321
Joined: Mon Jun 15, 2015 1:34 pm

Re: Hologram shader

Postby wolgade » Wed Nov 29, 2017 3:41 pm

Nice tutorial about not so obvious stuff. Thanks.
wolgade
 
Posts: 795
Joined: Wed Jan 30, 2013 6:50 pm


Return to Tutorials

Who is online

Users browsing this forum: No registered users and 1 guest