Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.
Posted 13 December 2011 - 07:39 PM
Posted 14 December 2011 - 05:56 AM
Posted 15 December 2011 - 02:00 AM
Posted 15 December 2011 - 12:01 PM
In physics, you would use a material's index of refraction to tell you how likely a photon is to be reflected vs refracted.
My current blog on programming, linux and stuff - http://gameprogrammerdiary.blogspot.com
Posted 15 December 2011 - 04:46 PM
Not quite. Suppose light is normal to a surface. Now, I change my viewing angle. If light has an equal probability of bouncing sideways as straight back, then the surface would appear brightest when I'm looking farthest from the normal (the surface takes up less area in my FOV. There are actually three cosine terms: the light (N dot L), the reflection, and the viewer's angle. It's just that the last two cancel.The diffuse/lambertian model assumes that when a photon strikes the material, it is equally likely to exit in any direction -- all possible directions are weighted with 1.0.
The cosine weighting isn't actually part of the diffuse model -- it's based on the fact that when illuminating a surface at a glancing angle, the area covered by the light is greater than the area covered when illuminating a surface head-on. This cosine weighting should therefore be applied to all materials.
Actually, he's sort of right. Path tracers deal in probabilities, because they only trace one photon's path. So you have to choose. The way you do this (for glass) is with the Fresnel equations.In physics, you would use a material's index of refraction to tell you how likely a photon is to be reflected vs refracted.
Wrong.
In physics the photon actually reflects with some energy and refracts with some energy (see. Fresnel equations for that).
Posted 15 December 2011 - 05:41 PM
I was under the impression that a continuous wave of light will both reflect and refract, but each individual photon (which is one quanta of light) has to do one or the other? -- In the same way that a beam-splitter will send 50% of a laser's energy down each path, but is unable to split a single photon (which must take one path or the other).In physics the photon actually reflects with some energy and refracts with some energy (see. Fresnel equations for that). As Fresnel equation is defined as: "When light moves from one medium with refractive index n1 to another medium with refractive index n2, both reflection and refraction might occur
I don't follow your logic here - shouldn't that mean that it's the same brightness from any viewing angle, and that only the light/surface angle affects it's brightness?Suppose light is normal to a surface. Now, I change my viewing angle. If light has an equal probability of bouncing sideways as straight back, then the surface would appear brightest when I'm looking farthest from the normal (the surface takes up less area in my FOV
If I am wrong about that, then at the point of impact, your photon splits in two and you've got a refracted photon and a reflected photon... so I guess you could trace both paths from the split onwards?Actually, he's sort of right. Path tracers deal in probabilities, because they only trace one photon's path. So you have to choose.
Yeah, at work we take the IOR for any material and calculate the Fresnel reflectance at 0°, and call that value our "spec mask". We then use that value in Schlick's approximation to get the fresnel term for other angles.I'm aware the Fresnel equations apply for glass. So, they work for other classes of materials too? For example, plastic sphere (classic Phong shading example) would choose whether to make a diffuse ray or a specular ray based on Fresnel equation probabilities?
Posted 16 December 2011 - 12:40 PM
Actually it can just reflect or refract when we're taking each single photon into account (but then path tracing is very insufficient model for this - as it holds color (not wavelength - it actually can hold it, but...), is instant (doesn't take speed of light into account), etc. - e.g. it is more like tracing paths of "photon groups". When we're tracing paths of photon groups - then it should behave like a photon group (that means the path should reflect and refract splitting energies (meaning colors) into 2 paths - reflected and refracted).I was under the impression that a continuous wave of light will both reflect and refract, but each individual photon (which is one quanta of light) has to do one or the other?
Actually they apply for every material, not just glass. Even F.e. silver (0.370), or steel (2.485) have index of refractions that can be used in Fresnel equations (to calculate F.e. absorbtion coefficient of the material).I'm aware the Fresnel equations apply for glass.
My current blog on programming, linux and stuff - http://gameprogrammerdiary.blogspot.com
Posted 16 December 2011 - 11:15 PM
So... it's not wrong?Wrong.
In physics the photon actually reflects with some energy and refracts with some energy
... Actually it can just reflect or refract when we're taking each single photon into account.
Assuming you're working with indivisible photons -- you haven't lost 70% of the energy, because when the photon is reflected, it does not lose 70% of it's energy. Likewise, if the photon is refracted, it does not lose 30% of it's energy either. So you put 2 * 100% energy in, and you get 2 * 100% energy out.Let's assume simple case - path goes towards reflective and refractive surface (behaving according to fresnel laws - F.e. its reflectivity = 0.3, refractivity 0.7 and (though unreal, but to keep it simple) absorbance = 0.0). We choose to reflect path - then we lost 70% of the energy of the path somewhere. Of course we could assume that next path would refract (and we "gained 70% back") and think that it would regulate the loss, but that won't work - because then we gave 2 * 100% of the energy to the system and got just 100% of the energy back.
Posted 18 December 2011 - 01:06 PM
. . . yes. That's what a diffuse surface does.I don't follow your logic here - shouldn't that mean that it's the same brightness from any viewing angle, and that only the light/surface angle affects it's brightness?Suppose light is normal to a surface. Now, I change my viewing angle. If light has an equal probability of bouncing sideways as straight back, then the surface would appear brightest when I'm looking farthest from the normal (the surface takes up less area in my FOV
Well, actually, single photons take every path between point A and B, where A and B are points of measurement. This is why single photons can interfere with themselves (e.g., double slit experiment).I was under the impression that a continuous wave of light will both reflect and refract, but each individual photon (which is one quanta of light) has to do one or the other? -- In the same way that a beam-splitter will send 50% of a laser's energy down each path, but is unable to split a single photon (which must take one path or the other).In physics the photon actually reflects with some energy and refracts with some energy (see. Fresnel equations for that). As Fresnel equation is defined as: "When light moves from one medium with refractive index n1 to another medium with refractive index n2, both reflection and refraction might occur
Either way, isn't the end result the same when working with the probability of a quanta taking each path, compared to the percent of energy that takes each path?
In real life, yes. Single photons "split". But the point of a path tracer (as opposed to a ray tracer) that you don't do that split because you'll get exponential growth of your ray tree.If I am wrong about that, then at the point of impact, your photon splits in two and you've got a refracted photon and a reflected photon... so I guess you could trace both paths from the split onwards?Actually, he's sort of right. Path tracers deal in probabilities, because they only trace one photon's path. So you have to choose.
Cool; thanks.Yeah, at work we take the IOR for any material and calculate the Fresnel reflectance at 0°, and call that value our "spec mask". We then use that value in Schlick's approximation to get the fresnel term for other angles.I'm aware the Fresnel equations apply for glass. So, they work for other classes of materials too? For example, plastic sphere (classic Phong shading example) would choose whether to make a diffuse ray or a specular ray based on Fresnel equation probabilities?
Thanks,Actually they apply for every material, not just glass. Even F.e. silver (0.370), or steel (2.485) have index of refractions that can be used in Fresnel equations (to calculate F.e. absorbtion coefficient of the material).I'm aware the Fresnel equations apply for glass.
Posted 18 December 2011 - 06:12 PM
Hahah, sorry, I miscommunicated. What I meant was that at a material level, giving all directions an equal probability does produce the same brightness from any viewing angle -- it doesn't make it brighter at glancing angles.. . . yes. That's what a diffuse surface does.
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.
GameDev.net™, the GameDev.net logo, and GDNet™ are trademarks of GameDev.net, LLC.