Final Fantasy Hacktics

General => The Lounge => Topic started by: Satchmo III on March 04, 2018, 06:16:18 pm

Title: Map exploration...
Post by: Satchmo III on March 04, 2018, 06:16:18 pm
Hail hackticians.

This thread will primarily document my exploration of and work with FFT's maps. I've been enamored with the aesthetic of the game ever since my first play-through as a middle-schooler over the course of two or three rentals from the local Hollywood Video back in the 90s. More than 20 years on, I think it's awesome that there's still a fan-base and that there are tools for people to play with the the game's assets and breath new life into it.

I dabble very poorly with programming (but I want to learn) and I'm decent at 3D modeling in Blender. About a year ago (near the end of 2016) after replaying FFT via the iOS port (which I recommend) I decided to try my hand at modeling the simple geometry of the iconic Orbonne Monastery. I had a vague notion that I might use pepakura or 3D printing to bring it to RL...that was the beginning of this ongoing project. Since then I've worked the form a couple of ways and learned a bit of programming and more about modeling.

I share some high-lights below for your interest. Please let me know what you think or if you have any questions, I'd like to help others however I can. I've done a pretty thorough review of the forum so thank you to everyone who has contributed to the understanding of the game maps (especially gomtuu). Most of the traffic concerning modding maps occurred between 2008 and 2012 so I hope there's still some interest here.
Title: Re: Map exploration...
Post by: Satchmo III on March 04, 2018, 06:17:19 pm
My journey began on-line. At the Caves of Narshe (https://www.cavesofnarshe.com/fft/maps/mapsingle.php?mapid=056) I found images of the four directions of the Orbonne Monastery map. I used a PDF markup program to scale the geometry and produced a simple mesh. I later learned the true dimensions of the mesh's polygons but when I began it was only important for the measurements to be accurate relative to one another (I figured a basic square polygon to be 1x1 units and then scaled the height of a basic step to be 0.44 units). Below is an overlay of my mesh on top of the image reference that I scaled.

(https://i.imgur.com/OHOKMg2.png?2)

I had some perspective trouble with the main roof and didn't know how to address the air terminal at its peak, but overall I was happy with the model. I enjoyed making it and wanted to make more so I went back on-line to seek out more references images. This brought me to the map resource at this very forum (http://ffhacktics.com/maps.php). I was pleased as punch to find the four directions (along with an overhead view) of all the game's maps. Since the overhead view was a straight-on perspective of the pixels, it started me thinking about actually texturing the models, but that wouldn't come until later. I used the four direction images and my scaling method to produce Magic City Gariland along with 17 more maps. Below is Gariland along with all the others (ignore the textures in the second image for now, that comes a bit later in this story).

(https://i.imgur.com/0VKiBYF.png?1)

(https://i.imgur.com/OhKgZH8.png)

Working through these ~20 models was sometimes a struggle. Parts of the model in the four direction images could be obscured from view or the texture material made it difficult to understand the polygon geometry (this was especially the case with the white snow at Fort Zeakden). This being the case I searched through the ffhacktics forum to see what more I could glean about the maps. This ultimately brought me to gomtuu's Ganesha (0.60) program (http://ffhacktics.com/wiki/Tools). Below is a screen-shot of Ganesha's interface.

(https://i.imgur.com/Gt6QG70.png)

In Ganesha, you can select any polygon on an actual game model and see the three or four coordinates of that polygon. This allowed me to understand the true dimensions of the basic square and step (28 and 12 units) and gave me info to fix any errors with my mesh geometry. Ganesha also shows a grayscale version of the actual texture image along with UV coordinates for each polygon when selected. This again made me think of texturing my models but I didn't understand the why the texture was in grayscale.
Title: Re: Map exploration...
Post by: Satchmo III on March 04, 2018, 06:18:00 pm
Since I now had accurate model meshes the next step in the progression was figuring out the textures. Ganesha allows you to export a map's texture image but only in grayscale so it wasn't terribly useful.

At the time I started to read gomtuu's excellent breakdown of the game's map files (http://ffhacktics.com/wiki/Maps) to understand more about what's there, but it was mostly greek to me (again, I want to learn more about programming but it's difficult for me to process code and hex and whatnot). I came to understand in principal that the game uses 16 different 16 color palettes that are applied to differing polygons of the map when rendered in-game. I don't understand exactly how this works but I was able to get a peak behind the curtain with gomtuu's map2GL map viewer program.

map2GL allows you to view the maps and export colored texture images but those images are with the 16 distinct color palettes that the game draws from to apply to the model (and not one image containing the appropriate palettes just where needed). Fortunately, the map2GL interface allows you to view each of the 16 texture image palettes with and without the used polygons drawn over them. With this, I took screen-shots of each texture image palette (with and without the used polygons drawn on), used Photoshop to layer all of the colored palette images, and cut out the non-used parts of each image...this resulted in one layered image (which I output to a PNG file) with the appropriate colors from all palettes in their proper places. The process is a bit time consuming but workable. Below is a screen-shot of what Gariland's layered image looked like in Photoshop. I'm sure a similar process could be carried out in GIMP or other image editing software which utilizes layers.

(https://i.imgur.com/FFBZt7S.png)

I won't go into great depth on the operation of Blender (unless someone has a question) but having a usable texture image is just a first step to texturing a model. The next step is basically to tell Blender how to lay the 3D polygon faces on the 2D texture image. Depending on the map and texture image this could be straightforward but where not I used Ganesha as a reference (remember Ganesha's interface shows the actual 2D UV coordinates for each polygon). With this process (and learning how to use alpha channels in Blender) I was able to texture my meshes. Below is Dorter Trade City in Blender. I textured six or seven of the maps I had produced (see earlier image).

(https://i.imgur.com/g5J6pYr.gif)
Title: Re: Map exploration...
Post by: Satchmo III on March 04, 2018, 06:18:26 pm

Satisfied with what I had accomplished in the computer I began exploring what I could do with the models. I 3D printed a small Orbonne Monastery as a gift for a friend. This was cool, but in all honesty it looked a little too simple.

(https://i.imgur.com/7MFjIXN.jpg?1)

I considered how I might utilize the pixel data on a printed model. I thought I'd print out the texture image on a sticker sheet and apply stickers to a 3D print. I never tried that but since I'm pretty familiar with the pepakura (papercraft) process I took that approach. I exported an OBJ with MTL file from Blender and opened it with Pepakura Designer. Pepakura Designer allows you to unwrap a 3D model, print the flat unwrapped parts onto card-stock paper, and then cut out and glue together the parts to assemble back into a (now physical) 3D object. This worked pretty well for Magic City Gariland. I haven't followed this form for any other map.

(https://i.imgur.com/Z98cooJ.gif)

Going back to the computer I thought I'd extend the FFT aesthetic to another good game, Metal Gear Solid. Just as the opening Orbonne is forever linked to FFT in my memory, the opening heliport setting is tied to MGS. I made the following with some very very basic textures (this was my first attempt at producing something like this). Some day I'll revisit/improve it and maybe make more.

(https://i.imgur.com/8SzgZr7.png)

Probably the only hacking I've done thus far came next. I cobbled together some python code to make a web-crawler to download all of the four direction reference images from ffhacktics. I think web-crawlers may be generally frowned upon by server managers but I figured hacking ffhacktics would be acceptable and appropriate. I wanted to have all of these references if I chose to make more models in the future.

(https://i.imgur.com/24Qwpuu.png?1)
Title: Re: Map exploration...
Post by: Satchmo III on March 04, 2018, 06:18:43 pm
A number of months passed before I'd revisit the project. Thinking back to that first 3D print and its simplistic look, this past January while I was recovering from some surgery I began detailing out the Orbonne Monastery model. At first I tried to make it from only one mesh which became complicated, when I abandoned that ideal and started using multiple objects it got easier.

(https://i.imgur.com/fylncEQ.png?1)

I've tried to maintain the relatively simple pixel aesthetic of the texture images while carving/adding the detail. Rasputin Lagasca made a really great detailed Orbonne Monastery model/animation (https://vimeo.com/97158350). Something like this is out of the scope of my abilities currently.

I finished up Orbonne, moved on to Gariland, and finished with Lionel Castle. I got fancy with the camera in Blender for Lionel Castle.

(https://i.imgur.com/Vdav344.gif)

(https://i.imgur.com/I4xr4yd.gif)

(https://i.imgur.com/zF1hEpu.gif)

Printing these out yielded pretty good results in my opinion. The last photo below shows all three detailed prints along with some other simple prints (can you guess which maps they are?).

(https://i.imgur.com/d2ju1xD.jpg?1)

(https://i.imgur.com/B8IpNYW.jpg?1)

(https://i.imgur.com/5DMs7N4.jpg?1)

(https://i.imgur.com/K0NcxYn.jpg?1)

(https://i.imgur.com/dzFtMkX.jpg?1)

(https://i.imgur.com/BvcFhAm.jpg?1)

(https://i.imgur.com/FPOVp6E.jpg?1)

And that is where the project rests as of today. Thinking about next steps, these are some things I may explore in the future.

1. Paint the detailed 3D prints.
2. Produce larger detailed 3D prints (print in sections and later assemble).
3. Develop 3D character models. Though since the pixel sprites are so awesome to begin with I'm not sure I want to mess with this.
4. Create other custom maps.
5. Investigate code/programming opportunities. I may need some assistance with this.
6. Explore other Ivalice provinces (Vagrant Story and FFXII).

Thanks again to those that are interested in the stage maps and thank you to those that are interested in this project. Please let me know if you have any thoughts or questions.
Title: Re: Map exploration...
Post by: Xifanie on March 05, 2018, 12:33:58 am
Holy cow that is impressive!
I can't even imagine how many hours you've put into that project.

I don't really have anything else to add... good job!
Title: Re: Map exploration...
Post by: Angel on March 05, 2018, 12:36:27 am
Well now I know what we need on our coffee table. Freaking amazing. Thank you for sharing!
Title: Re: Map exploration...
Post by: 3lric on March 05, 2018, 03:52:13 am
Great job man. Very impressive. I did several clay versions of FFT maps many years ago and then painted them but those were nothing compared to this. Again, well done.
Title: Re: Map exploration...
Post by: Cheetah on March 14, 2018, 01:59:39 am
Wow this stuff is incredible. I'm very impressed. I have always loved the map esthetic and have done some custom map work and even some simple Blender recreations, but those 3D prints are beyond awesome. Frankly I want them, would you be willing to share the files and printing instructions?
Title: Re: Map exploration...
Post by: Heisho on March 16, 2018, 12:00:41 am
I need that Orbonne print in my life.
Awesome job man.
Title: Re: Map exploration...
Post by: Rfh on March 24, 2018, 10:15:59 am
These awesome projects make this loved game never die. :)
Title: Re: Map exploration...
Post by: Satchmo III on March 29, 2018, 10:37:56 pm
Thanks everyone for your comments, I really appreciate them. I've been focused on other things lately and haven't done too much with this project but I wanted to respond and share a bit.

Xifanie, I'm able to imagine the number of hours I've spent on this stuff but I'd probably need a calculator if I tried to add them all up at this point.

Angel, the prints do make for neat little items to have laying around. With a group of them they're kind of like those little towns or villages some people put up at christmas time.

Elric, I'd be interested in seeing your clay models if you still have them about. I bought some clay a few years ago but was only able to form some rough blobs.

Cheetah, see below.

Heisho, see below.

Rfh, it's a good point. FFT is such a gem, it's lovely that there are places like this site where people are interested in extending its lifespan.

I made some simplifications to the Orbonne model to make it a bit easier to print and I'd like to share it with the community. There's a link below to my OneDrive account to download the STL file. If you go to it, OneDrive provides a navigable 3D preview of it in your web browser (I thought this was a cool discovery). Edit: Hmm...after checking it out I think the preview only works if you're signed into OneDrive (or maybe it only works for the owner of the file).

https://1drv.ms/u/s!AkPPZafpaLOJgYAoN9r4Ejpg2tccbQ (https://1drv.ms/u/s!AkPPZafpaLOJgYAoN9r4Ejpg2tccbQ)

As far as print instructions I can only describe a little of what I did. I made the Orbonne print with no supports, a 0.28 mm layer height, and 20% infill. It started out with ABS plastic, but was switched to HIPS about 2/3 of the way through when my ABS ran out (if you look at the photos you can see the slight variation in gray colors at the arch above the front door).

I'd love to make and share some prints for a fair price (or trade) if anyone is interested. I'm not trying to just hawk some wares...it'd be really cool to sell something I made to someone who would appreciate it. Please let me know.

May you find victory in battle, hackticians.
Title: Re: Map exploration...
Post by: Satchmo III on April 01, 2018, 11:34:08 am
I mentioned previously that I'm a fan of Metal Gear Solid. I really dig the character Olga (aka Mr. X) from the second game and love her cyborg ninja getup. I modeled the helmet about four years ago based on some photos I took off my TV when playing the game and spent a bunch of time searching online to see if I could acquire the actual model (helmet and suit) to compare to my work. I found some good leads, but all associated links were old and dead. I shelved the project until recently (after modeling the FFT maps I wanted to expand the practice). Kojima (or Konami) had put out a PS2 "game" that contained a sort of making of for MGS2 which I was able to pick up cheaply from eBay. It had character models you could freely rotate and some concept sketches that I used for reference which helped immensely to check the scaling on the helmet and make the suit.

All that is to say...here is a cyborg ninja chilling alongside the canals of Magic City Garliand.

(https://i.imgur.com/uPtgBp2.png?1)

I'd like to make a FFT sprite for her, and need to do some research here to figure out how. In the meantime, I'm exploring CG animation with Blender, and on Friday I put a rig on the Mr. X model and made a walk animation. It's not unlike the FFT's sprite animation battle walk (which gives me an idea for a future project branch).

(https://i.imgur.com/n1Gtvca.gif)

Although I'd like to make a character sprite someday, I was able to make a FFT style portrait for her yesterday. I read somewhere here that the game limits the portrait (and sprite) color palette to 16 so I followed that rule and sampled colors off of existing character portraits. I assumed the background is one of the 16, but if it's not I could add one more color. The color limitation, and more so the pixel limitation, really forces you to make hard choices. I tweaked it a bunch and could probably keep making tweaks but I think it's passable now. Let me know if you have any constructive criticism. I'm going to use it for my avatar, but below is a copy in case I change it later.

(https://i.imgur.com/7BFi1Zx.png)
Title: Re: Map exploration...
Post by: Twinees on April 02, 2018, 06:55:55 am
Quote from: Satchmo III
I read somewhere here that the game limits the portrait (and sprite) color palette to 16 so I followed that rule and sampled colors off of existing character portraits.

Perfect! That's definitely the best way to go, and it looks like you've chosen colours that match well too. Rule of thumb is that 99.5% of the colours you will need already exist in game and I'm glad you've adhered to that.

Quote from: Satchmo III
I assumed the background is one of the 16, but if it's not I could add one more color.

Correct, the background counts as one of the 16.

I'd like to offer some criticism and hopefully it helps. I think the helmet needs a little more shape and definition at points in terms of metal plating (the general outline of the helmet is really well shaped though). The concept art I looked up had dark lines like you've used towards the back of the helmet continue on the front too, so I think that would be a good way to start defining the shape of the metal more. The neck is pretty thick, it could probably be at least a tad smaller.
Would you like me to spend 10-15 mins doing some quick edits of the portrait to help you out? I'd rather ask permission first instead of simply going ahead and messing around with your art work :P
Title: Re: Map exploration...
Post by: Satchmo III on April 02, 2018, 11:32:14 am
I appreciate the feedback Twinees! If you'd like to take a crack at making some improvements I welcome your experience and am interested in seeing your take. Thanks in advance.

My intent was for the light to be more or less directly in front/above the face. The shaping of the visor is a subtle thing and I actually started with more defined outlines but cut it back to try to let the shadow tell the story. I've been thinking the visor could wrap around more as it goes from front to back (using less straight lines). It's my first concentrated effort to produce pixel art, it's so simple yet so complex at the same time (kind of math kind of art) which makes it fun.
Title: Re: Map exploration...
Post by: Twinees on April 02, 2018, 12:35:17 pm
Great, hope this helps convey a little bit about what I meant in my post. I didn't finish off a lot of it, left it rough in places, like the back of the neck and top of the head. The blue shoulder strap thing could probably be improved too as the last thing. Should be 16 colours still too. I'm keen to see whether you design a sprite to go along with it!

(https://i.imgur.com/MlbAhYz.png)


Quote from: Satchmo III
My intent was for the light to be more or less directly in front/above the face.

Yep, that's how it should be :)

Also I forgot to mention how much I like those 3D printed maps! They look really fucking cool. Great job. I'm really interested to see what else you work on! If you need any more help regarding pixel art things, let me know.
Title: Re: Map exploration...
Post by: Satchmo III on April 07, 2018, 06:11:25 pm
Thanks for compliment on the 3D prints. I'm planning to paint them (at least Orbonne), and think then they'll really pop.

And thanks for the portrait workup. I can definitely see the shape more, especially with the visor, and I really like the shadowing at the front of the neck. I'm going to try to incorporate some of your ideas into a new version.

Quote from: Twinees on April 02, 2018, 12:35:17 pmIf you need any more help regarding pixel art things, let me know.

I appreciate that. Have you ever thought about creating pixel art for custom maps? It seems like it'd be a major undertaking...but it'd be super cool to marry the right 3D map with the right texture art. Maybe we could collaborate sometime.

Below is my first (and incomplete) draft of a sprite for Olga (I should call her Mr. X or some iteration of cyborg ninja...but I like Olga) including front walk cycle GIF and PNG of the sprite sheet (PNG format for incomplete sheets per a FFH banner notification I saw). There's a bunch that can be improved but I think it's at an okay resting point before making revisions. If you, Twinees, or anyone else has constructive criticism or suggestions then I'm all ears. As always, thank you everyone for your interest and take care.

(https://i.imgur.com/XnzbEKi.gif)

(https://i.imgur.com/wDGHSWM.png)
Title: Re: Map exploration...
Post by: Twinees on April 13, 2018, 09:20:05 am
I don't have much time so I can't properly reply at the moment. But first thing is that sprites use a different 16 colour palette in relation to the portrait. The sprites also use quite different colours, so start from there :)
Title: Re: Map exploration...
Post by: Valkirst on May 18, 2018, 08:03:48 pm
Well Satchmo, what you do is on a whole other level! Have you been working on your sprite more? You have a great artistic eye, I will help with what I can but, I imagine by now you have already put more work into your sprite. Twinees is the man though!
Title: Re: Map exploration...
Post by: Satchmo III on May 27, 2018, 01:34:20 am
Thanks Twinees, I did not understand that the sprites use different palettes than the portraits. It makes sense, just didn't occur to me.

I haven't worked very much more on the sprite, Valkirst. It's definitely something I'll return to.

I painted the Orbonne model a couple weeks back. The last thing I think I painted was a popsicle house a number of years ago...my skills are not great and there are things that need to be touched up. When I was painting I didn't think things were coming out very well, but after the acrylic paint dried out the colors looked better. I managed to break off the air terminal at the top of the roof (who could see that coming?) and subsequently managed to lose it somehow...I'll have to print a replacement and call a roofer to get it re-installed.

Below are some pictures of the rough paint. Take care everyone.

(https://i.imgur.com/gaA6UkV.jpg?1) (https://i.imgur.com/gaA6UkV.jpg?1) (https://i.imgur.com/1SttAbQ.jpg?1) (https://i.imgur.com/1SttAbQ.jpg?1) (https://i.imgur.com/ZNZWkGi.jpg?1) (https://i.imgur.com/ZNZWkGi.jpg?1)
Title: Re: Map exploration...
Post by: Satchmo III on June 23, 2019, 06:27:02 pm
Hola hackticians!

I've been sifting through the gilded zeroes and ones of the game, like a machinist recreating forgotten and mysterious technologies of old. I'm trying to get more serious about taming some Python and made some appreciable progress over the last 10 days or so. If not for gomtuu's mapping of the map files I'd have no clue how to proceed so thanks again to him. I'm in no position to make a map viewer like he has but I'm enjoying slowly retracing his steps and learning more about the game and programming/computers along the way.

Back when I was modeling/texturing map assets I was using map2gl to take screen-grabs of the texture images with each of the 16 palettes applied and splicing them together with Photoshop. My workflow was okay but slow and tedious. After explaining to Python where to find and translate the disk info I was able to automate the production of gray-scale texture bitmaps as output from Python code. It's been a struggle writing a working script, but it was exhilarating to run it last night and populate a folder with all the textures. Below is the function I defined to accommodate this, which I ran from a short py file to work through all the map files. There are actually multiple versions for most maps but they have only minor differences (some are used for alternate times of day with different shadowing and such that I don't think were used very much in the actual game).

(https://i.imgur.com/GKHac8f.png) (https://i.imgur.com/GKHac8f.png)

The gray-scale images contain 16 shades of gray, and colors get applied to those shades when a map is loaded in the game. I haven't yet investigated this data yet but I spent time today working with the hex chunk of the map mesh file for Orbonne that identifies the 16 color palettes and each palette's 16 colors. I was able to successfully output a 16x16 image replicating the palette just like gomtuu programmed for the map2gl. I was elated when this worked. For this portion of the work I spent a good amount of time looking at the hex info and trying to parse out and translate hex to binary or decimal before actually programming. Taking notes and writing things out was a helpful precursor to actual programming. I only ran the script on Orbonne, but I'll be wrapping it up and making it work across all mesh files. Below is my program window in front of the texture editor from map2gl for a clear comparison.

(https://i.imgur.com/vlLy54z.png) (https://i.imgur.com/vlLy54z.png)

That's it for now. It might not seem like much to experienced users but it was a hard fought climb for me. My next summit will be to better understand how the different palettes get applied to different areas of the texture images and then it's on to working with the 3D information. I intend on figuring out a way to make OBJ files to import into Blender with MTL files to apply UV textures.

For fun, below is a GIF cycling through each map's primary gray-scale texture image. I'm going to take a break for a bit (hopefully not a year this time) but I'm excited to continue on and keep unearthing ancient machina. Until next time! Take care everyone!

(https://i.imgur.com/uElKa5D.gif)
Title: Re: Map exploration...
Post by: Satchmo III on June 30, 2019, 11:33:34 pm
I wrote code this weekend to open a mesh file from the game and write the vertex, normal vector, and UV coordinate information to an OBJ file. I only worked with 056 but the code should work for any of the mesh files. I had to play with the UV info a bit so the coordinates translate to Blender (things like dividing the coordinates derived from the mesh file by the texture image file size (i.e. 256 for the U and 1024 for the V) so the OBJ file contains UV values from 0 to 1). In Blender with the gray texture map brought in...

(https://i.imgur.com/YgpCNOa.png)

There are a couple issues I need to work out. The first one I don't think I really mind at this point but the normal vectors all appear to be facing inward even if I reverse them in the OBJ file. To reverse them I'm just multiplying each of the X, Y, and Z portions of the vector by -1 and I'm not sure why this wouldn't do the trick but Blender shows the normals pointed inward either way. Perhaps I mistranslated some of the bytes to begin with.

The second issue definitely needs to be fixed. The UV coordinates as they've been outputted from the mesh file are off slightly. I noticed this issue with the Ganesha viewer and early on in my map exploration days I was correctly placing UV vertices manually anyway, but there must be a way to resolve this by modifying the data when coding and creating an OBJ file.

For each tri polygon one vertex needs to be shifted +1 X unit, one vertex needs to be shifted -1 Y unit, and one vertex needs to be shifted +1 X unit and -1 Y unit. This is the same for three of the vertices of each quad polygon, and the fourth vertex stays put. For one of the triangles, below shows the UV output from the mesh file at the left and my manual adjustments to correct it on the right.

(https://i.imgur.com/7h1FpK1.png)

I was hoping I could easily fix this by adding the appropriate units to each UV coordinate in my code, but when iterating over all tri vertices (although the tri above was fixed) the order of the vertices in other tris appears to be different so the units were added/subtracted incorrectly depending on the polygon. It isn't clear to me currently how to resolve this, but I suspect it has something to do with the order of the vertices in the mesh file. I'll need to figure this out to both correctly apply the texture to the model mesh and to be able to parse out how the color palettes get applied to the gray-scale texture.

I haven't worked any with some of the more game specific mesh file data like terrain types or polygon visibility parameters. I don't think I'll bother with this stuff until (and if) I try to build a new map and back load it into a mesh file.

May you taste of victory until next we meet, Zodiac Braves!
Title: Re: Map exploration...
Post by: Satchmo III on July 11, 2019, 01:57:53 am
I believe the UV coordinates have been fixed. gomtuu's explanation back in 2010 will be better than I can explain (LINK (http://ffhacktics.com/smf/index.php?topic=2479.msg120316#msg120316)), but essentially instead of moving certain vertices to increase the shape's size the solution was to shift the entire shape by 0.5 pixels in +X and -Y directions (really +U and -V in the parlance of texturing). This seems a bit strange because there's technically an unused texture border around each polygon on the UV texture, but even so when it's applied to the model the texture looks seamless.

I've had some success in looking at the gray-scale texture image and applying the correct color palette to correct polygon areas of the image, though I'm having some difficulty parsing out how to instruct python to correctly loop through all of the pixels in the bounds of every polygon. Below is where I'm at currently after trying to focus just on the quads, though not all of the quads actually got looped through it seems.

(https://i.imgur.com/YkjYWP2.png)
Title: Re: Map exploration...
Post by: Satchmo III on July 12, 2019, 09:40:37 am
Success! I iterated through each UV polygon to determine each UV polygon's max/min U and V coordinates and then iterated through each coordinate set to check each pixel's grayscale color and then swapped it with the appropriate real color from that UV polygon's color palette to create a color version of the texture image.

Since some UV polygons overlap, this process would happen more than once and changed the pixels in the area of overlap a second or third time to an erroneous color. To solve this I first checked if the pixel was one of the original 16 grayscale colors and if it wasn't, to ignore changing the color. That way the pixel only changed once, the first time it was converted from the grayscale to the color.

I've only ran the script for two maps (shown below) and am pretty happy with the results. I'm traveling out of state this weekend and won't be able to automate things more until I get back. Until the next update, take care reader.

(https://i.imgur.com/GLOnv5D.png)
Title: Re: Map exploration...
Post by: Satchmo III on July 22, 2019, 01:43:52 am
I wrote code to read each map's GNS file to determine if the game files for each map contains mesh or texture info. Only a few maps have a single texture...most have multiple full size texture images each with subtle differences (usually varying degrees of shadowing). Each map has multiple mesh files also, it seems like one primary mesh file and a bunch of others with very small file sizes. I suspect these smaller files have something to do with animation tiles and/or moving mesh parts...I haven't seen things like moving windmill blades in the primary mesh files as of yet.

I iterated through the map files to create OBJ and PNG files that I then imported into Blender. A small amount of the maps have some minor pixel color issues (if you look closely below you can see some blue where there shouldn't be blue on a couple of the maps) and 20 maps had messed up vertices. I'm a bit surprised by these glitches since 90% of everything else came out looking good...I'll be investigating these issues and looking into the moving things.

(https://i.imgur.com/69m8G8O.png)
Title: Re: Map exploration...
Post by: Valkirst on July 23, 2019, 12:41:22 am
Holy hell man! (or should I say"Dark Holy") This is all such amazing work I had to re-read through most of it to even barely begin to grasp what it is you are doing but it looks amazing.
Title: Re: Map exploration...
Post by: CoderBrandon on December 15, 2019, 02:22:30 pm
This is absolutely incredible work! Well done!

Awhile back I did a deep dive trying to do exactly what you've done and I only managed to get a very rough 3d model with completely broken and mis-paletted textures that would crash Blender but could be opened with some other 3d model preview programs. I got frustrated and quit shortly after that as I'm fairly good at programming but I'm terrible with 3d modeling.

I've been wanting to make a papercraft version of some these maps for years. @Satchmo III - Do you have a link where I can download the Blender files for these? And/or a link to the script you created to convert the raw map data into a Blender object?
Title: Re: Map exploration...
Post by: bizenboat on August 11, 2020, 08:37:15 pm
I'm a little late to the party, but I'm also super interested in porting maps into Blender for a project and I'm really impressed with the basic models, not to mention the detailed versions of Orbonne and Dorter. I tried sending a message to Satchmo but don't know if he's around anymore... anyway, I will take a look at this myself but just wanted to leave a message here in case Satchmo comes around and can save me a ton of time and frustration.
Title: Re: Map exploration...
Post by: Zaibach333 on August 07, 2021, 11:07:44 pm
What has become of this? Resin printers have gotten cheaper and I thought I had only dipped my feet into this stuff but you've made a heck of a lot of progress already.

Well done, many years late but well done.
Title: Re: Map exploration...
Post by: nitwit on August 08, 2021, 06:06:09 am
In b4 the mandatory chastisement for wasting a while kilobyte of database storage.
Title: Re: Map exploration...
Post by: 3lric on August 08, 2021, 12:56:44 pm
Quote from: nitwit on August 08, 2021, 06:06:09 amIn b4 the mandatory chastisement for wasting a while kilobyte of database storage.

Nope, I gave him the link myself, he was interested in 3D prints of maps. Necrobumps aren't an issue if it's actually relevant and there are no other existing topics that cover a thing they are needlessly necroing about. As are 95% of necroposts

(Also database has never been the reason any forum cares about necroposting)
Title: Re: Map exploration...
Post by: Zaibach333 on August 10, 2021, 12:45:50 am
Hope you don't mind I used the Orbonne Monastery stl file from earlier in the post.

(https://imgur.com/c4lc8b7.jpg)
(https://imgur.com/DTway6L.jpg)
(https://imgur.com/CCZ24OL.jpg)
(https://imgur.com/CLOfBRs.jpg)
Title: Re: Map exploration...
Post by: Araujo on August 10, 2021, 05:03:51 pm
The very idea that we might be able to 3D print Maps from FFT is absolutely amazing and i would really like to have access to more.

Looking online i have found Magic City Gariland ( https://www.thingiverse.com/thing:1596726 )

And with this, that makes two. Im pretty sure you can scale these up and slide in 4 equal parts to make it into a bigger map... but more experimentation is needed.
Regardless, are there any more STL files of Other FFT maps?

If anybody has access to these, please do share!
Title: Re: Map exploration...
Post by: Satchmo III on February 08, 2022, 03:54:20 am
Hi FFHackers! I apologize for not responding to anyone for, well, years at this point.

Though I haven't been able to continue my map exploration since my last post, my heart has never forgotten it. My memory isn't quite as good as my heart, but I'd like to dust things off maybe in the near future. Thanks to everyone for your interest and I simply love what @Zaibach333 was able to achieve with the Orbonne Monastery!

If you're interested in learning more about the maps you should check out the #map-editing thread on the FFH discord server. The community is doing wonderful things over there! Take care hackticians!
Title: Re: Map exploration...
Post by: Nofizo on February 22, 2022, 01:06:44 pm
Thank you for sharing, I love all the works presented in this thread. I would love to get 3D pring and install it in my property in Spain. Would be really fun, will look into this idea more closely next month.