Welcome to Fractal Forums

Fractal Software => 3D Fractal Generation => Topic started by: Tglad on March 25, 2010, 12:30:26 AM




Title: Idea- an intermediate file for image tweaking
Post by: Tglad on March 25, 2010, 12:30:26 AM
When making images I find that getting the colour palette right takes a lot of trial and error, so it lead me to an idea.
Every pixel on an image can be calculated as baseColour + scale*colourAt(spectrumIndex)

So what would be really great would be if the renderer (which may take an hour on a high detail shot) saved to an intermediate file which contained 3 images, a baseColour image, a scale image and a spectrumIndex image. It would then be possible to adjust the spectrum in real-time and get the colours just right before saving to the final jpg. Anti-aliasing can be dealt with by just thinking of it as a higher res image.

You could take this idea further, for example, if you saved out the z-depth as an image then you could apply and adjust fog in real-time. You could add depth-of-field blur and tweak it in real time, you could even add a fake form of GI that puts crevices into shadow.
If you also considered the formula to be +lightScale*lightColour  and saved out an image of lightScale then you could adjust the strength and colour of the light in real time.

In fact, such image processing could be a separate application and used by any of the fractal generating programs out there, provided they create an option to export in this format.
I would write this myself, but sadly lack any decent knowledge of rendering, image formats etc  :'(


Title: Re: Idea- an intermediate file for image tweaking
Post by: reesej2 on March 25, 2010, 02:28:01 AM
I love the idea, but someone with more GUI experience than I will have to take it up.


Title: Re: Idea- an intermediate file for image tweaking
Post by: makc on March 25, 2010, 09:01:27 AM
typically you would need to generate just two images, normals and z-buffer. this way, however, you loose deep shadows; you could re-trace using z-buffer, but there you only have half of information (no knowledge of hidden surfaces shape). which is why I was digging into isosurfaces lately ;)


Title: Re: Idea- an intermediate file for image tweaking
Post by: Tglad on March 29, 2010, 03:38:30 AM
That sounds like all the more reason to not use just 2 images. It's not like the size of the intermediate file is of great importance.
If the shadow casting is done in the main package, then the secondary package would be able to apply tweaks without tracing any rays. With simple combines it could tweak in real-time-
- the colour palette
- the colour and brightness of the light(s)
- the fog settings
- depth-of-field blur settings
- screen-space ambient occlusion (http://en.wikipedia.org/wiki/Screen_Space_Ambient_Occlusion (http://en.wikipedia.org/wiki/Screen_Space_Ambient_Occlusion)) settings
- the ambient light level

Animations due to colour cycling, or a fog coming in, or a light growing (e.g. sunrise) etc would be so fast to render they could probably be real-time.


Title: Re: Idea- an intermediate file for image tweaking
Post by: makc on March 29, 2010, 10:37:43 AM
normal maps give you an ability to alter light direction. but you must not have real shadows then, or else an image would look broken.


Title: Re: Idea- an intermediate file for image tweaking
Post by: Jesse on March 29, 2010, 12:29:52 PM
Good idea, i know about at least one program that already uses it  :dink:

(in the download section)


Title: Re: Idea- an intermediate file for image tweaking
Post by: Tglad on March 29, 2010, 01:11:05 PM
Really? Mandelbulb3d does that? Awesome, I'll definitely have to try it out properly now.

I know Trafassel's Gestaltlupe program (http://github.com/trafassel/Gestaltlupe (http://github.com/trafassel/Gestaltlupe)) does something along these lines, and gets some great depth of field blur from it.


Title: Re: Idea- an intermediate file for image tweaking
Post by: Jesse on March 29, 2010, 02:18:22 PM
You just have to store all informations, the coloring and lighting are based on.
So for the color, i store only the smoothed iteration count (normalized to a 16 Bit value between minIt and maxIt) to generate along with the palette and the projection on it the new colors... also after calculation.
If the bulb is iteration count limited, then alternative the local gradient can be used for coloring.

And so with other values like normals, ambient- and hardshadow.

This is a great benefit i would miss, although other programs might have more options and higher quality.