Author Topic: field backgrounds Zone2 sprites Z coordinate  (Read 4160 times)

Wolfgang

  • Guest
field backgrounds Zone2 sprites Z coordinate
« on: 2009-10-24 18:24:12 »
I've been looking for a time about those files and trying to display them. But i was wondering about the Z texture coordinate, that has to determine the order of painting algorithm over the model. I know that Z has a 4 byte size but it's not a floating point value because it's representation it's too small to simple be it. I was wondering if it could be possible that Z coordinate along with X and Y where on a fixed point like angles in battle movement and need to be divided by 4096.

Thanks.

Cyberman

  • *
  • Posts: 1572
    • View Profile
Re: field backgrounds Zone2 sprites Z coordinate
« Reply #1 on: 2009-10-24 20:35:18 »
I've been looking for a time about those files and trying to display them. But i was wondering about the Z texture coordinate, that has to determine the order of painting algorithm over the model. I know that Z has a 4 byte size but it's not a floating point value because it's representation it's too small to simple be it. I was wondering if it could be possible that Z coordinate along with X and Y where on a fixed point like angles in battle movement and need to be divided by 4096.

Thanks.
Good question however there are quite a few Final Fantasy Game/Square soft games etc. So what particular ... game file type etc. are you speaking about?

Cyb

Wolfgang

  • Guest
Re: field backgrounds Zone2 sprites Z coordinate
« Reply #2 on: 2009-10-24 22:05:33 »
Ouch! >_< I totally forgot xD I'm speaking about FFVII field format PC.

Aali

  • *
  • Posts: 1196
    • View Profile
Re: field backgrounds Zone2 sprites Z coordinate
« Reply #3 on: 2009-10-25 13:59:41 »
It's a fixed point value but you need to divide it by 10000000 (ten million) instead of 4096.

See Palmer for a (hopefully) pixel-perfect viewer.

Wolfgang

  • Guest
Re: field backgrounds Zone2 sprites Z coordinate
« Reply #4 on: 2009-10-25 16:38:44 »
I've already seen it working it's very good :wink: But i don't understand exactly why in scenarios like shinra mansion hall (bsinin1_1) the "second layer" gets divided in two when it's exported. The door obviously it's in a third because it's animation and they should be separated from the rest. And now that i see the number to divide it turns funny, much greater than i though. Because in my firsts attempts i was dividing for 8192 because in that scenario in particular one of those Z became 1  :-D

Aali

  • *
  • Posts: 1196
    • View Profile
Re: field backgrounds Zone2 sprites Z coordinate
« Reply #5 on: 2009-10-25 17:54:28 »
The export tries to pack as many non-overlapping tiles into as few png's as possible, with the exception of animations and additive layers.
Sometimes this gives good results, sometimes it ends up all messy when something from layer2 partially overlaps layer1. (Or when layer2 contains a lot of overlapping tiles)