#### Archived

This topic is now archived and is closed to further replies.

# Quake Style Coordinate system solution here

This topic is 5750 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

if you wonder what a quake style coordinate system is heres the description: in quake engies the x axis goes to the right y into the screen z upwards why would you use a quake style system? well its easier to use with quake engine bsps and quake/halflife map editors like worldcraft and so on...
void CRenderer::LeftHandedIdentityMatrix(vec3_t forward,vec3_t up,vec3_t eye)
{
vec3_t f;
vec3_t s;
vec3_t u;
float m[16];
VectorSubtract(forward,eye,f);
VectorNormalize(f);
VectorNormalize(up);
CrossProduct(f,up,s);
CrossProduct(s,f,u);

m[0]=s[0];
m[1]=u[0];
m[2]=-f[0];
m[3]=0;
m[4]=s[1];
m[5]=u[1];
m[6]=-f[1];
m[7]=0;
m[8]=s[2];
m[9]=u[2];
m[10]=-f[2];
m[11]=0;
m[12]=0;
m[13]=0;
m[14]=0;
m[15]=1;
glMultMatrixf(m);
}
[/CODE]

[CODE]
origin[0]=0;origin[1]=0;origin[2]=0;//World Origin

LeftHandedIdentityMatrix(gCamera.forward,gCamera.up,origin);//Set up for Quakestyle coordinate system
glTranslatef(-gPlayer.origin[0],-gPlayer.origin[1],-gPlayer.origin[2]);

[/CODE]    

##### Share on other sites
I was told the real reason behind that was in respect to art, as in z is when you are looking at a piece of paper on the table x is still the horizonal, y is vertical, and z is out or 'up' away from the piece of paper lying on the table. z is still depth, however, as it should always be (i don't like using y as depth).

EDIT:
Didn't you write a compiler for worldcraft? You posted a link to the source of something like that one time, could you post it again?

[edited by - Shadow1234567890 on December 27, 2002 3:05:29 PM]

##### Share on other sites
i wrote a compiler yeah but it only works with worldcraft til now its not finished i want to add support for quark and radiant too

i can t upload it right now i don t know if the latest fixes and so on work and i need to write a fileformat specification first and i am planing to port it to a win gui application
it is easier to handle

[edited by - Basiror on December 27, 2002 3:22:40 PM]

##### Share on other sites
I am using the same coordinate system too, in my engine, because:
1. It looks more natural to me.
2. I need MD2 files, so...
3. Some of the art is made in 3D Max and Max uses this coordinate system too.

Height Map Editor | Eternal lands

##### Share on other sites
I''ve been programming for a while but I''m still relatively new to opengl (not quite up to making my own engine, but I will be producing somethign simple within the year, I can guarantee).

I wanted to ask you a few questions basiror.
How does a plugin for milkshape work? Does that mean that it takes a .ms3d model and converts it to your format of choice? I''ve looked at some of the examples in the milkshape sdk but I don''t understand how they work. I''d like to write my own, but I could also easily just write a loader for the .ms3d format with little headache (a bonus in working with milkshape is you can convert to and fro other formats).

Also, I noticed you utilize the bsp format, did you just write a bsp loader, or did you also write your own bsp partitioner?

Thanks.

##### Share on other sites
bsp is binary space partition

i wrote my own compiler right now i am reworking it to make the code more readable .....
and to be able to perform CSG

i looked at the milkshape sdk as well a few weeks ago i don t like it very much

it works the following way
its a dll i think not sure well it loads it and executes a function like your main and you can call your own functions from those and you have handlers that allow you to access the memory milkshape uses to store its data

didn t have a closer look into it
i am going to ask valve if i may use their smd plugin

##### Share on other sites
quote:

bsp is binary space partition

and I was asking if you wrote your own binary space partition partitioner I just thought that since you''ve done things like wrote compilers for worldcraft you may have done your own version of bsp, a guy I chat with wrote one similar to carmack''s but it doesn''t split polygons in the process (they get throw into a completely different group but the geometry of the world stays exactly the same). I wouldn''t expect many people to do stuff like that, I know I probably won''t

How do you plan on implementing models? Any preferable model format you are looking into? I personally hate file loading it never works

1. 1
2. 2
3. 3
4. 4
Rutin
12
5. 5

• 12
• 16
• 10
• 14
• 10
• ### Forum Statistics

• Total Topics
632659
• Total Posts
3007692
• ### Who's Online (See full list)

There are no registered users currently online

×