English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General

 
 
Thread Tools
Old 25 January 2012, 23:29   #1
Codetapper
2 contact me: email only!
 
Codetapper's Avatar
 
Join Date: May 2001
Location: Auckland / New Zealand
Posts: 3,187
Question 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?
Codetapper is offline  
Old 26 January 2012, 08:40   #2
pmc
gone
 
pmc's Avatar
 
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.
pmc is offline  
Old 26 January 2012, 10:20   #3
Leffmann
 
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.
Leffmann is offline  
 


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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 19:02.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.12147 seconds with 13 queries