
-----------------------------------
SNIPERDUDE
Fri Feb 02, 2007 2:50 pm

Formula for Z?
-----------------------------------
I took the tutorial for basics on 3D graphics in turing (the one with the cicle)

And I understand that tutorial completely, but I realize that the formula he used for Z is not very practicle for making a 3D game.
Is there a better solution to this, so that I am Able to create 3D maps (may be a little out there, but I would like to at least understand the basics)

Possibly a new (or updated) 3D tutorial might help for the not-so-noobs.

-----------------------------------
rdrake
Fri Feb 02, 2007 3:40 pm

RE:Formula for Z?
-----------------------------------
Which formula exactly is in question here?  It all seems ok to me.

-----------------------------------
SNIPERDUDE
Fri Feb 02, 2007 4:07 pm

Re: Formula for Z?
-----------------------------------
y|                /
  |              /
  |            /
  |          /   z
  |        /
  |      /
  |    /
  |  /
  |/___________________
      x

^ This is the formula they give ^

But I a formula where I am able to draw an object and be able to rotate it and move the object around.

Hope this clears it up a bit...

-----------------------------------
SNIPERDUDE
Fri Feb 02, 2007 4:20 pm

Re: Formula for Z?
-----------------------------------
|..Y..../.......
|....../.Z......
|..../...........
|../.............
|/_________
X

Sorry, the spaces got removed

-----------------------------------
SNIPERDUDE
Fri Feb 02, 2007 6:15 pm

Re: Formula for Z?
-----------------------------------
Anyone?

Plz help  :?

-----------------------------------
rizzix
Fri Feb 02, 2007 6:31 pm

RE:Formula for Z?
-----------------------------------
When you draw a 3d object onto your 2D screen you technically should have only 2d co-ordinates.

So in that sense there is no formula for z.

hint: think "projections"

-----------------------------------
SNIPERDUDE
Fri Feb 02, 2007 6:51 pm

Re: Formula for Z?
-----------------------------------
Projections?????????????     :?

-----------------------------------
HellblazerX
Fri Feb 02, 2007 7:31 pm

Re: Formula for Z?
-----------------------------------
If you want to create 3D graphics, you're going to have to have an understanding of vectors and matrices.  The computer screen can only draw 2D objects.  In order to have 3D graphics, you must project the 3D objects onto the screen in order to draw them.

-----------------------------------
SNIPERDUDE
Fri Feb 02, 2007 8:42 pm

Re: Formula for Z?
-----------------------------------
Go on...

I was kind of hoping someone would explain  :|

-----------------------------------
rdrake
Fri Feb 02, 2007 10:13 pm

RE:Formula for Z?
-----------------------------------
You will absolutely need a strong understanding of [url=http://en.wikipedia.org/wiki/Linear_algebra]Linear Algebra.  Including things like matrices and matrix transformations.

You also need to understand that nothing is really 3D persay.  Objects are drawn on the screen in 2D, angles and the like simulate 3D.

Whenever it comes back up, it would be handy to read articles found [url=http://www.gamedev.net/reference/list.asp?categoryid=28]here in order to understand how all this relates to game development.  I would still highly recommend you at least read about the math before you try programming it.

-----------------------------------
Tony
Sat Feb 03, 2007 1:58 am

RE:Formula for Z?
-----------------------------------
It's kind of like drawing a "3D" cube on paper with a pencil. The image you draw is flat (same as you have a flat, 2D monitor to display your graphics).

Basically you keep all your math in 3D, and then flatten down ("project") to render ("draw")

-----------------------------------
SNIPERDUDE
Sat Feb 03, 2007 12:18 pm

Re: Formula for Z?
-----------------------------------
I get what Tony is saying, but

1) when a 3D object "rotates", do the objects variables change or the equation for XYZ change?
2) Is there an equation I could use that makes Z point towards the middle of the screen?


ex: if an object is on the lower left side of the screen the shadow* will point towards the upper-right

Or if an object is on the upper right side of the screen the shadow* will point towards the lower left?

*Shadow - I really mean the rest of the object (z) is projected in this direction



****By the way the link for the site you put Rdrake is under construction****

-----------------------------------
rdrake
Sun Feb 04, 2007 1:24 am

Re: Formula for Z?
-----------------------------------
****By the way the link for the site you put Rdrake is under construction****Hm... something wrong here.  Ah, yes!Whenever it comes back up, it would be handy to read articles found 

Your program would have to keep track of the 3D coordinates, but it takes these and transforms them into 2D for displaying on the screen.

-----------------------------------
SNIPERDUDE
Sun Feb 04, 2007 9:11 am

Re: Formula for Z?
-----------------------------------
I would still like to at least find a link to learn about the math, everybody always tell me to learn about the math but never explains it to me.  I get the concept, I just need to know the numbers.
