[FF8] world map and objects (world.fs)

  • Thread starter Thread starter Halfer
  • Start date Start date
Status
Not open for further replies.
Oh I think it is because I have software rendering on from ff8config. I'm using laptop with gt 840m and HD 4400 and for some reason with both graphic cards I can't use direct3d acceleration because it does this:

436bf9783397426bfdabffce749e5a55.png


ec31a651434ace2208e502d9afa6e3e3.png


Any solutions for this?
 
So, I tried to analyze a bit more wmx.obj and this is what I got.

Near the end are the sections that are placed to world map according to game progression:
013397864e4a1658858d9f4f0e9f65b2.png

4f04e6b95d74169ee6cc46c0a056a638.png
0642dc09aba5e91f6173e672456e8ca9.png

And also there is the whole area which is showed in place of esthar.

I also found that the crater done by Lunar Cry is there but for some reason the area is split in two and the parts are next to each other like this:
dbacef8939591c198bb1013049b711ae.png
51fdb11084b280e2c6a744b46cfd8321.png


You can see that they are horizontally next to each other while in game they should be vertically on top of each other.

This led me to think that most likely there isn't a simple algorithm to read this file in the engine, but somehow it's described which sections corresponds which area. So it's either somewhere in wmset files or described in engine which would be unfortunate for us. I'll try to search more info for the placements.

EDIT: Can someone confirm if the wmset.obj contains japanese texts? There seems to be text differences between these files.
 
Last edited:
Will there be any way to change the UV of the textures, since they aren't seamless in the PC version?  It looks like the UV is about 15% too large.
 
Sure, but this can take some time, Halfer is making amazing progress, and after we know how texturing works I could convert data to UV mask only, fix it up and re-parse to FF8.

Edit: I tried to trick game to think I am ragnarok and can pass mountains, sea etc. but no luck. I'll try with coding sea and mountains as grass, thanks to Halfer I know it's possible to do, and where to search.

While coding ultimate hack found this:
71e2895288.jpg

Probably GPU related, but it's fun. :D
 
Last edited:
Good news guys. I finally managed to crack the UV placements and no wonder it was so hard because I didn't realize they are picked from psx emulated framebuffer. Well I'm gonna do a little more research and write here at evening how it is read from the file. Get ready! :D
 
Last edited:
UPDATE!

wmsetusXX.obj contains world map textures. The object textures used for grounds are size of 128x128 pixels. Here's an example:

cba83486c113ed7dcf814002ba415f1e.png


Here is 1 block which includes the first 4 textures from wmsetusXX.obj. There are 16 polygons and/or 32 triangles in one block. Each polygon has been made to show 4 32x32 texture area which are the small square areas in the image above.

As I described geometry before I wrote UV coordinates also while I hadn't researched it much yet. Turns out I was correct, but here's better struct with explanation after:

Code: [Select]
Code:
struct{        u8    face indices [6];         // Describes which indices are connected to each other. See first post, there is an example of face indices for blocks used in sea.        u8    U vertex 1;        u8    V vertex 1:        u8    U vertex 2;        u8    V vertex 2;        u8    U vertex 3;        u8    V vertex 3;        u4    Texture page [4-bits];    // This changes the texture page according to value (0-F)        u4    CLUT_ID [4-bits];          // The current palettes CLUT info. This needs to point for the texture you are using (first row 0-3, second row 4-7, and so on...).        u8    Material type;             // Defines if the geometry is mountain, forest, sea or so on.... (00 seems to be forest)        u8    Unknown;        // I'm not quite sure what this operates, but it seems to change texture pages too. Currently got only the sea textures while changing the value.        u8    Unknown;       // Also unknown, however the last 4-bits seems to operate collision somehow}Triangle
Now for the UV's. Each UV must be set according to triangle's face indices. UV values are from 00 to FF. They are set to indicate a rectangular area where the texture is present in current texture page. For example, if you have 128x128 texture and you want to fill a block with 16 polygon, you have to give each U and V coordinate a value in 2D axis where (0,0) indicates top left corner and (FF,FF) bottom left corner. The textures used in wmsetusXX.obj are 128x128 and it contains 16 32x32 textures so if you want to give a specific texture, you set each face indices UV's to the corresponding area by scaling UV's according to texture location on the page.

Here's an example how I did the image above (and great demonstration of my paint skills  :evil:):

1bc8fba600a7c86059da8dba48481337.png


Blue dots are face indices. In this example the top left dots values are (U = 0x00, V = 0x00).
Middle dots values are (U = 0x7F, V = 0x7F).
Bottom right dots values are (U = 0xFF, V = 0xFF).

This indicates that the UV area contains the whole area. While there is now 4 polygons used for showing one texture, you can set the area inside 1 polygon also. It's also possible to enlarge it, but it needs more "waypoints" (dots) to determine in between the desired area and making it manually is frustrating.

So, this means that in theory it is possible to use large textures in world, but since the memory space is limited it may be difficult. I'll look on this later.


If you have questions please ask. I'm pretty tired and noticing my own mistakes and the "shortness" of this post makes me think I may have forgotten to explain something so ask if there's something you don't understand or needs a little explanation.
 
Last edited:
But the tile system has also information for low res textures. How does the game handle these? Are they also stored in wmsetusXX.obj?
 
Actually these are the low-res textures. The higher resolution textures are stored in texl.obj and as far as I have been informed they are used when not in ragnarok (or any other vehicle?). I'm using Aali's drivers to run the game in direct3d mode, but for some reason my game isn't using these higher resolution textures like it doesn't if running with software rendering on.

Oh and here's a picture with all the texture pages showcased on the 2 top rows:
691668b0d4b00675166799895f329b21.png
 
Last edited:
Halfer, excelent work. Will try this on my own.
Oh, by the way- try to completely delete texl.obj file and see what would happen.
 
The Steam version shows the high res textures but if you open and close the menu the game falls back to the low res ones.

Halfer, excelent work. Will try this on my own.
Oh, by the way- try to completely delete texl.obj file and see what would happen.
Maybe re-name texl.obj to wmsetusXX.obj do would work to force the game to use the high res textures.  ???
 
Last edited:
Tried it before, no changes :( . That's interesting, I wonder if it was accidentally left out in the old release.
 
I guess some one with the steam version here could send you these files. I'm currently not on my notebook so I can't.

By the way doesn't Aali's driver run the game trough OpenGL?
 
Yeah it does, that's why I'm guessing that this problem occurs on my PC. I posted pictures couple posts back where you can see what happens when i run the game in direct3d. Actually now that I remember it does this only when I set it on windowed mode. Haven't tried it in full screen.
 
The high-res textures are only used in the Steam version. The original PC version will never use them.
 
The high-res textures are only used in the Steam version. The original PC version will never use them.
Were they just never implemented into the PC game, even though the files exist?

Sounds like they had to rush it, considering the UV/walkmesh in the PC version is also incorrect.
 
It seems more likely the high-res textures were cut out due to performance issues. The worldmap module in FF8 is extremely inefficient and I doubt it ran very well even on mid-range hardware at the time it was released.
 
I added a nice feature to my ultimate mem/asm hack, this loads map portions by offset to specific memory blocks, to make the map tile by this specific uploaded chunk from wmx.obj (real-time).

Take a look at this video:

It really looks like it goes by role like from top left to bottom right with horizontal lines. Just like you wrote Halfer. :)
I'm going to do a test by changing camera root position*, leaving Squall safe on sea, so he can't catch exception, and auto-rotating camera tangent X for something like "showcase" of WM chunks. :D

*See more cool camera features available to hack at: http://wiki.qhimm.com/view/FF8/Engine/WorldMapCamera
 
Last edited:
The zoom looks cool!

Anyway I'm really happy to see you're making big steps here!

Are you planning to create an exporter for the world map mesh like the one you did for battle stage?
 
All thanks goes to Halfer. He is a master here. ;)

WMX is structured the other way than battle stages. Stitching 837 chunks can be painful to code. I ought to think about completely fresh solution to perform conversion.
 
Great! :D Happy to be helpful here!

Looking forward to your tools, seems like you have put much effort for these tools! Keep it up :D.

I think that exporter could be a good thing but leaving it as an exporter/importer wouldn't make much sense. The problem would be the way FF8 engine handles the file, like Aali said earlier. It needs a bit more studying how to implement more complex geometries to FF8 without crashing the game/slowing it down significantly. Speaking of geometries, textures are the underlying problem right now. Maybe for starters the exporter/importer could work as a tester for engine capabilities. Maybe in the future the program could be a proper editor with 3d view.

By the way, MaKiPL, have you encountered to crash on world map with camera zoom (under 300) when flying ragnarok on top of esthar and flying back to bridge? For me it seems to mess up the textures from the bridge and after that crashes.
 
Last edited:
Status
Not open for further replies.
Back
Top