So to improve the
Raspberry Pi HiRes Project work I needed better lighting. I love the idea of HDRi High Dynamic Range images but to create them correctly takes a lot of time and specialist equipment.
It does not help that there are various uses for HDRis and that can get people very confused. When I am talking about HDRi it is for 3D lighting in
Blender but when Googling the internets most discussions are on HDR photography and Tone-maps to produce interesting photographic results.
In my head it is very simple, a Equirectangular image describing 360° and a luminance map defining what is bright and what is not. When doing this correctly, multiple shots of the same scene are taken at different exposures and combined to create a true HDRi.
Well, it took some searching but I finally found a process to create my own HDRis with only a few bits of software, my Pixel phone and the
SD card reader from xmas 2018.
Step one; Get a 360° image.
Ignore
Google documentation that says only the Pixel2 and 3 can take Photo-Spheres.
Take a Photo-Sphere with the Pixel Blue. This requires trying to keep the camera still while twisting it to take 30 or so images of all angles.
Wait for the magic. This removes all the ugly edges but can create some weird blurring. As this is only going to be used as lighting in
Blender I made little effort to keep it perfect.
Insert SD card in to the USB Type A connector port on the reader and attach the USB Type C connector to the Pixel phone. Use
Explore to copy JPG image across.
Then eject USB and plug the USB Type A connector directly in to the
Linux PC without removing the SD card, copy the file.
Step two; Fake exposures.
I found
an old tutorial for using
qtpfsgui now called Luminance HDR. It had a quick note at the bottom about faking exposures in
GIMP
Using the Curves tool, drag the center point one grid reference diagonally down for underexposure and save it and then do the same, one grid reference diagonally left and up to create and overexposure.
Hit a small problem here
Luminance HDR wants true 16bit input files and the
Linux version of
GIMP does not have that yet! Luckily
Krita does.
Krita is super powerful but really aimed at professionals. To get the images saved.
Load them up one at a time and go to Image-> Convert Image color Space-> 16bit then save as exr/hdr (exr seems to be better when in
Blender .
Step three; Create and HDRi.
Luminance HDR is a bit overwhelming but the
tutorial said to just accept the defaults. When the exposure values are found missing enter 0 for the original, +2 for the overexposed image and -2 for the underexposure.
After a short while it creates a true HDRi. Obviously YMMV with your own images.
Finally we can set the Texture type to be Environment for the Background in
Blender and add the HDRi. When I tried the .hdr file I needed to set the power to 125 whereas the .exr just worked.