I made this project for a experiment to generate illumination maps and if anyone wants to help me out with that it would be great.
It also serves as a decent example project for loading Hdri images to TextureCubes working with the mip levels and processing them into images or converting images to hdri maps back n forth for saving later or rendering them to skyboxs ect…
Figured id post it and share and maybe also get some help on the illumination map algorithm.
The project is here a single class does most of the work.
Here is a picture of the desired resulting input and output when the project is run and f2 is hit.
The troublesome algorithm is here getIrradiance(…) if anyone wants to try to give this a shot to get the best result at the lowest sampling rate.
Alter this function rebuild run hit f2 then hit f6 to see the results.
Yes that’s right, thanks for pointing that out i had forgotten.
I had some mistakes in there that i didn’t test which i fixed.
Ill probably fix it up better over time im not sure i like the way i made the functions i will probably simplify them as well as add more direct methods.
I might add cylindrical mapping and or some save file options or something in time but that’s pretty trivial.
Although i just made this for testing that single function i think it could be pretty useful.
I probably could make it into a full fledged tool, but the conversion class and shader are the important parts.