8
$\begingroup$

I'm trying to recreate an electronic device where the screen is ON - like this:

enter image description here

I can easily achieve the off version, just a glossy sharp black material, but as regards the "on" version, displaying an image that looks like it is behind a pane of glass and "emitting" a texture, so to speak, I have no idea.

$\endgroup$
4
  • 1
    $\begingroup$ You just answered your own question with "displaying an image (...) behind a pane of glass and emitting $\endgroup$ Commented Jul 6, 2018 at 17:21
  • $\begingroup$ @DuarteFarrajotaRamos I did that - it looks too "dimensional" and not crisp like the watch screen shown. Need another option $\endgroup$
    – blue
    Commented Jul 6, 2018 at 17:26
  • 1
    $\begingroup$ You might be able to achieve most of what you want by using the "Add Shader" node with an emission shader and your current node setup, but that will not actually put the emission part behind a glass layer, it will just put it on the surface. Try that though, if you don't like the results you can always try modelling a piece of glass on top of a screen, but you might have trouble with noise unless you disable caustics. $\endgroup$
    – Tavi Kohn
    Commented Jul 6, 2018 at 17:31
  • $\begingroup$ @TaviKohn Ok thanks man - could you provide an example of your node setup - meaning where you would put the "Add Shader" along with the emissive? Whats your method of making and emissive image - Im just using mix shader and not sure thats right $\endgroup$
    – blue
    Commented Jul 6, 2018 at 17:32

3 Answers 3

12
$\begingroup$

This basic kind of node setup should work okay for you. The most important nodes are the ones I highlighted: the Emission, Principled, and Add Shader nodes. For your setup, use your existing glossy black material instead of the principled shader node. Screen Material Setup

Here is another setup where I've instead UV unwrapped the cube and used an image with a transparent background. The image texture node's extension mode is set to "Clip" instead of the default "Repeat" so the image is only displayed once, instead of repeating all over the cube. Transparent image based setup

$\endgroup$
2
  • $\begingroup$ Is there any way to do this with a Mix Shader? $\endgroup$ Commented Sep 11, 2018 at 17:21
  • $\begingroup$ Sure, you could probably put a mix shader in place of the final add shader. The point of the add shader though, is to have the glass reflections and screen lighting additively mix together. In other words, the reflections are just as strong as on a glass material by itself and the emission is just as strong as on a plain emission material. If you want to mix this material with another, try adding a mix node after the add node, or just play around with it for a bit. If you replace the add node with a mix node and play with the slider you should be able to see the difference between mix and add. $\endgroup$
    – Tavi Kohn
    Commented Sep 14, 2018 at 0:52
12
+150
$\begingroup$

Here's an alternative method that deals with :

  1. Parallax (where the emissive part of the screen is behind the 'glass' surface
  2. Surface reflections
  3. Pixellation of the image
  4. Scattering of the image into the 'glass'
  5. Dimming due to viewing angle
  6. Surface scratches

example

First to the parallax. This is the effect where the screen image moves in relation to the surface due to the viewing angle - due to being set behind the actual surface. This could be modelled by placing an additional (glass) surface in front of the 'emissive' surface but can actually be faked using vector maths similar to https://blender.stackexchange.com/a/84618/29586.

parallax nodes

The Cross Product is used to generate a vector in the required direction of displacement of the image and the Dot Product is used to calculate the amount of displacement to apply. Adjusting the Emitter Depth value node controls the effective depth below the surface.

Next for the surface reflections - this is easy to achieve with a basic Fresnel arrangement to mix a Glossy shader with a small amount of roughness to slightly spread the reflections.

reflections

To make the image appear pixellated we can use the Modulo function to convert the input coordinates into discrete "steps". Some additional maths can detect when the point in the texture is close to the edge of one of these 'pixels' and 'black' it out so as to produce a dark border around each pixel.

pixellate pixellated image

The bright image projected onto the back of the glass may produce some scattering or 'glow' below the surface, spread out by adding some Noise to displace the coordinates.

scattering

This uses the same 'pixellation' as for the main image (without the black border as it's an unnecessary complication since the result will be blurred anyway). The 'blurred' image will be in the 'correct' place on the screen rather than being offset to simulate the light being projected towards the screen causing a glow or scatter due to its high 'straight-on' intensity. Keep the intensity quite low so the effect is quite subtle.

Many screen technologies have limitations in the viewing angle where the image will become distorted or fade out at shallow angles. More Vector Maths can be used to achieve this by using the Dot Product to compare the Normal with the Incoming ray and using a Color Ramp to allow this to be tuned to affect the visibility as the angle changes.

viewing angle

Finally, we can add some surface scratches which helps to bring out the parallax effect (as the emissive image will move in relation to the scratches). The surface scratches control the mixing in of a Glossy shader with a high roughness. This will look light when illuminated and will also block the emission to look darker the the scratches are obscuring the content on the screen (just like real scratches).

Bringing this all together produces the following material :

final material

The cyan nodes indicate parameters you can adjust - eg, the 'depth' below the surface of the emissive screen, the pixellation factor, the brightness of the emission and the glow. Also, you can adjust the color ramp to change the rate and angle of the falloff due to viewing angle.

And the final result :

animated

Blend file included : (you'll need to add your own HDR for the environment)


Here's an example of a phone screen (screengrab from an iPhone) with a Bevel added to the edges of the mesh (which actually interacts with the parallax quite well when the image is close to the edge). (click to see at full resolution)

iphone hi-res

$\endgroup$
3
  • 1
    $\begingroup$ Thank you Rich! That's a very detailed one! I believe that the Blender Logo on a black/transparent layout is not the best example to showcase the shader though. Could you make a version with a generic phone screenshot? $\endgroup$
    – Nicola Sap
    Commented Sep 15, 2018 at 7:49
  • 1
    $\begingroup$ Good idea @NicolaSap. I've included an example with an image of a phone screen and a bevelled edge. $\endgroup$ Commented Sep 15, 2018 at 13:22
  • 1
    $\begingroup$ Thank you Rich, it looks even more convincing now! $\endgroup$
    – Nicola Sap
    Commented Sep 15, 2018 at 13:32
5
$\begingroup$

I would go with a separately modelled glass. Maybe it's just a taste question. At least there is this small thickness that indicates there's something on top of the screen object.

enter image description here

Glass material: enter image description here

Inner object emission material: enter image description here

.blend

$\endgroup$
2
  • $\begingroup$ Thank you for your answer! What's your suggested geometry? How far back the emissive element should be? I'll need to try your and Tavi's node setup on something that actually has the shape of a phone screen to see what convinces me more $\endgroup$
    – Nicola Sap
    Commented Sep 14, 2018 at 8:59
  • $\begingroup$ It's a nice result. I agree with @NicolaSap, could you show us the geometry, and maybe a trace of emission on to another surface? $\endgroup$
    – Robin Betts
    Commented Sep 15, 2018 at 7:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .