hi people!
i’m doing some vjing for tomorow and i would like to transform my textures (*.png) to black & white, any suggestions? i’m wandering if pixel shader could do the thing, i’m on radeon 7500 so i’m not wery it to it in practise. maybe freeframe…
well any suggestion is welcome!
did’nt try new beta yet, but when i’m finished with my egzames there will be a plenty of time for it… :( —> :)
(implication of emotions! cant get that booles algebra out of my mind…)
yeah, i´m stupid , it s late, i have to sleep now
by the way you can use color transform for change the hue , saturation…
hsl(transform)
you just have to multiply the color with the transformation color
like : col = mul(col,tCol);
more accurate is this:
col.rgb = length( col.rgb ) / sqrt(3);
think of rgb color space as a cube ranging from 0,0,0 to 1,1,1.
so it makes sense to think of a color as if it would be a vector.
if you take the length of the vector, you have something like the brightness.
however the maximal length is sqrt(1² + 1² + 1²). (pythagoras)
so you have to divide through this to get a maximum of 1 for white…
however, because red, green and blue channels have different intensities it is more complicated.
the HSL (Transform) handles all these details. Just choose “Preserve Luminance” at the “Luminance Adaption”-pin and everything is handled for you.
maybe check out the help patch for this node. it also tries to explain colors as vectors in a color cube…
to add to gregsns excellent summary: in professional video and image processing, black and white conversion is usually handled with the following formula:
it takes into account that the the primary colors have vastly different perceived brightness. a 100% blue looks much darker on the screen as a 100% green. if you just calculate the average of all color informations, colored images will look slightly wrong in black and white. the magic numbers above were determined by many experiments with human observers,
for static textures you could even try:
select FileTexture in the inspektor and then choose a suitable textureformat. for me L16 does the trick and loads avery image in black and white. not sure if L16 is available on all graficcards though.
joreg: not sure if L16 is available on all graficcards though.
it’s working for me!
but the code is not!
don’t know why, i’ve just copy and paste the code that sanch wrote…
i’m realy interested in this stuff so if someone could help me with this one i’ll be great!
could this be a problem?
Techniques:
0 - Name: TSimpleShader, Passes: 1, validated on current hardware: 0
1 - Name: TFixedFunction, Passes: 1, validated on current hardware: 1