# Glass Bump Issue - How to fix?

**URL:** <https://forums.unrealengine.com/t/glass-bump-issue-how-to-fix/132882>\
**Category:** Rendering\
**Tags:** unreal-engine\
**Created:** [November 2, 2019, 7:13am UTC](https://forums.unrealengine.com/t/glass-bump-issue-how-to-fix/132882 "2019-11-02T07:13:49Z")\
**Posts on this page:** 17\
**Page:** 2

<div class="post-metadata">

**Author:** ![BernhardRieder](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@BernhardRieder](https://forums.unrealengine.com/u/BernhardRieder)\
**Post date:** [November 10, 2019, 8:39pm UTC](https://forums.unrealengine.com/t/glass-bump-issue-how-to-fix/132882/21 "2019-11-10T20:39:00Z")

</div>

Hi Tim!

I also got that feedback in a post in the 4.24 Preview Thread.

I just did that and connected the nodes to the Specular Input.  
This is a little success story - lol;

However, I am still having issues controlling the IOR as I want to.  
As it says in the documentation, the values are clamped from 0-1.

What if I want to change the IOR above 1?  
I tried, but of course it doesn’t work because of the limitation of the clamping.  
And as you can see in the video below, the Glass Refraction does not look correct.  
The Distortion looking through the Teapot is just to intense.

I just uploaded this video to showcase that issue:

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/a/3/ea367829fa7ee62f4ade9ed6631b56f1f84ee215.jpeg "Glass Refraction controlled by Specular Input -but clamped from 0-1") ](https://www.youtube.com/watch?v=xbxskJMY4d4)

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/a/3/ea367829fa7ee62f4ade9ed6631b56f1f84ee215.jpeg "Glass Refraction controlled by Specular Input -but clamped from 0-1") ](https://www.youtube.com/watch?v=xbxskJMY4d4)

Sooo… what else do I have to do to control the Index of Refraction Value beyond 1?

**1. Project File with Glass Material**  
Would it be possible that Epic could create one Simple Glass Material, that includes all the nodes and the correct setup to demonstrate how a Glass Material should be created?

I mean, that would help everyone so much more then just referring to the documentation.  
A Project File including a simple geometry, that simple shows how the Glass Material should be setup.

**2. Glass Bump Map / Normal Map**  
On top of it it would be nice to also add an example for the Bump Map (Normal Map).  
Because once yo have a double geometry (inner and outer facing normals of polygons) I am curious how the bump map / normal map setup works.

**3. Tinted Glass**  
And yes, this is always needed in production. How to setup and control a Tinted Glass Material.

**4. Refraction**  
And what do you use the Refraction slot for if the IOR is controlled with the Specular node?

 ![refraction.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/3X/2/6/2621b7870f5d6dd5dc9ddbdced81cf6de69dd5bb.jpeg)

I guess we can clearly see that dealing with Refraction and Ray Tracing leaves a lot of open questions.  
And Artists including myself struggle a lot to even setup a simple glass material.

One simple Demo Project File from Epic showcasing all these essential Parameters dealing with Refractive Glass and using Ray Tracing.  
That would be like an early Christmas!

Thank you so much & happy pixeling!  
cheers 🙂

---

<div class="post-metadata">

**Author:** ![Suthriel](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/suthriel/32/1195643_2.png) [@Suthriel](https://forums.unrealengine.com/u/Suthriel)\
**Post date:** [November 11, 2019, 7:17pm UTC](https://forums.unrealengine.com/t/glass-bump-issue-how-to-fix/132882/22 "2019-11-11T19:17:04Z")

</div>

> [@Tim\_Hobson](#):
>
> If you want to use Refraction with Ray Tracing for translucent materials, use the Specular value to drive the refraction amount.
> 
> I’ve got an example comparison in the docs here: [https://docs.unrealengine.com/en-US/…dditionalnotes](https://docs.unrealengine.com/en-US/Engine/Rendering/RayTracing/#additionalnotes)

I have to say, i am really confused by this statement, because i was always under the impression, that specular is the amount of light, that gets reflected with (almost) the same angle, that it hits the surface, and refraction determines the angle, at which light/a ray travels trough a transparent medium. And that angle changes, if both have a different IOR (f.e air = 1.0, water = 1.33).  
So you might check that again, because it´s true, that both reflection and refraction are calculated with IOR, but they have completely different effects, and the specular should not affect refraction aka light bending (that´s what we are currently after).  
And i wonder, why should we even bother with a specular value, if we using the metallic workflow, where only metallic ( for zero = non-metallic mats like plastic, and 1 = metallic like copper and iron etc) and roughness matter, as far as i know, and specular is left untouched.

https://upload.wikimedia.org/wikipedia/commons/b/bd/Lambert2.gif

Source: [Diffuse reflection - Wikipedia](https://en.wikipedia.org/wiki/Diffuse_reflection)

https://physicsabout.com/wp-content/uploads/2018/06/reflection-and-refraction-of-light-min.png

However, after that hint about specular and IOR, i found this in one of the Blender Forums:

> [@](#):
>
> The official Blender documentation provides a method to get the “Specular” value for the PBR-material reflections if the “IOR” value is known. To get the “Specular” value from the “IOR” value, we can use the following equation:
> 
> https://b3d.interplanety.org/wp-content/upload\_content/2019/08/03-3.jpg
> 
> It is not difficult to create it with nodes
> 
> https://b3d.interplanety.org/wp-content/upload\_content/2019/08/01-7.jpg
> 
> It should be noted that this equation is valid only for dielectric materials. For its proper work you must specify real IOR values, for example:
> 
> - water IOR = 1.33
> - glass IOR = 1.50
> - diamond IOR = 2.417

[https://b3d.interplanety.org/en/get-…ions-from-ior/](https://b3d.interplanety.org/en/get-specular-reflections-from-ior/)

Also, this here might be interesting for someone:

[http://guerillarender.com/forum/viewtopic.php?id=767](http://guerillarender.com/forum/viewtopic.php?id=767)

http://i.imgur.com/7EgLI4Q.jpg

http://i.imgur.com/rR05wJE.jpg

http://i.imgur.com/WzA25GG.jpg

And this site too: [https://refractiveindex.info/](https://refractiveindex.info/)

Especially it´s Reflectance calculator ^.^

@BernhardRieder : To clear up some confusion, IOR values can be over 1, but the inputs in those materials usually just accept values from 0 to 1, representing 0% to 100%. So usually we have to calculate from the IOR or whatever else you have in mind and translate this to a zero to 100% value or gradient. That calculation is in our case usually done by the Fresnel node, which already outputs a greyscale value/gradient between black and white, zero and 100% or 0 and 1. 🙂

Edit: something really makes no sense here, raster and raytracer react differently to IOR-Refraction and specular values, check the rasterized material preview and whats happening in the RTX scene in the background. Did someone at Epic got confused abouth refraction and reflection and hooked something to the wrong input in the Raytracer? 😕

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/c/a/5ca04ad9e49742ddee57a4a20d590b4a8f3c6818.jpeg "Refraction Reflection") ](https://www.youtube.com/watch?v=_D-ZTQGSHKQ)

And i still miss the always mentioned Absorption for RTX ☹ How can we access absorption?

---

<div class="post-metadata">

**Author:** ![MostHost\_LA](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mosthost_la/32/907035_2.png) [@MostHost\_LA](https://forums.unrealengine.com/u/MostHost_LA)\
**Post date:** [November 11, 2019, 10:14pm UTC](https://forums.unrealengine.com/t/glass-bump-issue-how-to-fix/132882/23 "2019-11-11T22:14:38Z")

</div>

Hey Bernard,

Just to test the IOR and what IOR level the specular needs to use, I would suggest putting a non retraced material with the suggested refraction (above 1) right next to the ray traced one with the same geometry behind, so as to compare the 2 closely enough to make visual determinations on the values needed for specularity.

You can do all the math you want btw, add/subtract, divide.  
I would start testing with the math offered in the post above.

Additionally, it seems wierd that high negative value would affect a clamped variable. But like I illustrated it is possible.  
The clamp only stops values above or below 0 from showing by converting them to an integer.  
Visually, the mask can still be changing with parts still within the visible spectrum of 0 to 1…

---

<div class="post-metadata">

**Author:** ![BernhardRieder](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@BernhardRieder](https://forums.unrealengine.com/u/BernhardRieder)\
**Post date:** [November 12, 2019, 12:51am UTC](https://forums.unrealengine.com/t/glass-bump-issue-how-to-fix/132882/24 "2019-11-12T00:51:19Z")

</div>

as [Suthriel](https://forums.unrealengine.com/member/638227-suthriel) mentioned:  
at this point it seems to be a mess and a major bug.  
I already sent a Bug Submission Form to Epic.

The Dev Team needs to look under the hood of their code and double-check what’s going on here.

At the end it shouldn’t be such a problem to create one simple Glass Material that works with Ray Tracing.  
I am positive that Epic will look into this major bug and resolve this issue when releasing 4.24.

It’s really needed. I can’t use Unreal for Production when Glass is not working with Ray Tracing. It’s a major hit.

Thank you all so much for your contribution, tests, hints, suggestions and efforts.  
I really do appreciate it.

Thank you Epic Team for making Unreal really epic - love the tool and I am a great fan from Unreal.  
I am pretty sure your Master Developers can fix this problem.

Thank you all & happy pixeling,  
Bernhard 🙂

---

<div class="post-metadata">

**Author:** ![Suthriel](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/suthriel/32/1195643_2.png) [@Suthriel](https://forums.unrealengine.com/u/Suthriel)\
**Post date:** [November 12, 2019, 7:08am UTC](https://forums.unrealengine.com/t/glass-bump-issue-how-to-fix/132882/25 "2019-11-12T07:08:56Z")

</div>

And while Epic is checking, can they also please make sure, that at an IOR of 1.0, no light bending happens? Like nothing at all, as IOR 1 is air and a fresnel would then calculate from air (usually the already given start value) to air (which we usually replace with our wanted material like water and it´s own IOR).  
The basic fresnel function already has something installed to boost the reflection, there is the \*\*BaseReflectFrctionIn \*\*Input for that:

[https://docs.unrealengine.com/en-US/…nel/index.html](https://docs.unrealengine.com/en-US/Engine/Rendering/Materials/HowTo/Fresnel/index.html)

https://docs.unrealengine.com/Images/Engine/Rendering/Materials/HowTo/Fresnel/FN\_Fresnel\_Node.jpg

> [@](#):
>
> [TABLE]
> 
> **ExponentIn**  
> This controls the fall off of the Fresnel Effect.
> 
> **BaseReflectFrctionIn**  
> This specifies the fraction of specular reflection when the surface is viewed from straight on. Setting this to a value of 1 effectively disables Fresnel
> 
> **Normal**  
> Here you can input a Normal to affect the way the Fresnel effect is rendered. This property cannot be set by supplying either a Normal map or a Vector 3 input.

However, i wonder about that shown value of 5 as an IOR, on their doc, from which material should that be? is there a Fresnel function that uses regular IOR values?

Edit: Or is this the other way around, that BaseReflect \*\*BaseReflectFrctionIn \*\*is actually our IOR input ant that Exponent is just a booster for more reflectivity? The description soudns that way, that is disabled at an input value of 1, which would be an air to air calculation.

And for the normals and fresnel:

https://docs.unrealengine.com/Images/Engine/Rendering/Materials/HowTo/Fresnel/FN\_Change\_In\_Graph.jpg

---

<div class="post-metadata">

**Author:** ![BernhardRieder](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@BernhardRieder](https://forums.unrealengine.com/u/BernhardRieder)\
**Post date:** [November 12, 2019, 7:53pm UTC](https://forums.unrealengine.com/t/glass-bump-issue-how-to-fix/132882/26 "2019-11-12T19:53:40Z")

</div>

**EPIC Dev Team:**  
You rock, I love Unreal and it’s the best tool I’ve ever had.

Please keep rocking and thank you so much for looking into the Glass Material Problem.  
I really do appreciate that!

cheers! 🙂

---

<div class="post-metadata">

**Author:** ![Suthriel](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/suthriel/32/1195643_2.png) [@Suthriel](https://forums.unrealengine.com/u/Suthriel)\
**Post date:** [November 12, 2019, 8:25pm UTC](https://forums.unrealengine.com/t/glass-bump-issue-how-to-fix/132882/27 "2019-11-12T20:25:10Z")

</div>

…? What happened?

---

<div class="post-metadata">

**Author:** ![MostHost\_LA](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mosthost_la/32/907035_2.png) [@MostHost\_LA](https://forums.unrealengine.com/u/MostHost_LA)\
**Post date:** [November 12, 2019, 9:41pm UTC](https://forums.unrealengine.com/t/glass-bump-issue-how-to-fix/132882/28 "2019-11-12T21:41:18Z")

</div>

> [@Suthriel](#):
>
> And while Epic is checking, can they also please make sure, that at an IOR of 1.0, no light bending happens? Like nothing at all, as IOR 1 is air and a fresnel would then calculate from air (usually the already given start value) to air (which we usually replace with our wanted material like water and it´s own IOR).

Last I checked, learping any alpha from 1 to 1 returns 1.  
If your IOR is set correctly, it would completely ignore whatver the fresnel does and place a value of 1 into refraction for you.  
So, try using a scalar of 1 into refraction directly. I don’t see any changes myself with either setup. What are you seeing? If you want them to look into it, give them some screenshots showing its not working as expected…

---

<div class="post-metadata">

**Author:** ![Suthriel](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/suthriel/32/1195643_2.png) [@Suthriel](https://forums.unrealengine.com/u/Suthriel)\
**Post date:** [November 13, 2019, 6:51am UTC](https://forums.unrealengine.com/t/glass-bump-issue-how-to-fix/132882/29 "2019-11-13T06:51:42Z")

</div>

> [@MostHost\_LA](#):
>
> Last I checked, learping any alpha from 1 to 1 returns 1.  
> If your IOR is set correctly, it would completely ignore whatver the fresnel does and place a value of 1 into refraction for you.  
> So, try using a scalar of 1 into refraction directly. I don’t see any changes myself with either setup. What are you seeing? If you want them to look into it, give them some screenshots showing its not working as expected…

That lerping afterwards is the thing, that bothers me, when talking about Fresnel, IOR and refraction, because it should not be necessary. I hoped for an Fresnel function, that can be directly feeded with the wanted IOR value and calculate the correct refraction for the refraction node. The solution in the manual and this used fresnel seems to be an approximation.

---

<div class="post-metadata">

**Author:** ![MostHost\_LA](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mosthost_la/32/907035_2.png) [@MostHost\_LA](https://forums.unrealengine.com/u/MostHost_LA)\
**Post date:** [November 13, 2019, 7:37am UTC](https://forums.unrealengine.com/t/glass-bump-issue-how-to-fix/132882/30 "2019-11-13T07:37:53Z")

</div>

> [@Suthriel](#):
>
> The solution in the manual and this used fresnel seems to be an approximation.

I don’t have enough knowledge to venture a guess on that, however, I can tell you from experience that the Fresnel node comes in handy when dealing with opacities as well. Essentially, if they can power 2 things with 1 node, for one, you get the immediate performance benefit, and secondarily you also “simplify” or streamline the process while achieving the same end result - that’s if the math makes sense, obviously.

---

<div class="post-metadata">

**Author:** ![Suthriel](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/suthriel/32/1195643_2.png) [@Suthriel](https://forums.unrealengine.com/u/Suthriel)\
**Post date:** [November 13, 2019, 7:58pm UTC](https://forums.unrealengine.com/t/glass-bump-issue-how-to-fix/132882/31 "2019-11-13T19:58:59Z")

</div>

> [@MostHost\_LA](#):
>
> however, I can tell you from experience that the Fresnel node comes in handy when dealing with opacities as well. Essentially, if they can power 2 things with 1 node, for one, you get the immediate performance benefit, and secondarily you also “simplify” or streamline the process while achieving the same end result - that’s if the math makes sense, obviously.

That´s the thing, you would not lose with a different fresnel calculation 😉

A fresnel can power two things, or, in my opinion, already should power two things at the same time: Reflection, aka, how much light bounces of at which angle, and for transparent materials, transmittance, or how much light goes straight into the material… and at which angle it travels through would also be determined by the IOR. They are all linked together. Don´t you wonder, what happens with the rest of the light? That amount of light, that doesn´t get reflected? Fresnel gives you the answer for both cases. It not only tells you, how much light gets reflected at a certain angle, at the same time, it tells you, how much light gets NOT reflected, and therefore goes into the glass 🙂 Absorption, the somehow missing node, would then tell us, how much light leaves the glass, or with which intensity and color.

To break it down: If at a certain angle from 100% incoming light only 4% gets reflected, then you know, that 96% of the light go somewhere else ^.^ They go into the glass, and hopefully leave it somewhere at the other side. If you have one value, you automatically have the other too and can feed it into the other node.

http://engineering.electrical-equipment.org/wp-content/uploads/2014/06/Improving-Light-Absorption-in-Semiconductors-through-Optical-Nano-activity.jpg

(and in some cases, things like total inner reflection happens)

---

<div class="post-metadata">

**Author:** ![MostHost\_LA](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mosthost_la/32/907035_2.png) [@MostHost\_LA](https://forums.unrealengine.com/u/MostHost_LA)\
**Post date:** [November 13, 2019, 9:05pm UTC](https://forums.unrealengine.com/t/glass-bump-issue-how-to-fix/132882/32 "2019-11-13T21:05:07Z")

</div>

I suppose something like this would technically make the lense glare effects possible with ray-tracing based on the bounce from the surface… it’s quite an interesting concept.

---

<div class="post-metadata">

**Author:** ![presto423](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@presto423](https://forums.unrealengine.com/u/presto423)\
**Post date:** [November 16, 2019, 12:32am UTC](https://forums.unrealengine.com/t/glass-bump-issue-how-to-fix/132882/33 "2019-11-16T00:32:31Z")

</div>

Is it the remainder of light (minus reflection and refraction) is getting absorbed? or is it traveling so far / much and then dissipates / fades? Water is said to scatter light, supposedly implying that is why it doesn’t reach certain depths, even in rivers and lakes at various times (not night). So perhaps using a fresnel doesn’t account for the amount light fades or in a computer’s terms, ‘gets deleted across a gradient’, over distance and in mathematical relationship to objects of different material / texture. How certain are the calculations of raytracing if light is bouncing with a degrading intensity? That may be part of the problem with trying to simulate it in glass with a simple blueprint setup.

---

<div class="post-metadata">

**Author:** ![MostHost\_LA](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mosthost_la/32/907035_2.png) [@MostHost\_LA](https://forums.unrealengine.com/u/MostHost_LA)\
**Post date:** [November 16, 2019, 2:05am UTC](https://forums.unrealengine.com/t/glass-bump-issue-how-to-fix/132882/34 "2019-11-16T02:05:49Z")

</div>

Light in water is absorbed, and redistributed based on normal incidence.  
Should you want to get some pre-made math on this and more, CPU gems articles on Caustics are perfect as they deal exactly with the math of light going through water (and how to cheat at it).

A fresnel node keeps track of the camera incidence to the plane of the object.  
Ergo, the fresnel node can, on it’s own, act as the base for that calculation if the Ray was camera dependent. (That’s the opposite of tay tracing).

The engine should already be performing all the ray math on it’s own. How accurate that is, probably debatable.

The fresnel node only purpose should be to help or re-define what you see at the angle you are compared to the normal of the object you are seeing - and it does do just that for the most part.

---

<div class="post-metadata">

**Author:** ![presto423](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@presto423](https://forums.unrealengine.com/u/presto423)\
**Post date:** [November 16, 2019, 5:56pm UTC](https://forums.unrealengine.com/t/glass-bump-issue-how-to-fix/132882/35 "2019-11-16T17:56:09Z")

</div>

So fresnel is crucial to calculations that involve IOR, especially when a camera is dynamic? Well, for water, which is often in constant motion (e.g., is somewhat simulating a dynamic camera), wouldn’t a fresnel work for calculating changing IOR based on various other factors (such as GI, AO, and material specularity / WPO / metallicity)? I’m probably abstracting too much.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_baa5d1d6](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_baa5d1d6](https://forums.unrealengine.com/u/anonymous_user_baa5d1d6)\
**Post date:** [November 22, 2019, 5:54pm UTC](https://forums.unrealengine.com/t/glass-bump-issue-how-to-fix/132882/36 "2019-11-22T17:54:24Z")

</div>

Is there any update or solution for this problem from the Epic Dev Team?

Thank you! :rolleyes:

---

<div class="post-metadata">

**Author:** ![BernhardRieder](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@BernhardRieder](https://forums.unrealengine.com/u/BernhardRieder)\
**Post date:** [May 15, 2020, 5:30am UTC](https://forums.unrealengine.com/t/glass-bump-issue-how-to-fix/132882/37 "2020-05-15T05:30:33Z")

</div>

Is the refraction fixed now in 4.25?  
Does anybody know?

[Previous page](https://forums.unrealengine.com/t/glass-bump-issue-how-to-fix/132882.md?page=1)
