<LocalSpace> Help

Moderator: Makail

Post Reply
User avatar
Jack Trades
Posts: 61
Joined: Sun Jan 29, 2012 12:09 pm

<LocalSpace> Help

Post by Jack Trades » Wed Feb 01, 2012 7:34 am

I'm trying to make my own Starmap Editor, and I just finished "dissecting" the XML.
Now I'm able to load/edit/save .Starmap files but I don't really understand how <LocalSpace> works.

Code: Select all

<LocalSpace>1,0,0,0,0,1,0,0,0,0,1,0,2.925895,-2.945374,4.985903,1</LocalSpace>

It seems like it's a pack of 15 values and I assume that last 3 values are x/y/z positions in space, but what are the first 12 ones?

Thanks in advance.

User avatar
Nspace
Kerbicron Cleric
Kerbicron Cleric
Posts: 4667
Joined: Thu Dec 29, 2005 7:26 pm

Re: <LocalSpace> Help

Post by Nspace » Wed Feb 01, 2012 6:42 pm

Check out these two threads:

LocalSpace hints
Starmaps: LocalSpace question

And there are a couple of starmap editors out already. You might want to take a look at them and see if they do what you want. :)
"Quando omni flunkus, mortati" - "When all else fails, play dead"
SotS 1 wiki: http://wiki.swordofthestars.com/sots1/Main_Page
SotS 2 wiki: http://wiki.swordofthestars.com/sots2/SotS2_Codex

User avatar
Jack Trades
Posts: 61
Joined: Sun Jan 29, 2012 12:09 pm

Re: <LocalSpace> Help

Post by Jack Trades » Thu Feb 02, 2012 1:53 pm

Nspace wrote:Check out these two threads:

LocalSpace hints
Starmaps: LocalSpace question

And there are a couple of starmap editors out already. You might want to take a look at them and see if they do what you want. :)


Thanks for the links.

I checked those out and they don't really satisfy my needs and the structure of the .Starmap's is very simple so I might just as well make an editor to fulfill my needs.

User avatar
LuggLD
Posts: 143
Joined: Sun Oct 30, 2011 12:58 pm

Re: <LocalSpace> Help

Post by LuggLD » Wed Feb 08, 2012 12:20 pm

This link from GammaPaladin's thread helped me a lot to figure it out:

http://www.sjbaker.org/steve/omniv/matr ... iends.html

Basically, they're OpenGL translation matrices that can be used to define the position, scale, rotation and orientation of any object or set of objects. If you need anything in particular done, feel free to ask more specific questions :)

User avatar
rimbimbambo
Kerberos
Posts: 440
Joined: Sat Oct 08, 2011 8:42 pm

Re: <LocalSpace> Help

Post by rimbimbambo » Thu Feb 09, 2012 11:22 pm

It is important to note that these are DirectX matrices, not openGL, as open gl swaps the location of the positions to the last row instead of the last column.

Not sure if you got the complete answer to these questions, but local space effects the position of the object in it's parent, as opposed to the world space position, which is the position of all parent/child the matrices added together.

Post Reply

Return to “Modding”

Who is online

Users browsing this forum: No registered users and 2 guests