0
$\begingroup$

I am trying to recreate the Glass Lights / Light Strips from Portal 2, but I'm running into difficulty with the refraction of the glass cover.

The refraction is dependent on the orientation of the plane serving as the glass cover — rotating it 180° about its surface-normal vector changes the refracted image of the light behind the glass, even though the geometry of the "light rays" should be unaffected by the change since the cover is symmetrical and the camera hasn't moved.

0° rotation 0° rotation

180° rotation 180° rotation

What is going on here?

UPDATE

Following Gordon Brinkmann's answer, I changed the normal-map-texture node Color Space from "sRGB" to "Non-Color", which did help somewhat, but the glass is still refracting asymmetrically.

0° rotation 0° rotation, Non-Color

0° rotation 0° rotation, Non-Color

My Blender 4.1 file (now with texture files included, hopefully):

$\endgroup$
0

1 Answer 1

1
$\begingroup$

To have a functional normal map you should set the Color Space of the Image Texture node to Non-Color instead of sRGB. There were no images packed in your file, but in the meantime I used a different normal map in your glass material and the different appearance between 0° and 180° was caused by the incorrect color space.

If you select the custom nodegroup "Glass-Shader" and press Tab to edit it, there is the Image Texture node with the normal map where you have to change the Color Space.

Additionally you can set the input normal space in the Normal Map node from Tangent Space to World Space. One thing I noticed when inspecting the normal map texture in Photoshop, when you rotate a duplicate by 180° and place it next to the unrotated original, they are slightly offset from each other. So even when a flat rectangular plane should look the same no matter if it is rotated 0° or 180° on th Z axis, the normals will slightly shift.

custom nodegroup

$\endgroup$
5
  • $\begingroup$ I wasn't aware of the normal map color space detail, so thank you for pointing that out! However, even after fixing that, the glass shader is still refracting differently when rotated versus when not rotated. Do you have any other thoughts on why that might be? I packed the image textures into a new Blend-Exchange link, so you should be able to see them now if I did it right. $\endgroup$
    – Lawton
    Commented Jul 18 at 12:49
  • 1
    $\begingroup$ @Lawton I've added a paragraph at the end of my answer. With your normal map now I can see a difference compared to my normal map. But when you switch the Normal Map node from Tangent Space to World Space, this should be less noticeable since the refraction is not different anymore, for slight discrepancies see the edit in my answer. $\endgroup$ Commented Jul 18 at 13:59
  • $\begingroup$ I think that "World Space" change gets it close enough to equal for my purposes. Thanks again! $\endgroup$
    – Lawton
    Commented Jul 18 at 14:16
  • $\begingroup$ @Lawton Did you see my edit? Looks like I did not save it earlier... $\endgroup$ Commented Jul 18 at 14:45
  • $\begingroup$ Aha, that accounts for the remaining difference. That's the normal map extracted from the game files, so that difference must be present in-game as well. $\endgroup$
    – Lawton
    Commented Jul 18 at 14:53

You must log in to answer this question.

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