Jump to content
  • Advertisement
Sign in to follow this  
Ingo

Relation between 2 different sets of coordinates

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, 
 
I need help with finding the relation between 2 different sets of coordinates, internal and ripped. My approach is to create a (nonprofit) mapeditor for a 12 years old gameengine (2004). The engine loads a list of objects based on their position in order to create the scenery. The objects itself are 4000+ single meshs located in another folder.
 
For example 2 object entries extracted from a mapfile:
StandardMesh.Name Toasted_car_FM102
StandardMesh.Query 0
StandardMesh.Position 3380.958008/60.972546/2413.627686
StandardMesh.Rotate -0.000013/21.399723/-0.000001
StandardMesh.Scale 1.000000/1.000000/1.000000
StandardMesh.UnVisible 0

StandardMesh.Name Marien_text_FM102
StandardMesh.Query 0
StandardMesh.Position 3536.939941/262.941986/3235.100098
StandardMesh.Rotate 0.000000/0.000000/0.000000
StandardMesh.Scale 1.500000/1.500000/1.500000
StandardMesh.UnVisible 0
The game will load these 2 objects and places them to their according positions, quiet simple.
 
I started exporting all gameobjects using a directx 9 ripper, because I was not able to reverse the original (custom) mesh format. What I do have now, is a set of 4000 single meshs in .obj/.3ds file format ripped from the game. The 2 example objects (in relation to their scene) mentioned above look like this: 
06705-aa4b90a4-764a-430f-94a5-0a2476a8fe
Complete, ripped scene, imported into 3dsmax. Everything is positioned correct.
 
The ripped coordinates of these 2 particular objects are:
Toasted_car_FM102: -322528.0313X -303186.5625Y 6170.7954Z
Dimensions/Size: 16686.2188, 1042.5, 6113.5059

Marien_text_FM102: -362686.9688X -324552.5Y 24504.3457Z
Dimensions/Size: 4469.9375, 9712.1875, 3876.0386
Their internal coordinates are floats and the ripped coordinates appear to be mirrored, nevertheless I could not come up with any relation between these coordinates and their internal ones. The scalefactor for the cars X coordiante would be ~-95.395. (-322528.0313 / 3380.958008). Applying this scale to the other text model results in -362686.9688/-95.395 = ~3801.949, wich is not 3536.939941.
 
Moving them into internal locations looks absolutely wrong:
06705-2fb5ed08-e032-452f-b274-5794aec2ee
No matter how I flipped or mirrored axes and/or scaled their position and/or size, could I find a relation between these 2 sets of coordinates. Im quiet new to the concept of 3D transformations, I think Im doing something essentially wrong with the units of tools like 3ds max and actual directx 3D transformation. So I think the problem is just me being not informed enough. One last thing to mention is that the engine is extremely primitve, the objects will be placed according to their fileinformation, there shouldnt be anything further than offsets or flipping axes. In order to be able to write an export script for the engine, I have to find the relation between internal coordinates and these ripped ones. Let me know if I missed any important informations.
 
Thank you so much for reading :) Edited by Ingo

Share this post


Link to post
Share on other sites
Advertisement

Your "Marien_text" looks like it's nearly in the same position, are you sure you're taking into account the scale and rotation specified in the original world transform for the car?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!