25 January 2012, 23:29 | #1 |
2 contact me: email only!
Join Date: May 2001
Location: Auckland / New Zealand
Posts: 3,188
|
Blitter filling routine used in games
I am curious to know the general method that Amiga 3D games used to draw filled polygons.
Consider a game like F1GP. It's 16 colours, so to draw a particular polygon such as a wheel in colour 15, you presumably have to use the blitter to fill 4 planes. Do the games draw each polygon onto one temporary bitmap, then fill it and blit it onto the destination bitmap (for each plane) or is there some clever method that allows you to draw all the lines for all polygons and then do the filling in one pass? I can't imagine you can do that as there might be some lines from other shapes that cross that would cause the incorrect part to be filled. So how do they work? |
26 January 2012, 08:40 | #2 |
gone
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
|
I can't say this is how it was always done but, from what I found reading about this stuff before, the key is a very fast 3d routine using integer only arithmetic with no multiplications or divisions used for rotation calculations as well as LUTs and additional tricks for drawing and filling.
Check the description under the Technology heading here: http://en.wikipedia.org/wiki/Alpha_Waves Basically, the way it was done was lateral thinking and getting clever with the implementation of the mathematics required. |
26 January 2012, 10:20 | #3 |
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
|
If it's a convex set then you can draw and fill all polygon outlines at once, but generating the mask for that set to merge it into the scene is an extra overhead of course, and it probably depends on a case basis, though the method you mention of drawing one polygon and ORing and NANDing into each bitplane is simple at least
I think the fastest method, even on an A500, for a larger complex scene is actually to do scanline rendering with the CPU, simply because you can eliminate all the in-between steps of drawing lines and copying data around. Last edited by Leffmann; 26 January 2012 at 10:26. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
CPU Filling vs. Blitter Filling Routine | victim | Coders. General | 18 | 26 January 2014 02:15 |
Filling with the blitter... | Lonewolf10 | Coders. Tutorials | 7 | 13 September 2011 14:30 |
Keyboard routine | BippyM | Coders. General | 2 | 15 July 2007 12:15 |
SetPoint routine | MidJasper | request.Other | 2 | 03 February 2007 20:10 |
Looking for some routine code | Amiga1992 | Coders. General | 4 | 17 December 2003 23:51 |
|
|