|

A bit of a history lesson:
Back in the second half of the first decade of the 2000th I was asked if I could expand sIBLedit to extract the light sources from a hdri. Since this was a tough time for me, I only quick less than basic implementation of it, Since there was no feedback after the initial request I didn't invested further time, and in the last few versions I removed it completely.
A few months ago I ran into this old article by accident, which reminded my again about this task.:
https://renderwonk.com/publications/s2010-shading-course/snow/sigg2010_physhadcourse_ILM.pdf
(It also reminded how experimental in nature and willing to share publicly everyone was at that time...which I always enjoyed.)
Now for me it was never about just exporting the maps, but also what happens to the hdri when you export them. Would you discard it completely and loose some overalls lighting? Would you keep it, and have some fighting between the lights and the hdri map ? What if you change lighting and color temperature of the individual lights (the main reason you want this) Does those cutout plates still look good in reflection ? So even back then, to work efficiently, it was clear that it needs an automated alpha masking of those plates, and a "infill" on the original map.
And more important: Does it have any real use for me ? I can't answer this without trying. One thing which surprised me, is that there seem no free tool out there to do this/mimicking the workflow....yes you can map the envmap on a sphere and knife out the individual lights, or rebuild the scene with rudimentary geometry, but its quite time consuming. So it was either create it, to see if it is of any use, or keep these question unanswered. Since this tool could be also be a solid base for further hdri experiments (either this or a copy of this program), even if it does not work out, the time certainly isn't lost.
So after I revamped the sIBL architecture, and the fusion of the lightsmith definitions in it, and some other programming techniques I learned alongside...I was confident that I can finally pull that somewhat off. Or at least to a level I can use it. Currently its not really a "sIBL" program. At the moment it does not load or save sIBLs,since I'm still in the phase to actually evaluate if this program brings some actual workflow improvements for _me_ to invest more time into it. So if you want to contact me with ideas to expand the functionality, (and no I don't want to rebuild hdr light studio) feel free to mail me. (see contact page for mail address).
The program also uses a new internal image conversion technique and should finally fix the clipping problem when there is an alpha channel in a float image. I will update all sIBL applications in the future to reflect that.
PLEASE BE AWARE THAT REMOVING THE PLATE FROM THE IMAGE NEEDS A LOT OF TIME THE PROGRAM ISN'T CRASHING.
THIS IS HACKED TOGETHER IN LESS THAN 7 DAYS SO PLEASE BE AWARE THAT THERE MIGHT BE ERRORS (THE OPENGL VIEW ESPECIALLY) CURRENTLY GENERATE ALPHA DOES NOT PREMULTIPLY THE ALPHA. THIS IS A DEBUG THINGY AND WILL BECOME AN OPTION
Some tips:
Calculate Alpha sometimes work better if there is more background information. I might add an additional crop to alpha function which crops the image and the plate size AFTER the calculation is done. But this depends how useful the tool actual is. You don’t have to go the path: Calculate Alpha > Env Remove plate. You can also remove the complete plate first and THEN calculate the alpha.
TODO
The actual sIBL implementation: - Browse sIBlights and add them to the light list - Replace lights by sIBLlights. - Save and Load sIBLs - Refinement and bug fixes. The openGL view still throws some random errors and there are mem leaks - Export additional lights with the plates. (Sorry AFAIK fbx does not support textured area lights)
YOU MIGHT HAVE TO DOWNLOAD THE VC_REDIST FROM MICROSOFT ON NEWER SYSTEMS
 Initial Release
 to drop a comment
So here is a short quickly put together manual:
Left Side: Image bar
Here you can select the hdri Environment Image, Hit the plus sign and add a file. To delete it hit the minus button. Currently you have to select the environment to display it in main view.
Main view
Here you can position your lights. To scale it hit the edge from inside of the light. To position the light hit the center of the light and drag it. if the light is to small hold the ALT button and click near the light (uses a different picking method). You can delete the selected light by hitting the delete button. Still some work to do on this one.
Below the main view you can adjust the gamma and multiply of the environment display.
Right side: The light list
Here you can add lights. browse light does currently nothing Each light has
- An icon preview of the plate - A minus button to delete the light - A capture button to transfer the texture of the environment to the plate Important: It ill display as linear in OpenGLview on purpose - A Delete Button to delete the capture - A generate Alpha to generate a alpha mask of the texture - A delete Alpha Button - A remove Background Button which fills the underlying Env Sphere with a very rudimentary infill method. If no alpha is generated the whole plate gets infilled.
Below it it has controls to position the plate
- A distance which defines the distance of the light from the world origin - X/Y scale to scale the plate - PosX / PosY to position the plate on the environment Map
Below the main view: The global functions wich affects all lights
Auto Lights Will generate the Lights and position them automatically. Currently does not work with low dynamic images. Fetch All Captures all Plate images from the environment image It ill display them as linear in OpenGLview on purpose to provide a visual clue wich images are extracted Calculate Alpha Tries to get the alpha from the luminance for
Env Remove Plate Removes All Plate images from the Environment
Export
The export type dropdown currently it exports as fbx in 4 different flavors
fbx - blender fbx - houdini fbx - lw2015 fbx - out
The first three assures that the materials are correctly assigned and that those meshes are aligned correctly to the standard method of that program to bring in an hdri environment:
Blender - Add a environment map Houdini. Add a Environment Light LightWave - Add a textured environment (and yes you still need to switch horizontal by -1)
Currently only of all three blender is the only one whichassigns the transparency correctly
Export Dir T he export directory where the fbx is exported
Filename Filename for the fbx and the exported textures. will be filled automatically if you have a hdri selected in the main view. File extension will be added automatically.
Texture Dir the directory those textures are exported. Can be relative or absolute
Export Environment Map also exports the environment map if selected. Does it automatically if the Export Environment Sphere is active.
Export Environment Sphere Additionally exports an environment sphere which encompasses the plates. If selected it will also export the environment map
Use absolute paths Overrides the relative path of the texture dir
|