A.D.A. Amiga Demoscene Archive

  Welcome guest! Please register a new account or log in

  

  

  

Demos Amiga Demoscene Archive Forum / Coding / Blitter Texture mapping

 

Author Message
Toffeeman
Member
#1 - Posted: 11 Apr 2007 15:05
Reply Quote
I always wonderd how Oxbab got the texture mapping in the Demo Cuzco from Oxygene so fast on a stock A1200 with no fastmem.

http://ada.untergrund.net/showdemo.php?demoid=562

Anyway in the comments for that demo a guy called Krishna said the following:-

"Very nice demo, the 3D mapper does not use c2p, the mapper works for quad and writes 4 bitplanes. The 3D also use the blitter, one bitplane is used for each face so you have 6*16 colors. It never runs in the vbl on a standard amiga :)

Oxbab is a good coder but the code used for this prod is not the best code for an amiga 1200 without fast, I've seen a better mapper done by genst/Saturn, an other ex-atari coder... but the code was never seen in any prod"

Can anyone elaborate more on how that works ? There are also a number of linked demos in the comments which could use blitter texture mapping such as Voyage/Razor1911, Blittermiracle/Brainstorm and Cube-o-matic.
jar
Member
#2 - Posted: 12 Apr 2007 16:56
Reply Quote
Sim/Razors explained his routines in the german amiga magazine once. one of the described methods draws a texture-mapped trapezoid on an A500: you basically draw the outlines of the zoomed texels and then fill them via blitter. when using not many colors you get large areas of single color, which can be filled with the blitter easily. setup a blitter command list in mem to do this fast...
Kalms
Member
#3 - Posted: 12 Apr 2007 17:53
Reply Quote
In the Cuzco case, I would guess that the CPU is doing ordinary texturemapping of the sides of the cube (4 bitplanes), while the blitter is drawing a single-colour background for each side (2 bitplanes). The blitter rendering is done to ensure that each side of the cube will use a unique region of the palette.

That way, colours 16-31; 32-47; 48-63 are used by the 3 currently visible sides of the cube. When a new cube-face is rotated into view, its opposite face has recently disappeared, and its section of the palette can be recycled for the new face.
Toffeeman
Member
#4 - Posted: 13 Apr 2007 20:42
Reply Quote
@Jar:
I've heard of people using Blitter filling with bimaps before. It's heavily dependant on how the texture was orignally painted of course in terms of performance but is deffo a nice idea. I think someone mentioned they had used it for Bitmap zooming and I'm quite sure they use this technique in Brian the Lion for doing realtime mosiacs on full screen bitmaps.

@Kalms:
A bit dissapointed the Blitter didn't assist in the actual pixeling of the texture but a nice technique to get extra colours for almost free. It's a bit like using Dff106 to flip the palette just with raw blitter power instead ! It means he was able to lightsource the cube as well which worked nicley. I wonder if using c2p and smc would have yielded better results on a stock 1200 ?

 

  Please register a new account or log in to comment

  

  

  

 

A.D.A. Amiga Demoscene Archive, Version 3.0