Welcome, Guest. Please login or register.

Author Topic: Amiga (CD32) & voxels  (Read 2559 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16867
  • Country: gb
  • Thanked: 4 times
    • Show all replies
Re: Amiga (CD32) & voxels
« on: November 30, 2003, 06:13:26 PM »
I have often wondered about voxel engines on the amiga chipset...

Consider the onscreen representation of your average voxel. Its basically a rectangular block of solid colour. Far away voxels reduce to single pixel widths, but they are still typically vertical lines of solid colour...

So, heres a thought experiment...

Could an AGA hardware bashing engine use the blitter to render these voxels into chipram directly whilst the CPU is calculating the next one to draw?

Assume A smart implementation could calculate the visible on screen length of the voxel to avoid overdraw by the blitter.

Thoughts?
int p; // A
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16867
  • Country: gb
  • Thanked: 4 times
    • Show all replies
Re: Amiga (CD32) & voxels
« Reply #1 on: November 30, 2003, 06:22:28 PM »
Quote

Speelgoedmannetje wrote:
@Karlos
Those were exactly my thoughts too


So chip fiends, whats the pixel fill rate of the AGA blitter in 256 colour mode?
int p; // A
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16867
  • Country: gb
  • Thanked: 4 times
    • Show all replies
Re: Amiga (CD32) & voxels
« Reply #2 on: November 30, 2003, 06:31:08 PM »
Ok, assume 320x200 64 colours then.

Next up assume that only foreground voxels (anything > 1 pixel wide) are rendered witht the blitter and the rest is done by CPU, if faster...
int p; // A
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16867
  • Country: gb
  • Thanked: 4 times
    • Show all replies
Re: Amiga (CD32) & voxels
« Reply #3 on: November 30, 2003, 06:38:58 PM »
Quote

bloodline wrote:

The Blitter and CPU can't reneder at the same time since they both have to access Chip RAM to do it. when I ws playing with such things, I found it was much quicker to rend the whole thing in Fast RAM chunky, then C2P, then copy the whole thing over in one go using a movem loop.


I know they cant render at same time, I was thinking a two pass job if mixing the rendering between blitter and CPU.

It would be interesting to see if a blitter driven  voxel engine is remotely feasable, but I'm not the AGA basher to do it :-(
int p; // A
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16867
  • Country: gb
  • Thanked: 4 times
    • Show all replies
Re: Amiga (CD32) & voxels
« Reply #4 on: November 30, 2003, 06:59:15 PM »
I hear you there, but lets face it, voxels arent exactly 3D in the sense that requires a polygon rasterizer..

-edit-

In fact, you need fast 2D block fills really ;-)
int p; // A
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16867
  • Country: gb
  • Thanked: 4 times
    • Show all replies
Re: Amiga (CD32) & voxels
« Reply #5 on: November 30, 2003, 10:52:38 PM »
Quote

Speelgoedmannetje wrote:
But the pixels need to be placed 3d...


Well, you are thinking of geometry transformation. For voxel engines, such calculations are for the CPU. True 3D engines may emply hardware for this on systems that have it.

For voxels, the result of these calculations are the onscreen dimensions of the 2D 'boxes' that are drawn on screen. This is what I was musing that the AGA blitter might be able to handle ok...
int p; // A
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16867
  • Country: gb
  • Thanked: 4 times
    • Show all replies
Re: Amiga (CD32) & voxels
« Reply #6 on: November 30, 2003, 11:11:23 PM »
Well, you know, this was an old old idea from times when 68020 + fast ram was kinda high spec :lol:
int p; // A
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16867
  • Country: gb
  • Thanked: 4 times
    • Show all replies
Re: Amiga (CD32) & voxels
« Reply #7 on: November 30, 2003, 11:33:29 PM »
Oh well...I guess that puts paid to that idea :-)

You can see why I started doing graphics post RTG only :-)
int p; // A
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16867
  • Country: gb
  • Thanked: 4 times
    • Show all replies
Re: Amiga (CD32) & voxels
« Reply #8 on: November 30, 2003, 11:41:18 PM »
Dang! We ain' nuffin but a pair o' poor misguided fools!

-edit-

When I get a mo, I'm gonna hardware bash my BVision. I'm sure the Permedia2 can outfill my 68040 for say 800x600x16-bits...

Just send a mass of rectangle requrests into the FIFO...

hehe :-)
int p; // A
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16867
  • Country: gb
  • Thanked: 4 times
    • Show all replies
Re: Amiga (CD32) & voxels
« Reply #9 on: December 01, 2003, 12:19:37 AM »
Well, we are talking about block fills using the blitter. As the guys have explained, it is neither fast at doing this and at same time you'd need many thousands of them for any reasonable voxel engine...

-edit-

What a bummer...back in the day it seemed a good idea too :lol:
int p; // A
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16867
  • Country: gb
  • Thanked: 4 times
    • Show all replies
Re: Amiga (CD32) & voxels
« Reply #10 on: December 01, 2003, 01:07:02 AM »
@bloodline

It varied :-) It was mostly a learning exercise and if I was to do it again, I'd avoid many pitfalls of last time....(famous last words - I'd just find new pits to fall into :lol: ).

First up, it was running on 68040 and was using OS standard stuff + cxg +warp3d (v3 funcs only).

A lot of overhead was from having to call the warp3d v3 functions for so many small sets of polygons. v4 is far better for this (one call can render as much as you can give it).

It ran at ~15fps when you were at the default zoom level. As you zoom out or go for a shallow view (anything basically increasing the number of cells to vis test and render) it got slower. To help things along, many detail objects and stuff 'faded out' and stopped being rendered all together beyond a certian long distance zoom level.

Similarly it got faster as you zoomed in, so I added extra passes for detail textures and stuff to take advantage.

One thing it used was a transformation cache. Given the nature of the engine I anticipated that the view wouldnt change much, most of the time youd be clicking on stuff and doing stuff locally then scrolling over somewhere else and fiddling about there.

Hence, only when the view changed was all the visible stuff recalculated, then reused until another change occured (for the static world/objects only, of course). So when you werent moving around it was very steady - the water ripplinng was hypnotisingly smooth ;-)

Anyhow, it ran on my first experimental portability layer project, but that in itself was canned (as it was frankly rather poo). My new portability layer doesnt have enough functionality yet and I am too busy to work on it for now, but its much cleaner, better designed - and most importantly faster :-)

Rather than upwards port that old engine, I'd write something new instead :-)
int p; // A