This has been pretty difficult. This is the third branch I've been working on, so #48 has a lot of commits listed that won't be merged in. I ran into several design mistakes and issues that convinced me to just redesign the system.
Here's what I've landed on:
the ImageMap interface represents a general filter that can be applied to an image
tone maps and other filters like bloom can implement ImageMap and take in parameters in their constructors
the SceneData object stores a list of image maps to apply to the image before writing it to the output file
main() is responsible for applying these image maps to the Image before writing it
Image knows nothing about image maps
If there are no image maps specified in the scene file, then the program defaults to just doing a basic [0;1] clamp, which makes sense to me. A user can get around this with the im_nop command, which adds an image map that doesn't do anything.
There are two new commands: im_nop and im_basic_clamp. In the future, we can add more interesting commands pretty easily:
create a new class that implements ImageMap
in the parser, create an instance of the class with the needed parameters, and add it to sdata.image_maps
Closes #48.
This has been pretty difficult. This is the third branch I've been working on, so #48 has a lot of commits listed that won't be merged in. I ran into several design mistakes and issues that convinced me to just redesign the system.
Here's what I've landed on:
ImageMap
interface represents a general filter that can be applied to an imageImageMap
and take in parameters in their constructorsSceneData
object stores a list of image maps to apply to the image before writing it to the output filemain()
is responsible for applying these image maps to theImage
before writing itImage
knows nothing about image maps[0;1]
clamp, which makes sense to me. A user can get around this with theim_nop
command, which adds an image map that doesn't do anything.There are two new commands:
im_nop
andim_basic_clamp
. In the future, we can add more interesting commands pretty easily:ImageMap
sdata.image_maps