Forums > Jitter

how to draw in bigger depth than 8 bits… and fast?

Feb 17 2011 | 4:55 pm

In the picture bellow you see some circles drawn* with, with the transparency value in the @erase_color inside set to 0.01 (very deep transparency) : This result in an alteration of the colors and the smoothness of the transparency. This is because of the limited 8bits depth (only 256 levels) that cannot be precise enough.

What would be the best way to draw circles or lines in a bigger depth than 8 bits… and FAST ?
I suppose it can't be possible using openGL ?
Can this depend about the graphic card ?


* second patch in :


  1. deeptransparencycoloralteration.png


Feb 17 2011 | 5:50 pm

hi alexandre, cool patch.
i’m not sure what you think is 8 bits. color in opengl is handled by floating point numbers.
i’m also not sure what you think is wrong in the attached image.

you may want to look at capturing the mesh to a texture and performing some post-processing slab effects (such as a bloom effect).

Feb 17 2011 | 8:06 pm

> "color in opengl is handled by floating point numbers"

It really doesn’t look like. You mean 3 floats? R,G,B ?
I still feel like a beginner in openGL and also jitter sometimes, but i know what low resolution means :
Again, look carefully at the following patch attached bellow, where the alpha goes up and down every four seconds : Every four seconds you see few strange things while the alpha goes deeply down :
– Some kind of ‘quantization-effect’ while the alpha is always moved smoothy by the [metro 20]
– Alteration of the color
(And the ‘maximum-concentration-zone’ of the circles shouldn’t go that darker, but should keep at least some little part in light-yellow…)

This looks clearly to me like an consequence of a low depth, something like standard 24bit image…

Do you see now ‘what is wrong’ for me ?

Feb 18 2011 | 2:44 pm

>"i’m not sure what you think is 8 bits."
Like many jitter object that are only using 4-plane char matrixes ( 4 * 8 bits ) , here, through the color&alpha data input are floats, the alpha value seems also to be limited to 8 bits :
1/256 = 0,0039 :
When you put that special value for alpha, you exactly get the last darker possible value, before it suddenly gets black…
Uncheck the big toggle on the left in the patch attached bellow to see this.

Even if I’m still not sure than the color alteration (that you see better in this last patch) have also to do with an "8 bits limit" or an other kind of limit, i do want to draw transparent circles in bigger depth… How ?

Feb 18 2011 | 7:24 pm

ahh yes, you are correct, my apologies. i believe this is a consequence of the opengl pixel format used for the render buffer.

i’m not really sure there is a solution for this, however wes or jkc may have a better answer.

Feb 18 2011 | 8:23 pm

In fact, to be clear, theses ‘quantization-effects’ are appearing in two different places :

– With [ @blend_enable 1 @color 1. 1. 1. 0.0038] (…in the patches above.)
or either :
– With [ @erase_color 1. 1. 1. 0.0038] … in the patch attached bellow, where, if the depth would be more than 8 bits, then the grey trace should disappear instead of staying… (And which shouldn’t go grey in fact but decrease in dark yellows..)


Feb 19 2011 | 12:49 am

If your GPU supports floating-point textures, you can @capture into a @type float32 texture and run that through some sort of temporal filter to get the type of long trails you are looking for. I believe Wes posted a "accum" shader somewhere on the forum that mimics the erase_color with low alpha look. Using this technique should eliminate the quantization accumulation artifacts that you are seeing with the default rendering context.

-- Pasted Max Patch, click to expand. --

Mar 28 2011 | 8:10 pm

Hey, two months after,
I just forgot to thank you, Andrew, for your apparently working solution!
Even if my level in openGL make me a bit confuse with all this…
( Anyway, I was looking for a developer to help me in my project who could help me also a bit on openGL i hope : )

Viewing 8 posts - 1 through 8 (of 8 total)

Forums > Jitter