Progress Thread - New demo - Cobra Mk III (18-May-08)

A full (6DOF) 3D engine for TI-83 based calculators.

Moderator: qarnos

User avatar
qarnos
Maxcoderz Staff
Posts: 227
Joined: Thu 01 Dec, 2005 9:04 am
Location: Melbourne, Australia

Post by qarnos »

coelurus wrote:Fans/strips could be used to cache filling information, for example the expensive gradients. But ok, you wanted to keep it simple, for now... :)
I looked at the idea of caching a while ago, but decided there was no performance benefit. Take, for example, a square. Using tris, I would have to calculate 5 grandients and do 2 cache lookups. Using polys, I just calculate 4 gradients, no lookups.

The type of object which could benefit from triangles will not be used in this engine!
Obj is a good choice for a general format, since pretty much any modeler can export to that.
Triangles are good because they are always planar. It's harder (impossible really) to determine how to split non-planar n-gons, n > 3, to give the effect artists want, while it is not impossible to merge adjacent planar tris.
A convex polygon is always planar - and that is the only kind this engine (or any realtime 3D engine worth its salt) supports.
As the plugin-junkie I am, what about making a master program and write plugins that parses data to some independent storage?
I prefer the piping solution - it is cross platform and just as flexible. Build it into a GUI and you won't notice the difference.
User avatar
qarnos
Maxcoderz Staff
Posts: 227
Joined: Thu 01 Dec, 2005 9:04 am
Location: Melbourne, Australia

Post by qarnos »

benryves wrote:Writing output plugins for Milkshape 3D (super-cheap low-poly model editor) is trivial, and it supports a bazillion (rough estimate) input formats. I've used it in the past for converting Quake 3 and DOOM3 meshes to one of my own 'custom' formats. Might be worth a gander?
I'll take a look but I really like Wings 3D :D I made a nice spaceship in it today!
I finally tried the demo program on my calculator - it's obscene how fast it runs, even on my crummy old 83+. :) Well done!
Thanks! I must be the only one who hasn't tried it recently on real hardware. I can't find my calc!!! (serious!)
User avatar
tr1p1ea
Maxcoderz Staff
Posts: 4141
Joined: Thu 16 Dec, 2004 10:06 pm
Location: I cant seem to get out of this cryogenic chamber!
Contact:

Post by tr1p1ea »

I only owned an 83 for ages and ages. I was making 83+ programs for years before i only recently bought an 84+SE. I had so much fun testing all the stuff i had made on real hardware for the first time :).

Lets hope you can find that calc!
"My world is Black & White. But if I blink fast enough, I see it in Grayscale."
Image
Image
coelurus
Calc Wizard
Posts: 585
Joined: Sun 19 Dec, 2004 9:02 pm
Location: Sweden
Contact:

Post by coelurus »

Won't the engine handle "complex" closed objects, like fighters or similar?

By definition, a convex polygon is planar, but modelers don't always follow mathematical definitions in all actions. Take a quadrilateral and pull a vertex along the face normal. This should be illegal, since it destroys the surface, it will become undefined (shoot a ray against it, where would it hit?). To get rid of pesky problems from this potentially undefined surface, triangles are preferred.
Another solution is NURBS, but that's even worse for calc stuff I'd wager :D

Piping probably suits this project better, I have some rather demanding stuff to work on and every day I see plugins, plugins and plugins everywhere :P

What's happened to your calc?!
User avatar
qarnos
Maxcoderz Staff
Posts: 227
Joined: Thu 01 Dec, 2005 9:04 am
Location: Melbourne, Australia

Post by qarnos »

coelurus wrote:Won't the engine handle "complex" closed objects, like fighters or similar?

By definition, a convex polygon is planar, but modelers don't always follow mathematical definitions in all actions. Take a quadrilateral and pull a vertex along the face normal. This should be illegal, since it destroys the surface, it will become undefined (shoot a ray against it, where would it hit?). To get rid of pesky problems from this potentially undefined surface, triangles are preferred.
I should have been more specific: The engine deals only with flat convex polygons.
Another solution is NURBS, but that's even worse for calc stuff I'd wager :D
Yeah, that's probably going overboard for something like this.
Piping probably suits this project better, I have some rather demanding stuff to work on and every day I see plugins, plugins and plugins everywhere :P

What's happened to your calc?!
Beats me! I haven't seen it for a while. I might just go and get myself an 84+, I'd love to see the engine run on one of them.
coelurus
Calc Wizard
Posts: 585
Joined: Sun 19 Dec, 2004 9:02 pm
Location: Sweden
Contact:

Post by coelurus »

Pretty much all engines deal with planar (or flat) polygons, but that means you have to be sure the input polygons are all planar. The convertion process from a model format to your custom format must make sure that all non-planar polygons are split up into planar polygons. It's an ambiguous operation, and to be totally sure about the outcome, you have to go the opposite way (merging planar, adjacent triangles into larger polygons). If the modeler artist only uses planar polygons, things will be fine, but that's a "dangerous" assumption.
Silly issue this, but we haven't started flaming yet so I guess I can keep going a tinsy bit longer :wink:

You mean buy a new calc? Don't you know anybody with a calc nearby?

EDIT: I did a little search and found this:
http://online.caup.washington.edu/cours ... Polys.html
I'm sure you're aware of all this, I just want to clarify my point a bit :)
User avatar
qarnos
Maxcoderz Staff
Posts: 227
Joined: Thu 01 Dec, 2005 9:04 am
Location: Melbourne, Australia

Post by qarnos »

coelurus wrote:Pretty much all engines deal with planar (or flat) polygons, but that means you have to be sure the input polygons are all planar. The convertion process from a model format to your custom format must make sure that all non-planar polygons are split up into planar polygons. It's an ambiguous operation, and to be totally sure about the outcome, you have to go the opposite way (merging planar, adjacent triangles into larger polygons). If the modeler artist only uses planar polygons, things will be fine, but that's a "dangerous" assumption.
Silly issue this, but we haven't started flaming yet so I guess I can keep going a tinsy bit longer :wink:
I see your point, and I think we were on different wavelengths.

The engine itself assumes all polygons are flat and convex. Any checking would have to be done in the conversion, which is, obviously, done on the computer.

I wasn't planning on bothering with checking for non-planar polygons during the conversion, since I expect any models it receives will have been created pretty much specifically for the engine.

On the other hand, I was already planning on merging adjacent coplanar polygons, so if the modeller wishes, he/she could triangulate the model before conversion and it will turn out fine.
You mean buy a new calc? Don't you know anybody with a calc nearby?
Unfortunately, no. It isn't a huge concern. The emulators available now are almost perfect (although I noticed VTI has a bug with either "ld d, xh" or "ld e, xh", I forget which one).
User avatar
kv83
Maxcoderz Staff
Posts: 2735
Joined: Wed 15 Dec, 2004 7:26 pm
Location: The Hague, Netherlands
Contact:

Post by kv83 »

VTI is far from perfect IIRC. It has a lot of bugs, and can't even emulate Duck's GPP correctly IIRC (that's why he made a 'special' VTI version....)

PTI on the other hand ;)
Image
User avatar
qarnos
Maxcoderz Staff
Posts: 227
Joined: Thu 01 Dec, 2005 9:04 am
Location: Melbourne, Australia

Post by qarnos »

First of the month, so I thought I should post an update - it's been a couple of weeks.

I have been adding some wireframe support to the engine and the results are very encouraging in terms of FPS. The new 3D line clipping went in very easily compared to the problems with polygons, although there is still a bug hiding in there somewhere.

Hopefully within in the next week I will be able to release an updated version of the source code along with a simple wavefront OBJ to wireframe converter. The converter is a bit of a hack but it gets the job done. Then you will at least be able to play around with putting your own models into the engine! :D

I also plan on expanding the controls in the demo to allow you to control the object as well as the camera.

Here is a PTI of a spaceship of some description which I made in Wings3D. It consists of 45 vertexes and 72 lines but runs quite smoothly:

Image

EDIT: The demo file, democube.8xp, has been updated with this version (yes, I know it is not a cube anymore, but I am lazy!).

The bug is still there so you will get an ASSERT screen when it happens. Since the program doesn't re-initialize it's variables you will need to re-send the file after the assert screen or it will keep happenning when you try to run it.

ANOTHER EDIT: I added a few keys about a month ago but forgot to tell you about them!

7 & 1 will slew up and down, 4 and 6 will slew left and right.

If you are using PindurTI these keys won't work on the keypad - you need to use the numeral keys across the top of the keyboard.
"I don't know why a refrigerator is now involved, but put that aside for now". - Jim e on unitedti.org

avatar courtesy of driesguldolf.
User avatar
kalan_vod
Calc King
Posts: 2932
Joined: Sat 18 Dec, 2004 6:46 am
Contact:

Post by kalan_vod »

mLooks pretty sweet, reminds me of a starwars ship ;).
User avatar
Madskillz
Calc Wizard
Posts: 745
Joined: Fri 17 Dec, 2004 10:22 pm
Location: Wandering around in the Jungle...
Contact:

Post by Madskillz »

heh yeah it does remind me of a star wars ship...garnos you always keep me happy keep it up man!
The Revolution is here...
User avatar
qarnos
Maxcoderz Staff
Posts: 227
Joined: Thu 01 Dec, 2005 9:04 am
Location: Melbourne, Australia

Post by qarnos »

To be honest, I've never seen any Star Wars movie (!). Personally I thought it looked like more of a Star Trek deal... It has the whole warp nacelle thing going.

I have made a minor update to the demo. The bug has had a temporary fix applied to it and I reduced the size of some of the buffers, which were way too large, so the size is down a bit.

I think I fogot to mention that the MirageOS bug (setting program sizes to zero) has also been fixed. Apparently MirageOS doesn't like programs playing around with asmFlags1.
"I don't know why a refrigerator is now involved, but put that aside for now". - Jim e on unitedti.org

avatar courtesy of driesguldolf.
DarkAuron
Maxcoderz Staff
Posts: 1349
Joined: Sat 18 Dec, 2004 6:53 pm

Post by DarkAuron »

A programmer that hasn't seen a star wars movie.. *straps qarnos to a chair and forces him to watch eps 4 to 6 one after another* :o

Great job though! I could never do anything 3d like that :)
[Gridwars Score] - E: 1860037 M: 716641 H: 261194
CompWiz
Calc King
Posts: 1950
Joined: Thu 13 Oct, 2005 1:54 pm
Location: UB

Post by CompWiz »

Wow, never seen Star Wars? Not only have I seen all the movies(eps 4-6 a few times) I've also read most of the books in the series. (Very good books BTW, I'd highly reccomend Heir To the Empire by Timothy Zahn to anyone. It was a phenomenal book(the rest of the trillogy was excellent as well, also the following duology was very good), and a #1 national bestseller when it came out.)
So yeah, that ship does look like a star wars space ship, maybe one of the headhunters(precurser to the x-wing). Nice job. It seems that we may soon have a challenge to space dementia. Keep up the excellent work, and watch a nice star wars movie(episode 4: A new hope is good, but make sure to watch the original version. The special edition released in 1997 was not as good). :)
In Memory of the Maxcoderz Trophy Image
User avatar
elfprince13
Sir Posts-A-Lot
Posts: 234
Joined: Sun 11 Dec, 2005 2:21 am
Contact:

Post by elfprince13 »

CompWiz wrote:Wow, never seen Star Wars? Not only have I seen all the movies(eps 4-6 a few times) I've also read most of the books in the series. (Very good books BTW, I'd highly reccomend Heir To the Empire by Timothy Zahn to anyone. It was a phenomenal book(the rest of the trillogy was excellent as well, also the following duology was very good), and a #1 national bestseller when it came out.)
So yeah, that ship does look like a star wars space ship, maybe one of the headhunters(precurser to the x-wing). Nice job. It seems that we may soon have a challenge to space dementia. Keep up the excellent work, and watch a nice star wars movie(episode 4: A new hope is good, but make sure to watch the original version. The special edition released in 1997 was not as good). :)
Episode 3 was pretty good too. if read any of the books, skip new jedi order, they're terrible.
and that ship definitely looks like a z95 headhunter.


btw, this engine looks awesome, and I can't wait to see it used in some games.
Post Reply