<p>See equation (16) in <a href="https://www.cs.cornell.edu/~srm/publications/EGSR07-btdf.html" rel="nofollow noreferrer">Microfacet Models for Refraction through Rough Surfaces</a> : $-(\eta_i w_i + \eta_o w_o)$ which you'll probably want to normalize. $\eta$ are the two indices of refraction and $w$ the two vectors (they use $i$ and $o$ in the paper). Also look at the left part of figure 7 on the same page to see where all the vectors are pointing.</p>

CC BY-SA 4.0
2018-07-02T17:39:13.573Z
Thank you so much! I've read that paper several times and somehow just glossed over that part.
Phil McLaughlin
CC BY-SA 4.0
2018-07-01T03:21:21.590Z
2018-07-01T03:21:21.590Z
Olivier
<p>It should be possible I think. Take the reflection equation: </p>

<p>R = 2*Dot(N,I)*N -I, where I is the incidence.</p>

<p>Make an equation for every component of the vector i.e. x,y,z</p>

<p>You now have 3 equations and 3 unknowns. However, due to Dot(N,I)*N, I don't think this system is linear. So a unique solution probably wont exist.</p>

<p>But why do you need this? If you have an intersection point at a surface, you should have the normal for that surface?</p>

<p>Hope this helps</p>

CC BY-SA 4.0
2018-06-27T21:57:37.860Z
So, yes I know the "true normal" at any point on the surface, but microfacet BRDFs work by treating every point as having many very small facets whose normals are different from the true normal, and you pick one from a probability distribution. Connecting edges in bidirectional path tracing requires being able to determine the probability of generating point x + 1 given point x, which would depend on what normal you get from the distribution. I want to be able to say "ok I need this particular normal to make this bounce happen" so I can ask the distribution how likely that is.
Phil McLaughlin
CC BY-SA 4.0
2018-06-27T22:03:43.867Z
For reflection, normalize(R + I) = N unless dot(R, I) == 0, in which case there's no collision anyway. Refraction is the tricky part.
Phil McLaughlin
CC BY-SA 4.0
2018-06-27T22:07:44.943Z
haha. of course R+I. Man I wrote some very useless complicated stuff. I can recommend this blog post which is a very good treatment of fersnel. https://seblagarde.wordpress.com/2013/04/29/memo-on-fresnel-equations/
Marc HPunkt
CC BY-SA 4.0
2018-06-27T21:53:35.727Z
2018-06-27T21:53:35.727Z
Marc HPunkt
<p>It's easy to find guides to calculating the transmitted direction of light given an incoming direction, the normal, and indexes of refraction. However, I can't find anything about determining the normal, given all the other information. That's understandable because it's a bit of an odd thing to do, but I think I need it in my bidirectional path tracer to correctly weight paths that involve a microfacet surface. Even if it turns out that I don't, at this point I'm curious. I know that it's not possible if both indexes of refraction are the same, but that's fine.</p>

<brdf><vectors><refraction>
Refraction: given an incoming and transmitted direction, can I deduce the normal?
Phil McLaughlin
# Refraction: given an incoming and transmitted direction, can I deduce the normal?

(Asked by: username_0 on 2018-06-27)

It's easy to find guides to calculating the transmitted direction of light given an incoming direction, the normal, and indexes of refraction. However, I can't find anything about determining the normal, given all the other information. That's understandable because it's a bit of an odd thing to do, but I think I need it in my bidirectional path tracer to correctly weight paths that involve a microfacet surface. Even if it turns out that I don't, at this point I'm curious. I know that it's not possible if both indexes of refraction are the same, but that's fine.

**Tags:** brdf, vectors, refraction


---

## 2 answers

### Answer by username_1 on 2018-07-01. Score: 2 | Accepted answer

See equation (16) in [Microfacet Models for Refraction through Rough Surfaces](https://www.cs.cornell.edu/~srm/publications/EGSR07-btdf.html) : $-(\eta\_i w\_i + \eta\_o w\_o)$ which you'll probably want to normalize. $\eta$ are the two indices of refraction and $w$ the two vectors (they use $i$ and $o$ in the paper). Also look at the left part of figure 7 on the same page to see where all the vectors are pointing.

> **Comments:**
> **username_0**: Thank you so much! I've read that paper several times and somehow just glossed over that part.  

---

### Answer by username_2 on 2018-06-27. Score: 0

It should be possible I think. Take the reflection equation:

R = 2\*Dot(N,I)\*N -I, where I is the incidence.

Make an equation for every component of the vector i.e. x,y,z

You now have 3 equations and 3 unknowns. However, due to Dot(N,I)\*N, I don't think this system is linear. So a unique solution probably wont exist.

But why do you need this? If you have an intersection point at a surface, you should have the normal for that surface?

Hope this helps

> **Comments:**
> **username_0**: So, yes I know the "true normal" at any point on the surface, but microfacet BRDFs work by treating every point as having many very small facets whose normals are different from the true normal, and you pick one from a probability distribution. Connecting edges in bidirectional path tracing requires being able to determine the probability of generating point x + 1 given point x, which would depend on what normal you get from the distribution. I want to be able to say "ok I need this particular normal to make this bounce happen" so I can ask the distribution how likely that is.  
> **username_0**: For reflection, normalize(R + I) = N unless dot(R, I) == 0, in which case there's no collision anyway. Refraction is the tricky part.  
> **username_2**: haha. of course R+I. Man I wrote some very useless complicated stuff. I can recommend this blog post which is a very good treatment of fersnel. https://seblagarde.wordpress.com/2013/04/29/memo-on-fresnel-equations/  

---

