More questions, always new questions, ah well hopefully ye don't mind helping me when I get these ideas into my head.

Anyway, I know I asked about polygon fill routines before and got some great replies, but the routine I eventually wrote was slow.

But now I realise that I don't need a poly fill algo, just a triangle one. So does anyone have links or know of a fast trianlge fill algo.

Its for a 3d engine so I'll need to be able to do Z buffer testing as well, so I need to figure out some way of interpolating the z depths across the triangle, I will know the depths of the vertices. I'm sure there must be some great algos out there for just this.

Indeed while I'm here I may as well ask, does anyone know of a site which will explain fast graphics routines to me?

I know the maths and I'm looking to write a small engine only for displaying a couple of objects and which will ideally work on older machines. I'm not looking for anything even half as flashy as Quake 1 so it can't be an impossible task.
Posted on 2001-10-08 05:29:14 by Eóin
Why don't you just use OpenGL, it will do all the work for you.
Posted on 2001-10-08 08:37:35 by Spider
my favorite link for algorithms:

http://www.efg2.com/Lab/Library/Delphi/Graphics/Math.htm

I'm shure you can found some fast triangle fill samples.

and about OpenGL ("holy war" section):

is it always available on all Windows versions without install?
will each hardware support it?

If not - just kick it!
Posted on 2001-10-08 08:54:23 by beaster
Direct X isn't available on all windows platforms either without installing it.
Posted on 2001-10-08 09:23:38 by Hiroshimator
iirc, it's not available on the first release of win95 (but you can get
support by downloading stuff).

It will be supported on all hardware, but in software mode (ie, no
hardware acceleration), it will be dog slow. However, most people
have 3d accelerators today, and if you're making a game, there's
no good reason to NOT use hardware acceleration.

However, coding a software 3d engine will teach you a good deal
of things, should be fun, and... well... why not? =). I haven't done
it as I suck very hard at math, and lack the spare time :(.
:stupid:
Posted on 2001-10-08 09:33:33 by f0dder
DX isn't available without installing it? Hmm, I thought the newer
windows versions came with some version of DX preinstalled...
Posted on 2001-10-08 09:34:28 by f0dder
not on the first 95 and not on NT prior to service pack 5 :)
so not without installing
Posted on 2001-10-08 09:38:37 by Hiroshimator
Why not OGL? Well I can't get it to run at more than 5 fps on my laptop. This could well be a driver problem but I'm at a loss.

As for DX, well I probably will go for it, its safe enough to take it as a minium these days. At least I hope so. :(

Thanks for the link beaster, but I don't see a triagle fill algo there, am I just missing it.

And Hiro, sorry for posting in the wrong section.
Posted on 2001-10-08 13:00:52 by Eóin
Hm, most laptops I know of haven't got fancy 3d acceleration...
it might have something with a few functions, like S3 ViRGE had.
Many of the so-so 3d "accelerators" have very shoddy OGL implementations,
if any at all. If you use any nonsupported function in OGL that
requires the engine to take a software path, your fps will usually
drop to 1 or below :P.

I'd say DX is a safe minimum these days, everybody who wants
games has it installed. Same with OGL, really. Thing to keep in mind,
though, is that neither D3D nor OGL is well suited for software
rendering. If you want to support software rendering in your app/game,
as well as hardware, you're best off creating your own sort of "API",
which can then use software, d3d, or ogl. And it's best to make your
api sorta "fluffy" and nonspecific... ie, "drawworld" instead of "drawasingletexturedpoly"...
because that way you can take best advantage of the available
features, or strip anything off that will make your engine slow in software mode...
Posted on 2001-10-08 14:39:14 by f0dder
Hello, im in the middle of converting a game ive been writing in DOS, this thing has a fullblown software engine with texture mapping\gouraud shading\transparencies ...blah blah and being coded in 100% assembler it runs at a pretty decent speed, about 30fps at 640x480 on my shitty old 200mhz pc.

But the point is, im starting to think i wasted my time writing it(although i learned a hell of a lot doing it so maybe not) because everyone wants hardware stuff now, and lets face it you get better visuals...better frame rates, and its a lot easier to code than writing the whole thing yourself (well i think it is, whats direct3d\openGL actually like to code?? whats easiest)

So if i was you, id think hard about bothering to write your own 3d engine, its not a simple thing to do. i might just dump mine and start getting my head round direct3d...
Posted on 2001-10-08 19:58:07 by Lennon
For MANY GOOD articles on polygon filling check out this page:

http://freespace.virgin.net/hugo.elias/
Posted on 2001-10-08 23:01:57 by Kenny
Hmm, Lenon thats not too encouraging. I suppose if I tell you that the engine is already written in OpenGL you'd think this would be an even bigger waste of time.

Well I think I'd agree. But OGL is increadbly slow on my laptop. A basic, no image to be rendered, app only runs at 40 fps at 800 by 600. Once I actually start to draw something this will drop to 1 fps probably.

I seriously believe that the OpenGl hardware rendering (which is suppoed to be supported) isn't being used. But thats a question for the OGL forum.
Posted on 2001-10-09 16:41:57 by Eóin
eoin, if hardware is not supported, you should always be able to go
faster than DX or OGL. Hardware not supported can be caused by
many things... many of the cheap "accelerators" (like ViRGE of the
former days) only implemented minimal funcitonality, not really enough
to support DX nor OGL... some "accelerators" of today (especially
on the laptop market) might be the same.

Another reason for lack of OGL is multi-monitor systems, but that's
mostly desktops with high-end accelerators (or GF2/M X :D).
Posted on 2001-10-09 17:35:24 by f0dder
I found another one (now pre-checked ;) ):

http://cg.cs.tu-berlin.de/~ki/3del_1419_hard_dos.html

The side contains more than 300 links to different 3D engines,
some with source, others for sale, most (all?) for DOS.

Maybe something interesting for yours.

beaster.
(did not check the single links ...)
Posted on 2001-10-10 03:54:22 by beaster
That's where I learned my Polygon Filler from. A couple of time ago I was building my own 3D Software Engine but I never finished it. I began to think that I was wasting my time, and I really was! With OpenGL I can concentrate more on the physical aspects of the 3D Engine than the graphic stuff.

Peroxide
Go to the Tutorial section and get the PXDTUT3.ZIP file.

You can also go to the Ultima section and see the progress of the Ultima remake project entirely in 3D!
Posted on 2001-10-20 06:31:14 by eeprom