Visible Line Detection

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:
3DRender Screenshot
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.

Render Updates and Soccer Ramblings

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.

DOS Plasma Demo

I’ve finally gotten the chance to finish my little plasma demo for dos. I’ve written it on my old laptop which has very sticky keys (like it had been washed with coke) so I had to type each key twice sometime – that took a loong time :). The part I found tricky with the plasma demo was not to get the pixels onscreen, that’s easy – but finding some nice sine/cosine functions for the surface and palette animation stuff, that’s tricky. I’ll upload it in a day or so, it still needs some tuning. Hm, it’s twenty minutes past midnight now, I’m waiting for my chemistry report to finish printing, need sleep :).

OpenGL Bezier Patch Renderer

I’ve posted alot of news the last couple of weeks, but no new projects or screenshot, well, that will change today. I’ve finished programming my BezierPatch render and it has been uploaded to the projects section. Here’s a screenshot of the program rendering a solid, lit patch.
Screenshot of Bezier Patch Renderer
The was used about 8000 triangles to create the patch in that screenshot! And here’s another shot showing the same patch from another angle rendered in wireframe without lighting.
Screenshot of Bezier Patch Renderer
The demo proram with source can be found here:bezier.zip. It’s written in GLUT so it should compile on any GLUT compatible platform, including linux. I have not done much to optimize the program beyond the basics, it should be fairly easy to understand. You can manipulate the setting in the program with the keyboard, you can turn lighting on/off and toggle wireframe on/off and change the number of evaluations used to draw the patch. By manipulation those evaluation params you should be able to make some kind of simple runtime LOD rendering by decreasing the number of evaluations as the patch moves away from you.
The supplied source has two classes, CCubicCurve and CCubicPatch. Although the program only draws patches you can isolate the CCubicCurve class and use it to make curves, they can be either hermite or bezier. The class is creat for camera movement animations.

Users Guide

I’ve finally finished my users guide for 3DRender, go read some of it and see if you need the program. I beleive that a program like 3DRender is great for learning basic 3D operations and It’s even grown more usefull than I imagined at first. It’s actually great for drawing vectors and coordinate systems in true perspective corrected 3d. Well, enough rambling for now.

Working on Reflection Demo

Slept too long today, didn’t make it to the first 3 classes :(. I think that I’ll upload a small reflection thingy I did sometime ago, the upload will be made in the weekend. It’s very simple, no textures or use of the stencil buffer but it works, as long as you keep the camera above the ground. I’ve also started on a new project, its an entry a PCdemo competition at the next scene party that I’ll attend (perhaps “The Meltdown” which is set to go next month). It’s my first demo ever so don’t expect much, I’m just trying to get a feel for it – in fact, I’ve already got a small state driven demo up and running. I will ofcourse upload the demo and the source when the contest is over (you can’t participate with stuff that has been released already in the combos).