No-part of the program has been speeded, this to make the study of it easier and more intuitive.
Although the use of a matematic coprocessor is not needed, I can't assure the working on all Amiga models, because I realized it in a great hurry ( in about 20 hours ! ).
Demo tested on : A1200 + blizzard 1220 + 68882 + 4 Mb fast ram. A4000 / EC040 / 14 Mb Ram.
3D routine is an old one, I have not been using for a long time.
Its aim is to read the coordinates X, Y, Z of the points and to rotate them according to the values of Xangle, Yangle e Zangle.
The results are then re-elaborated to be zoommed.
The routine is undoubtedly slow, as many multiplications and divisions are still used and too many memory accesses are present : data are first saved in ROTATE and then re-read and re-saved in ZOOMMA, while only a routine to calculate everything would be faster.
But it's not finished : the rotation is calculated on 3 axes, although the program need only one.
The routine of Texture Mapping is very simple to be understood, however this will be developed in the future articles,with clearer examples and a detailed explanation about how to rotate and scale down drawings.
I'm presently preparing a new 3D game with cars, based on a routine that is very similar to this one; the only difference is that the routine is speed at the best : it can rotate on axes 160x128 points at 50 frames/second on a standard A1200 with fast ram, leaving a lote of free time for other parts of the game.
Everything is calculated in Chunky-Pixel mode and successively visualized by the Copper.
The Copper visualize a picture with 256 colours and change the palette each three vertical lines; the Copper resolution depends from the visualized picture ( in my case three orizontal pixels ) and from the frequancy of modification of the palette ( in my case three vertical lines ) : therefore we'll have a 3x3 pixel resolution.
With this resolutions the screen is very "pixelly", but surely faster that with each other type of conversion.
Even if it's possible to use the Copper to have 1x1, 1x2, 1x3, 2x1, 2x2, 2x3 resolutions ( and others more ), I have used it in 3x3 mode to have a full-screen size, that is 318x228. This couldn't be possible with other Copper resolutions , because of obviouse hardware limits.
Written By: Alfredo Ornaghi e-mail: fsoft@intercom.it ITALY tel: