Title: Add alpha to background color of DE_Raytracer? Post by: tryptophan on September 23, 2012, 09:27:17 AM Just wondering if it would be relatively easy to add an alpha channel to the background color. The way it looks to me I would have to change the trace function to return a vec4 as well as the hitcolor and backcolor variables and maybe a few more (all with there alpha set to 1?). Just wondering if there are any suggestions before I start messing with it.
thanks Keith Title: Re: Add alpha to background color of DE_Raytracer? Post by: Syntopia on September 23, 2012, 11:41:34 AM I guess that you want to have some kind of transparent background, right?
There are some issues there. The now-default rendering in Fragmentarium uses accumulation: multiple samples are calculated for each pixel, and then the results are averaged. Fragmentarium also assigns different weights to each sample (for instance using a Gaussian filter based on distance from the center of the pixel), and in order to do this, I need to use the alpha channel to store the sum of the weights. So it is already in use. If you wanted to, you might start using one of the older raytracers such as 'DE-raytracer-v0.9.1.frag'. Here is should be possible to do something like you suggest. Notice, that I'm not even sure you are able to save your results with the alpha channel in Fragmentarium. This depends on how Qt retrieves the OpenGL framebuffer, and on the properties of the chosen file format (I think PNG is the only supported format capable of storing alpha). Title: Re: Add alpha to background color of DE_Raytracer? Post by: tryptophan on September 23, 2012, 08:47:36 PM Ah I've been using the older raytracer so far anyways but I think I came up with an alternative solution although it may make using fog and glow difficult. Basically I was thinking of applying a background color such as %100 blue or green (depending on the fractal color) and then key the background out in a video editing application in the same way a person would do for a green screen shot. I'll have to do some test though to see how well it will work with fog and glow. I do know of one keyer though that will probably be able to preserve the fog and glow called Primatte keyer by RedGiant, I'll give that a shot. cheers Keith |