What is Picture to People ?
"Picture to People" (P2P) is a huge Computer Graphics project. It was started to create new softwares able to make 2D drawing, 3D rendering, vexel drawing, text effects, photo effects, image filtering and other complex Computer Graphics operations. It has been made from scratch, including its low level Computer Graphics libraries like Maccala. Nowadays, most final features produced for this project are released as free online tools available from its official website. This blog talks about Computer Graphics, mainly concerning Picture to People development.
Saturday, June 25, 2011
Maccala improvement: Curves optimization
These days I have been improving Maccala again. The vector based rendering engine is receiving an important optimization: an algorithm able to make curve simplification with almost zero quality lost. The main advantages this technique will bring are:
- reduced memory usage for curves/fonts representation;
- faster 2D curve drawing;
- faster set operations over polygons;
- faster 2D font rendering;
- faster 3D text rendering.
In fact, my biggest motivation to make this right now is to help to accelerate the realistic 3D text renderer I'm developing, but many vector based P2P tools will benefit from that.
Most time I use the font rendering engine to test this optimization. If the algorithm can simplify strange fonts with no visible quality loss, so I can suppose it's working correctly.
Since I'm very excited about this improvement, I show below some examples about what it can do and how it works. Each image shows the simplification of an "a" letter of a different font. At left, you can see the points representation and at right the generated drawing.
The tiny black dots are the points used to create the character; the black continuous curves regions usually are dozens or even hundreds of points very close to each other and they just happen in the non-simplified (top-left) chars. What is important here is: when a simplified "a" is drawn, it has the same looking than the non-simplified one, so the quality decreasing is negligible. The simplification has been made to be a nondestructive process.