pixelgrip
(pixelgrip)
June 30, 2020, 3:17pm
1
As maybe some has seen the thread, where i am try to build a absorptive clear coat layer.I have a problem to compare the refractive angle to the angle of Total internal reflection.
The reason to me could be only these three.
the assumed dot product is no cosine.
2.the refractive angle never exceed the angle of TIR.
3.something is wrong.
with the example of a IOR medium of 1.8 the TIR result would be 33.74°.
I can not think of ,that the refractive angle never gets over that " small " angle.
here some reference of the math
the assume that dot product is cosine
https://blender.stackexchange.com/questions/68046/node-to-calculate-angle-to-camera
the simple math of TIR
In physics, total internal reflection (TIR) is the phenomenon in which waves arriving at the interface (boundary) from one medium to another (e.g., from water to air) are not refracted into the second ("external") medium, but completely reflected back into the first ("internal") medium. It occurs when the second medium has a higher wave speed (i.e., lower refractive index) than the first, and the waves are incident at a sufficiently oblique angle on the interface. For example, the water-to-air ...
The calc of the Refraction angle
all together as nodes you can see here,with a greater than node to mask the TIR if the refractive angle becomes larger as the TIR angle.
What is wrong or missing?the math seems correct to me.
edit ,here the curent calculated refractive angle, direct to the material output.
Hikmet
(Hikmet Koyuncu)
June 30, 2020, 3:27pm
2
Cycles is not give you light angle. For trhis reason, you can not calculate TIR.
pixelgrip
(pixelgrip)
June 30, 2020, 3:30pm
3
Thanks for reply.Yes i know.This calc should use the refractive angle (in the medium)that reflects back (should be the same angle) to compare with the TIR angle.
Hikmet
(Hikmet Koyuncu)
June 30, 2020, 3:37pm
4
Incoming dot Normal = Reflected Ray between Camera Ray and Surface Normal . This is not same thing Refractive angle or TIR angle.
pixelgrip
(pixelgrip)
June 30, 2020, 3:40pm
5
yes i know,we have no access to a incoming light source.however you can calculate how the shader gets calculated based on the normal/view point (dot product) as many other shaders.
Hikmet
(Hikmet Koyuncu)
June 30, 2020, 3:44pm
6
For normal situation (reflection) yes, but for refraction, no. Refraction is totally based on light vector.
If you open Cycles source code, you can see how refraction calculates. They use light vector and for TIR sets 0 automatically.
pixelgrip
(pixelgrip)
June 30, 2020, 3:55pm
7
This might be right,but as you say we have no access to the light source,but you can calculate a fresnel shader as example with its refractive calculation.
shader calculates the result based on the shader properties if the light hits the shader.
what i want to calculate here is the refractive angle based on view,not on light ray.to compare to the TIR angle thats all.
Hikmet
(Hikmet Koyuncu)
June 30, 2020, 4:15pm
8
TIR is not equal Fresnel. TIR = TOTAL REFLECTION - EXTERNAL REFLECTION.
When you mix Refraction and Glossy with Fresnel = Refraction + Glossy (Internal) + Glossy (External).
pixelgrip
(pixelgrip)
June 30, 2020, 4:18pm
9
Man i know,its Total internal reflection
Hikmet
(Hikmet Koyuncu)
June 30, 2020, 4:18pm
10
No. Total Internal Reflection = Refraction Shader’s black areas.
pixelgrip
(pixelgrip)
June 30, 2020, 4:22pm
11
Thats wrong.if the refractive ray gets reflected to a TIR than this can happen almost to infinte,see glass fibre.depends on the material ofcourse.
Hikmet
(Hikmet Koyuncu)
June 30, 2020, 4:30pm
12
Glass = Refraction + Total Internal Reflection + External Reflection.
= Refraction Shader mix Glossy Shader with Fresnel factor.
For test, use Vray Refract (Reflection = Black) and Blender Glass shaders. Vray Refraction supports TIR. Comparison two result.
pixelgrip
(pixelgrip)
June 30, 2020, 4:37pm
13
I dont want to compare render engines.thanks anyway.
Maybe @Secrop any idea whats missing for calculate refractive angle based on view. ?
Hikmet
(Hikmet Koyuncu)
June 30, 2020, 4:38pm
14
Then ask to Secrop. I say you, you not have light vector and for this reason you cannot calculate TIR.
I surpassed this problem with fake method in my VSHADE system.
pixelgrip
(pixelgrip)
June 30, 2020, 4:41pm
15
I dont want calc the TIR.I have the angle of the TIR allready.I want to calc a refractive angle based on view.
Hikmet
(Hikmet Koyuncu)
June 30, 2020, 4:42pm
16
How you calculate this when you not know light vector? Formula is clear.
pixelgrip
(pixelgrip)
June 30, 2020, 4:44pm
17
I have posted all reference math in the start post allready.
Hikmet
(Hikmet Koyuncu)
June 30, 2020, 4:45pm
18
I studied all of this formulas before, for days.
If you don’t know ANGLE, then you can not calculate.
Hikmet
(Hikmet Koyuncu)
June 30, 2020, 4:47pm
20
This angle is VIEW/CAMERA ANGLE, not LIGHT ANGLE.