Page ordering question

tlowe

30-04-2006 19:17:01

First off, thanks for the nice plugin.

I have been using the PLSM2 plugin for a while. Initially I was using the map-splitter to create my test maps and that works fine for me, but I've got some artists who are going be creating the terrain, so I need a simpler, smoother process..:)

So, we looked for a terrain editor in which we could build up a terrain editing pipline from the editor to Ogre+PLSM2. I'm sure this is a familiar concept by now.

Anyway, we looked at the terrain editor mentioned here, but that looks to be a ways off. Then we looked at Freeworld3d, which is very cool, but buggy. Since it could only handle one page at a time, it complicated the terrain building process.

So, we ended up going with PnP TerrainCreator. It works on the same concepts as the PLSM2 plugin..sectors of terrain built from heightmaps, etc... So, I've been building the editing pipline and I've come across something odd (at least IMHO) that I'd like to get confirmed.

Basically, I created a 3x3 sector terrain in PNPTC and I exported it to my terrain's PLSM2 directory. A sector in PNPTC is equivalent to a page in PLSM2's terminology. The oddness comes in the orientation of the pages in PLSM2.

PNPTC's terrain origin is in the bottom left. This means its sectors increase from left to right (rows), then from bottom to top (columns). Sector heightmaps are named something like "name.x.y.png" where x increases from left to right and y increases from bottom to top.

EXAMPLE 3x3 terrain in PNPTC:

0,2 1,2 2,2
0,1 1,1 2,1
0,0 1,0 2,0

After exporting the terrain like this to get a bearing in PLSM2, it looks as if PLSM2's origin is in the top left, but its increases pages from top to bottom (columns), then from left to right (rows).

In PLSM2, terrain displays as

0,0 0,1 0,2
1,0 1,1 1,2
2,0 2,1 2,2

Is this correct? Its like the PLSM2 expects pages to be named "name.y.x.png". Which is backasswards...:)..Does anyone know if this is correct or I do I have a flaw in my pipeline somewhere?

I can see PLSM2 using the top left for the origin, but I would expect it to keep the standard paradigm of left to right first, then top to bottom next.

I'm sure I can adjust the export/import process if this is the case, I just wanted to see if someone could confirm this is the case.

Anyway, thanks in advance!

-Troy

Falagard

30-04-2006 20:15:13

Yeah, it's backwards. Don't know why it was done that way but you can see it in the code when it's reading pages, it's z,x.

tlowe

30-04-2006 20:49:13

Thanks for the response Falagard. I'll compensate during my export/import process.

BTW, I'll be keeping an eye on your editor. I'd like to switch to that when you release it.

Thanks for the help!

-Troy

OvermindDL1

01-05-2006 12:49:22

PLSM2's method is how things are done internally with arrays, start at left to right, top to bottom. So I would say that other program is backwards. :P

Falagard

01-05-2006 14:56:25

Left to right, top to bottom would be x,z wouldn't it? :-)

OvermindDL1

01-05-2006 21:36:32

Yea, it is. :)

tlowe

01-05-2006 23:22:28

Yea, it is. :)

I'm not sure you read the posts fully then. I asked if PLSM2 ordered pages z,x instead of the standard x,z (where z is equivalent to y ala 2d graphs) and he confirmed it was backwards (z,x).

Ya?

OvermindDL1

02-05-2006 00:12:09

From what I recall messing with a while ago is when I pieced the split parts together, the first number was left-right, the second was top-down...