Qhimm.com Forums

Miscellaneous Forums => Scripting and Reverse Engineering => Topic started by: Micky on 2011-06-24 20:34:26

Title: [ff7, field] Field map tile positions
Post by: Micky on 2011-06-24 20:34:26
Just a small update to http://wiki.qhimm.com/FF7/Field_Module/DAT/Tile_Map
I think the first u16 in section 1 was always considered to be sorting depth for the tile. I thought I could do a cool visualisation based on that, so I wrote it out into a mesh file. Unfortunately it seems to be simply the Y coordinate of all tiles in that group. Sigh. (Unless of course there is a silly bug in my viewer.)
Title: Re: [ff7, field] Field map tile positions
Post by: Akari on 2011-06-25 07:14:59
Ist section used to determinate number of tiles in sector and time when read tex page and type of image (bit per point) and blending type from sector3.
You can see how it handled in PSX here http://q-gears.hg.sourceforge.net/hgweb/q-gears/q-gears/file/8d1a3dd91c4a/reversing/ffvii/ffvii_field/load/background_load.cpp (look for // init packets for background function)
Or you can see it's interpretation in my exporter code http://q-gears.hg.sourceforge.net/hgweb/q-gears/q-gears/file/8d1a3dd91c4a/utilites/ffvii_field_dat_dumper/src/DatFile.cpp (look for function DumpBackground)
Title: Re: [ff7, field] Field map tile positions
Post by: Micky on 2011-06-25 13:04:50
Thanks! I changed the distance field and now it is a lot closer to what I expected!
Title: Re: [ff7, field] Field map tile positions
Post by: halkun on 2011-06-26 03:46:24
What does it look like? Screenshots?
Title: Re: [ff7, field] Field map tile positions
Post by: Micky on 2011-06-26 14:51:20
This is with the camera moved, and the walkmesh projected into view space:
(http://bin.mypage.sk/FILES/field_yufie.jpg)
Most of the tiles are completely behind or in front of the walkmesh, only a few tiles you can walk both in front of and behind are actually set at an appropriate depth. Most noticeable in this is the room divider. (And in this scene a lot of surfaces are marked in the walkmesh without actually being reachable.)
I was hoping that they have an automated process that calculated the tile depth automatically from a rendered depth map, but it looks like it was mostly manual artist work. Otherwise I could've extracted more depth information from the rendered image.
(http://bin.mypage.sk/FILES/field_ancient.jpg)
And this is the opposite, field tiles projected with the inverse of the camera matrix into walkmesh space. (Just got this to work after fixing an absolutely "Doh!"-worthy error.)
Title: Re: [ff7, field] Field map tile positions
Post by: halkun on 2011-06-26 18:13:41
neat-o
Title: Re: [ff7, field] Field map tile positions
Post by: obesebear on 2011-06-28 15:13:02
Very cool indeed.
Title: Re: [ff7, field] Field map tile positions
Post by: Mako on 2011-07-01 16:56:14
Sum 1337 stuff! :O I can't even begin to comprehend how you can display 3D data from a walkmesh and a 2D image?!?! Seems impossible, but you did!
Title: Re: [ff7, field] Field map tile positions
Post by: Micky on 2011-07-02 15:05:13
Sum 1337 stuff! :O I can't even begin to comprehend how you can display 3D data from a walkmesh and a 2D image?!?! Seems impossible, but you did!
?
The walkmesh is 3D already, it is required to correctly blend the character into the scene. And there is depth information already in the 2D image, so that you can sort the graphics correctly depending on what the character is behind or in front of.
This is comparable to a slide projector at the camera position projecting the field background into the world. Halkun did something similar in SketchUp manually a while ago.
Title: Re: [ff7, field] Field map tile positions
Post by: Mako on 2011-07-02 17:31:07
Simple! Not, us lower being just see you pulling a 3D model out of a 2D image. :P Also I know how halkun did it... he just projected a photo and matched it. (same effect)

Still pretty cool to see :P. Though I did know that FF7 used 3D data in its walkmesh.