[Staff][Dev] 3D WireFrame Program

Here you can find side projects of the staff and great projects which we think should get extra support. (Note that featured projects are not projects by staff members of MaxCoderz)

Moderator: MaxCoderz Staff

User avatar
tr1p1ea
Maxcoderz Staff
Posts: 4135
Joined: Thu 16 Dec, 2004 10:06 pm
Location: I cant seem to get out of this cryogenic chamber!
Contact:

[Staff][Dev] 3D WireFrame Program

Post 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:

Image Image

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 :).
Last edited by tr1p1ea on Sat 21 Jul, 2007 3:59 pm, edited 2 times in total.
"My world is Black & White. But if I blink fast enough, I see it in Grayscale."
Image
Image
User avatar
tr1p1ea
Maxcoderz Staff
Posts: 4135
Joined: Thu 16 Dec, 2004 10:06 pm
Location: I cant seem to get out of this cryogenic chamber!
Contact:

Post 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 :).
"My world is Black & White. But if I blink fast enough, I see it in Grayscale."
Image
Image
Kozak
Maxcoderz Staff
Posts: 791
Joined: Fri 17 Dec, 2004 5:33 pm
Location: On the dark side of the moon.
Contact:

Post by Kozak »

I've always liked these 3d demos but yeah it might be unfeasible to transform them into a good game :? .
"They say that sea was created by a man named Maarten Zwartbol, a long time ago...." - Duck, an old Corbin version
Stickmanofdoom
Regular Member
Posts: 86
Joined: Fri 17 Dec, 2004 8:20 pm
Contact:

Post 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.
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 »

Wow...very cool Tr1p! A neat little demo thingy! :D
The Revolution is here...
User avatar
tr1p1ea
Maxcoderz Staff
Posts: 4135
Joined: Thu 16 Dec, 2004 10:06 pm
Location: I cant seem to get out of this cryogenic chamber!
Contact:

Post by tr1p1ea »

heh, i dont think it will turn into much more, maybe just a wireframe model viewer :).

Also w00t, 100th post! :twisted:.
"My world is Black & White. But if I blink fast enough, I see it in Grayscale."
Image
Image
User avatar
Calv!n.n0.1
New Member
Posts: 49
Joined: Fri 17 Dec, 2004 10:16 pm
Contact:

Post by Calv!n.n0.1 »

Neato tr1p! :)
Revolution Software - http://www.revsoft.org
shadowing
New Member
Posts: 59
Joined: Sun 19 Dec, 2004 11:19 pm
Contact:

Post by shadowing »

Whoa... Cool. It's not bad. I'm guessing you used vectors...
User avatar
Jim e
Calc King
Posts: 2457
Joined: Sun 26 Dec, 2004 5:27 am
Location: SXIOPO = Infinite lives for both players
Contact:

Post 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.
teoryn
New Member
Posts: 26
Joined: Sat 18 Dec, 2004 4:23 am
Location: Ohio
Contact:

Post by teoryn »

Very cool. Do models have to have every line hand entered?
You've seen the posts, now see the sites!
http://hiddenuniverse.blogspot.com
http://teoryn.deviantart.com
User avatar
tr1p1ea
Maxcoderz Staff
Posts: 4135
Joined: Thu 16 Dec, 2004 10:06 pm
Location: I cant seem to get out of this cryogenic chamber!
Contact:

Post 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
"My world is Black & White. But if I blink fast enough, I see it in Grayscale."
Image
Image
DarkAuron
Maxcoderz Staff
Posts: 1349
Joined: Sat 18 Dec, 2004 6:53 pm

Post by DarkAuron »

Maybe you should make a model editor, tr1p. That'd be awesome.. a 3d modeler on the calc :shock:
[Gridwars Score] - E: 1860037 M: 716641 H: 261194
User avatar
Jim e
Calc King
Posts: 2457
Joined: Sun 26 Dec, 2004 5:27 am
Location: SXIOPO = Infinite lives for both players
Contact:

Post 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.
Stickmanofdoom
Regular Member
Posts: 86
Joined: Fri 17 Dec, 2004 8:20 pm
Contact:

Post by Stickmanofdoom »

Thanks for the math, jim e. I'll see what I can do with it.
Duck
Sir Posts-A-Lot
Posts: 231
Joined: Sat 18 Dec, 2004 3:38 am

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