In general, interpolation is a method used to construct a range of values from a set of data points. In digital image computing there are several methods of interpolation to improve the aspect of a transformed image but there is a problem: all of them are too slow to work via software in real time. Infact, we can see fast interpolations in 3d games only because they are performed via hardware by the graphic card (infact in the past it was very difficult to see an interpolation performed in real time). However, interpolation is usefull not only for 3d engines but they are an important part of digital image computing so there is a real need to develop a method to make it faster, expecially if you have to work with a large amount of images at the same time. For this reason I have programmed from scratch a set of optimized algorithms of interpolation that are definite as in the past… but 100 times faster! The only limitation is that they can be used only for scale trasform but numerically they are perfect and faster at the same time.
Moreover, they are useful to generate procedural images in real time, like textures, that can be used in 3d engine or in some paint softwares where you cannot have a 3d card to speed up all the stuff. In this demo you can see the high performaces of different algorithms with images of 16 bit per pixel. To make sure that my interpolation is numerically perfect, I have included also the calculus of the normal map and the bump mapping effect. With biquadratic interpolation you will obtain a still perfect scaled bump map because the normal map calculus is derivative and the biquadratic is a second order reconstruction filter.
As you can see, the speed of the algorithm is directly proportional to the size of the zoom, however it is very fast also at the minimum size of 1x. This condition is very useful if you have to resize images or to generate textures with a large amount of stretched layers, like perlin noise. CPU: Intel 2 QuadCore 2333 Mhz; RAM: 4 GB DDRII 800Mhz
Gianpaolo Ingegneri
Copyright @ 2010 – All right reserved
An application with moving objects needs to simulate the physics laws with an iterative model. The engine is typically based on a static number of frames per second but in many cases we have different fps on different machines so we need a method to obtain the same number of iterations per second of the physics engine. Usually we use a time of waiting to downscale the frame rate of the application to the physics engine one. This method it’s not so bad but in many cases it can ruin the fluidity of the objects movements. For this reason I have coded a different method that upscale the framerate of the physic engine with a series of trajectory corrections.
In this demo you can see how my method cannot influence the fluidity of the movements while the old method of downscale is way worst because the 50 fps are not syncronized via hardware.
Gianpaolo Ingegneri
Copyright @ 2010 – All right reserved
This time it was a little bit harder. As you can see in this video, my engine can generate in real time very complex textures with the maximum detail at the maximum speed possible.
Each texture is generated in real time at the frame rate showed on the top-left corner of the window (the “generation” label).
Also, the normal map and the bump mapping are calculated in real time. I used 16 bit per pixel to have more precision when I get the normal map (for more informations check my High Static Range video). Precision and speed of this engine are awesome. The final result can loop in all horizontal and vertical directions.
This demo shows a new feature about the texture generation engine implemented in my Unrelated Framework. The normalmap used by bump mapping is calculated on the base of an heightmap generated with two different methods: Low Static Range and High Static Range. The enviroment bump mapping shows the difference in quality between the two ranges.
The first range uses only 8 bits per pixel that is too low to represent a continuous surface like the sphere generated in this example and as result we can see many rings on the surface during the light effect. On the contrary, an high range of 16 bits per pixel is perfect to have a light effect on a continuous surface infact we don’t have any kind of imperfection. I could use the famous High Dynamic Range to generate the height map, but in my opinion it could be too expensive for the use of memory and the lack of speed (32 bits floating point per pixel, or 16 bits half-float has continuous conversions because cpu doesn’t support it).
This is a demo about drawing loop textures with a picture tube technique. The blit functions of my engine can write an alpha source image to a destination buffer preserving the alpha channel information. This technique is useful to design alpha textures and to make some background effect as shown in the picture.
Finally I’ve released what I hope will be the first in a long series of demonstrations about the potentiality of my Unrelated Framework. This demo shows some graphic effects to demonstrate the enormous flexibility of the blit engine. Strictly coded via software, it can run on lowend configurations with an excellent frame rate.
There is a custom font format very useful for future development on platforms where there is no freetype support or to resolve the annoying problem that you cannot use the true type hinting informations without a specific license. Moreover, my engine includes other effects like alpha blending, complex bitmap fonts and bump mapping. There is no use of graphics card because all the drawing algorithms have been reprogrammed from scratch by myself and the image buffer is displayed in fullscreen using the basic gdi functions of the operating system. However, in the architecture of my framework you can overload all the via software drawing functions with the graphic card functions of the other famous api like opengl or direct3d.