Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Why are DarkGDK's XY and Z coordinates all screwed up?

Author
Message
Stucky
15
Years of Service
User Offline
Joined: 11th Apr 2009
Location:
Posted: 18th Jul 2009 06:59
I'm a little confused here. Correct me if I'm wrong but when it comes to XYZ isn't Z usually up and down, X is left or right, and Y is towards and away? Well I noticed while using Dark GDK that if I set the camera's rotation to (0,0,0), then place an object in front of that camera, and modify the object's Z coordinate then the object moves away from the camera. But if Dark GDK were using XYZ as it should wouldn't the object move up from the camera's position when I alter the object's Z coordinate? It just doesn't make any sense to me. Could someone help?
Morcilla
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 18th Jul 2009 13:54 Edited at: 18th Jul 2009 13:55
X = "(+) Right / (-)Left"
Y = "(+) Up / (-)Down"
Z = "(+) Front / (-)Back" (edit: or was it the opposite, oh well.)

Think of the Z axis as being perpendicular to the screen. If I'm not mistaken, all DirectX frames work like that. However some 3d modelling softwares may differ.
dark coder
21
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Japan
Posted: 18th Jul 2009 15:15
Yes, hence Z-Depth, or Along The Corridor(X) and Down The Stairs(Y), thus depth is Z; we aren't reading maps here.

jezza
16
Years of Service
User Offline
Joined: 8th Mar 2008
Location: Bham, UK
Posted: 18th Jul 2009 16:24
It's like your bog standard graph of X against Y, as horizontal and vertical respectively, but an extra dimension added for depth (Z).

Stucky
15
Years of Service
User Offline
Joined: 11th Apr 2009
Location:
Posted: 18th Jul 2009 21:50
K I understand now. I've just never seen a program use Z as depth, its usually Y. But I'll try to get used to it, thanks.
luxgud
User Deleted
Posted: 19th Jul 2009 22:24
This is interesting .. in Blender and 3ds Max modeling programs, Z is UP/DOWN. In 3DGameStudio (a game development system) Z is also UP/DOWN. In Unity3D (another game dev. system Y is UP/DOWN like Dark GDK.

In maths, Z is definately IN/OUT of the graph paper, therefore I would say Dark GDK's interpretation is correct.

Can anyone explain why there are different interpretations of XYZ in programs ?

Thanks
atomic knights
16
Years of Service
User Offline
Joined: 12th Apr 2008
Location: On my laptop
Posted: 21st Jul 2009 05:05
3 D Cartesian co-ordinates come in two flavors, left hand and right hand. Using the middle finger as positive x, , thumb y and index finger z, you can see that DarkGDK is a left handed scheme. Second Life on the other hand (pun intended) is right handed.

This has nothing to do with what axis points up. Whenever you are looking a weather map with lows and highs, you are looking at a 3 D axis where pressure, is coming out of the picture (high) and the x, y are the usual latitude and longitude. This type of map is referred to as a contour map. The lines you see are the lines of constant pressure (called isobars). Topographical maps also use this.

There really is no right or wrong. It comes down to what scheme the original programmer was comfortable / learned with.

You sometimes see this when you first load a 3rd party model. You have to rotate and ten fix the pivot.

hope this helps
luxgud
User Deleted
Posted: 21st Jul 2009 11:12
I think the source of confusion is ** why ** do 3D co-oddinates come in two flavours ?

Thanks for you input !
atomic knights
16
Years of Service
User Offline
Joined: 12th Apr 2008
Location: On my laptop
Posted: 21st Jul 2009 15:12
Because it doesn't matter. Descartes was first attributed to the use of the right handed system in the 1500s. Back then, science was political and religious and what notation one used aligned you with that group. Different schools taught things differently and when people develop software they tend to use what they learned in school. One isn't easier than the other, it is just conventions.
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 21st Jul 2009 15:32
just thought I add this.



0= center of screen

Dark Physics makes any hot drink go cold.
luxgud
User Deleted
Posted: 21st Jul 2009 19:57
Quote: ... because it doesn't matter ...

It matters to me and it also matters to the person who orginally posted the question !

It doesn't matter to *you*, is the correct assertion.

Please just admit that you don't actually know the reason.
luxgud
User Deleted
Posted: 21st Jul 2009 20:06
http://en.wikipedia.org/wiki/Cartesian_coordinate_system

The last page explains it well
Zuka
16
Years of Service
User Offline
Joined: 21st Apr 2008
Location: They locked me in the insane asylum.
Posted: 23rd Jul 2009 14:58
I believe it stemmed from Autodesk messing up with 3DS Max and making Z up/down. I doubt it, though, it wouldn't surprise me. Z being up/down just seems stupid.
Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 23rd Jul 2009 18:16
IMS, my college geometry and algebra would disply XY coordinates on a plane facing the observer. This makes 2D game programming a bit more intuitive despite the reversed Y component. But when the courses began to deal with a third dimension the XY mapping was laid out on the horizontal plane and Z would be up/down. I wasn't something I had difficulty in switching to.

AAR, I suppose what it comes down to is what you were introduced to first as seeming to be the system of preference. When I was in college computer monitor coordinates weren't of great interest considering that the kind of games we can produce nowadays weren't even possible. So I went for a long time using what was basically a mathematical coordinate system and being comfortable with it. Now that I have to think in monitor terms I have to constantly remind myself which direction the positive Z axis is in.

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
Zuka
16
Years of Service
User Offline
Joined: 21st Apr 2008
Location: They locked me in the insane asylum.
Posted: 23rd Jul 2009 18:27
Yes, but our monitors ARE usually upright.
Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 23rd Jul 2009 18:52
I'm thinking of my brother's cocktail table version of Ms. Pac-Man.

Lilith, Night Butterfly
I'm not a programmer but I play one in the office

Login to post a reply

Server time is: 2024-10-01 08:46:09
Your offset time is: 2024-10-01 08:46:09