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

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

Post by qarnos »

benryves wrote:Wow, nice to see you're getting back into the project.
Well, I'm trying to! It's amazing how much code rots when you leave it for a while. I need to have a good clean out tomorrow and sort out what's good and what's junk :P
"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
qarnos
Maxcoderz Staff
Posts: 227
Joined: Thu 01 Dec, 2005 9:04 am
Location: Melbourne, Australia

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

Post by qarnos »

I've been doing some work on a 2D OpenGL-style graphics engine, and decided to take a crack at doing some texture mapping (mainly for rotatable sprites).

I thought I'd post it in this thread, since it is slightly related to 3D, but probably too slow to use in Aether.

Image

The texture in the demo is 32x32 pixels. The mapper supports tiling (though it is buggy at the moment) and I hope to implement masking.

It comes at a cost though - each texture you want to use requires generating a 512-byte lookup table. If it weren't for that, it would be horrendously slow.

There is lots of 16x16 bit multiplication involved, which accounts for much of the slowness. The inner loop in the mapper also takes around 200 T-States to fetch each texel - which adds up very quickly if your texture occupies a large area of the screen. Smaller images are reasonably quick though.
"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
benryves
Maxcoderz Staff
Posts: 3078
Joined: Thu 16 Dec, 2004 10:06 pm
Location: Croydon, England
Contact:

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

Post by benryves »

Ace. Could you use it for billboarded sprites in Aether, maybe?
Galandros
Regular Member
Posts: 88
Joined: Sun 14 Sep, 2008 10:00 am

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

Post by Galandros »

Looks nice. Ah, I need to master images handling. I could can make cool stuff.
User avatar
qarnos
Maxcoderz Staff
Posts: 227
Joined: Thu 01 Dec, 2005 9:04 am
Location: Melbourne, Australia

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

Post by qarnos »

benryves wrote:Ace. Could you use it for billboarded sprites in Aether, maybe?
Hmmm... if I was going to use it in Aether, there's no real reason to restrict it to billboard sprites. It could get ugly if you use a texture on a high Z-depth polygon, but on a 96x64 b&w display, who's going to notice?

Here's an example of what it could look like. This is a 64x32 image of an Apollo spacecraft scaled to an (initially) square polygon. After the rotation, the polygon is warped around a bit.

Image
"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.
Post Reply