TextPlugin TextureOut with Transparency

i’m fiddeling with a text to texture generator with the text plugin. saving the text on a transparent background isn’t tricky. renderer background color set alpha to 0 and dx9texure to some format that manages alpha too…write and done.

problem: the color of the background (renderer) is mixed with the antialaising creating a border around the letters.

question: is the textplugin creating a texture with true transparent antialaising inside the plugin and can this texture be send to an output ?

hmm not sure can help you much… use text3d bit trickier to program, but once it works, id does the job…

https://vvvv.org/sites/default/files/imagecache/large/images/texttest-DirectX Renderer_2010.12.15-13.02.25.png

here is a screenshot of the problem and the texture i generated with the textplugin…

what if you set the renderers color not only to alpha, but also to white?

yea, think joreg is right, had same when were trying out mine new softedge system, forgot to set render color back to black, so had white stripes on every softedge ;] You can also try to write antialising for alpha in the shader, we had nice example of edgedetection on shaders workshop, same can be used for smoothing edges!

if the background color is set to white then yes, the outline becomes white but the letters become thicker too…thicker than they should be…

in the picture above you see a green pixel outline. thats the generated texure. on top of it i put the same letter in white with the textplugin for comparison.

this one pixel thick outline isn’t a problem with big text-textures but once you have pixel-fonts you do notice that the letters are thicker than they supposed to be. you get me ?

better example at smaller size:

first picture shows the textplugin in renderer…all is good
second picture shows the textplugin plus the generated texture (white renderer background) tinted in green to visualize the difference.
third picture shows just the generated texture, notice the letter looks much thicker than coming out of the textplugin
https://vvvv.org/sites/default/files/imagecache/large/images/textrendertest-DirectX Renderer_2010.12.15-16.39.06.png
https://vvvv.org/sites/default/files/imagecache/large/images/textrendertest-DirectX Renderer_2010.12.15-16.39.18.png
https://vvvv.org/sites/default/files/imagecache/large/images/textrendertest-DirectX Renderer_2010.12.15-16.39.27.png

edit:
i just turned off all the texture interpolation with the filter node revealing that the letter looks actually somewhat different in the texture…
https://vvvv.org/sites/default/files/imagecache/large/images/textrendertest-DirectX Renderer_2010.12.15-16.50.41.png

it actually now looks totally different, comparing the texure with the output of textplugin it looks like some antialaising pixels are not saved in the texture. mmmm…

i dunno, maybe i’m hunting something not worth hunting. there is definetely a difference in antialaising between rendererd text and the textplugin. its not visible using large letters but with small fontsizes. but even than its hard to see.

the cause can be texture interpolation, position of letter in renderer and so on…

i don’t care anymore. i have enough examples of different sizes to say it doesnt matter for me. thanks for your answers.

I am sure I’ve seen discussions about this before, should be able to find information about it in some other places where graphics programming is discussed like http://www.gamedev.net forums.