I’ve been working on a very simple 3D engine these past days. It’s far from being cool, but since it’s my first try at a completely software based engine with unlimited object and vertex storage (as long as there’s memory ofcourse) I’m fairly pleased. I’ve uploaded a linux tarball containg the source and some scripts which can be found here(enging-0-11). You’ll need SVGAlib to compile and run the demo, but if you want you could alter the main.cpp file to make it work in dos mode (since the engine is 100% software based and simple, all you need to use it is a pointer to the bytes in which you want to store the result. Anyways, the demo shows a red cube built of triangles rotating about the x and y axis. If you press ‘l’ you’ll enable the only feature in the engine so far: the visible line determination which will make the cube a lot cooler, ‘q’ quits the program. Next step is to implement a zbuffer or something to allow me to perform hidden-surface removal on several objects (they can be displayed as it is, but without any sorting which looks stupid). But I’m currently converting the framework to 100% OOP so it may be a while since I made many of the changes while watching Denmarks match in Prague this wednesday, a good advice: NEVER implement anything important while watching football, you’ll make zillions of bugs:).
It’s been almost a week since my last newspost, I’ve been busy at school. We’ve had our midterms from Tuesdag to Friday so the admins cut the net access to prevent cheating. I’ve come along way with my new engine. I’ve implemented a visibile-line algorithm (the simple dotproduct thingy) to make my polygons look solid. Another nthing I added is support for vertex indices in a way similar to OpenGL. I’ve done many other minor things which I won’t bother you with here.
In one hour AaB will be facing Lyngby in Copenhagen for the second “superliga” match of the halfseson. They better win :). AaB will play the first homegame at the first of April and I’ve got tickets to the match along with tickets for the three next homegames aswell. Can’t wait to get to the stadium again! Well, that was what I had to say today.
Hmm, I’m writing this newspost from a computer without internet access, I planned to upload the updates when I came to school this morning but I found out that the internet connection has been closed due to the fact that some of the younger students have midterms today. I’m writing this at 8am in the morning but it can’t get it uploaded until later today :(. But that doesn’t mean that I can’t introduce the programs that I’m going to upload.
The program 3DRender was originaly written by me because I wanted a better understanding of 3dmath. The undelaying engine was finished in mid-december 2000 and has remained virtually unchanged ever since (except for a bug I discovered yesterday and a single new function). Since then I’ve mostly used the program as a way to improve my modest abilities in MFC programming. More info on what the program actually do can be found on the projects page. The changes in the latest version are:
- Completely redesigned and now actually usefull “Edit Vertices” dialog.
- Bugfix in C3DEngine code (in C3DEngine::Insertvertex).
- Function that allows you to draw a sphere.
- Max 400 vertices in each object (as oppose to the 20 vertices/object limit in the last version.
And here’s a screenshot showing the redesigned “Edit Vertices” dialog:
The .exe file and the full source can be downloaded here: 3DRender. Please send feedback and comments to me.
As promised I’ve also uploaded my preliminary plasma demo, it has the following problems:
- The palette animations don’t wrap the palette around the edges
- There is no framerate lock.
It works best on older computers duo to the missing framerate lock. The program uses mode13h and all you need is a dos installation. The .exe with source can be downloaded here: 3DRender.
I’ve started on a new 3d engine which may replace the current engine as the workhorse of 3DRender. It’s nice to feel how much I’ve learnt from previous projects. The stuff I learnt to do (and more of the stuff I learnt _not_ to do) during the programming/design phase of the old engine is very valuable and has assisted me in designing the new. I still have much to learn and I know that I’ll make tons of design glitches in this engine too – but you learn alot from mistakes, knowledge that would be hard to gain from tutorials.
And then I would like to go offtopic again. AaB played 1-1 against FCK today, they were in the lead up until the 75th minute were former AaB player Staale Solbakken decided to let himself drop in the box, the referee bought it and gave FCK a penalty kick. I _hate_ it when AaB loses points that way, wannebee-moviestars shuold move to hollywood instead of playing football, grrr. Well, be sure to check back here tomorrow where I’ll upload the new build of 3DRender and maybe my simple plasma demo.
I’m feeling ill today, I’ve got a headache and I think I’ve got the cold, or maybe even the flu. I just wanted to let you know that if you are having troubles drawing anything with 3DRender there’s help on the way. I’ve started work on a users guide that will explain you how the different params affect the system and how to use them. I expect it to be finished within next week or so.