Last 2 days I have been working on environment reflection mapping coordinates. Blender currently have only view-space reflection coords reflect(viewvec,viewnormal); and of course that is not nearly enough for a proper IBL (Image Based Lighting) setup.
So first I implemented world space reflection coordinates so the environment texture is world oriented.
Then I have implemented 2 most widely used mapping algorithms - "Angular" or "Sphere" mapping and "Equirectangular" or "Spherical Panorama" mapping but sometimes also called "Blinn/Newell Latitude-Longitude" mapping.
The third and most widely used one - "Cube mapping" should be already possible as a built-in function in OpenGL, but I have to figure out how to make it work in BGE.
Same mapping techniques can be applied not only on "Reflection" coordinates, but also on "Object" and "Normal" coordinates, which means that besides doing reflection and specular reflection, the environment mapping can also be used for texturing the object or doing image-based diffuse lighting.
"sphere" or "angular" map
"equirectangular" or "spherical panorama" or "Blinn/Newell latitude-longitude" map
"cube" map
All 3 of them does the same job, but with different results. I found a nice article about all three of env-map approaches explained in detail HERE
I'm going to vacation for 2 weeks, so no BGE Candies till then..
I was waiting for this for so long! Thanks!!
ReplyDeleteSparazza
check www.scratchapixel.com
ReplyDeleteit has lots of great information on this topic
Excelente post. ¡Estaba revisando constantemente este blog y estoy impresionado!
ReplyDeleteInformación muy útil, especialmente la última parte :) Me preocupo mucho por esa información.
Estuve buscando esta información en particular durante mucho tiempo. Agradecer
tú y buena suerte. 토토사이트