Page 1 of 3
[Staff][Dev] 3D WireFrame Program
Posted: Thu 30 Dec, 2004 5:33 am
by tr1p1ea
Hi, just to let you guys know that i am still coding, i thought i would post this. Last week i was bored so i whipped up this ... a 3D WireFrame rendering program.
It only renders lines, nothing is filled or anything so dont get too excited ... plus there is need for some optimisation. Anyway here are some screenshots:
Its supposed to be a crude model of an X-Wing Fighter
.
Anyway it runs a little better on-calc than in the screen (its definately not as jumpy).
Also this will NOT eventuate into a game or anything, i am really just fooling around a little
.
Posted: Thu 30 Dec, 2004 4:25 pm
by tr1p1ea
Oh yes i forgot, you can also try this:
http://users.tpgi.com.au/adslmpxk/Files/wFrame.8xp
Its the crude X-Wing demo
.
Posted: Thu 30 Dec, 2004 9:07 pm
by Kozak
I've always liked these 3d demos but yeah it might be unfeasible to transform them into a good game
.
Posted: Fri 31 Dec, 2004 1:16 am
by Stickmanofdoom
Could you post the source code, or at least the math needed to represent a point in 3D space on a 2D screen? I have been wanting to play around with 3D on the calc.
You say it couldn't work for a real game? I would think wireframe graphics would be great for an NBA jam type game. The players could be wireframe stickmen, and the mode-7 style floor used in the real game could be faked with a 3D vector plane.
Perhaps that's demanding a little too much from the 83+? It would be fun to at least try.
Posted: Fri 31 Dec, 2004 4:11 am
by Madskillz
Wow...very cool Tr1p! A neat little demo thingy!
Posted: Sun 02 Jan, 2005 4:04 pm
by tr1p1ea
heh, i dont think it will turn into much more, maybe just a wireframe model viewer
.
Also w00t, 100th post!
.
Posted: Sun 02 Jan, 2005 7:58 pm
by Calv!n.n0.1
Neato tr1p!
Posted: Mon 03 Jan, 2005 12:25 am
by shadowing
Whoa... Cool. It's not bad. I'm guessing you used vectors...
Posted: Mon 03 Jan, 2005 3:46 am
by Jim e
Stickmanofdoom,
converting 3d croods to 2d is pretty simple.
screen x = ( x * eye) / ( z + eye )
screen y = ( y * eye ) / ( z + eye )
eye is the dist the viewer is from the screen.
Posted: Mon 03 Jan, 2005 7:22 am
by teoryn
Very cool. Do models have to have every line hand entered?
Posted: Mon 03 Jan, 2005 8:29 am
by tr1p1ea
Well, atm it will just read an array of values and draw the lines. An example is:
Code: Select all
CubeModel:
.dw 12 ; Number of lines in model
.db 10,10,10,-10,10,10 ; x3D1, y3D1, z3D1, x3D2, y3D2, z3D2
.db -10,10,10,-10,10,-10
.db -10,10,-10,10,10,-10
.db 10,10,-10,10,10,10
.db 10,-10,10,-10,-10,10
.db -10,-10,10,-10,-10,-10
.db -10,-10,-10,10,-10,-10
.db 10,-10,-10,10,-10,10
.db 10,10,10,10,-10,10
.db -10,10,10,-10,-10,10
.db -10,10,-10,-10,-10,-10
.db 10,10,-10,10,-10,-10
Posted: Mon 03 Jan, 2005 9:10 am
by DarkAuron
Maybe you should make a model editor, tr1p. That'd be awesome.. a 3d modeler on the calc
Posted: Mon 03 Jan, 2005 10:31 am
by Jim e
An on-clac modeler, now that would be some awsome code. That matt 3d designer is kinda tough to work with. I ended up writing 53 lines worth of croods on paper just to make a plane. I think I'll stick cubes till something better comes along.
Man, PAPER, what is this the dark ages, forced to use papyrus. poor trees.
Posted: Mon 03 Jan, 2005 4:37 pm
by Stickmanofdoom
Thanks for the math, jim e. I'll see what I can do with it.
Posted: Mon 03 Jan, 2005 9:10 pm
by Duck
Looks nifty. I see the coordinates are 1 byte, that must have eased coding.
Do you know how fast/slow it is against that 3d engine in the making? I think I forgot the name of it.