Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2

Author Topic: Blocky Map App  (Read 15653 times)

mapper

  • Escaped Lunatic
    • View Profile
Blocky Map App
« on: April 24, 2015, 01:43:04 pm »

View world maps in 3d. This program makes a 3d model of an elevation map and colors it using a color map or based on the height of the terrain. Screenshots album: https://imgur.com/a/seONL

Updated from original unversioned release to v1.0. Changes include:
  • Save map configurations. Draw maps with a single click instead of setting them up each time.
  • Find my maps. Creates map configurations from the map files managed by the starter pack.
  • Landmarks. Load a .xml file with landmark data. Landmarks are superimposed over the map.
  • Fixed coastlines. No more cliffs or steep dropoffs along coastlines.
  • Water quality. 3 choices for water quality: simple, reflective, and refractive.


To use the Find My Maps button install this program alongside the other utilities in the starter pack. (<starter pack install location>\LNP\Utilities) If you install this program somewhere else edit the settings.xml file to change the path to your "User Generated Content" folder. Multiple <path> elements are allowed.

Thank you to lethosor for his ideas about landmarks and to PeridexisErrant for the correct interpretation of DF heightmap data and other feedback.

Instructions for previous version:
Spoiler (click to show/hide)

Troubleshooting:
If you have missing chunks like this:
Spoiler (click to show/hide)
The problem is that the geometry in the missing chunks has gone over the built in limit for unity. Lower the chunk size with the slider in the map configuration screen to reduce the amount of geometry per chunk and draw the map again. Larger chunk sizes increase performance significantly but if your map has too much variation in a chunk: missing chunks...

P.S. Any heightmap image in .png format will work. It doesn't have to be from Dwarf Fortress. For example, the heightmaps from terrain.party will work to make a model of real world locations.
« Last Edit: May 10, 2015, 05:19:39 pm by mapper »
Logged

lethosor

  • Bay Watcher
    • View Profile
Re: Blocky Map App
« Reply #1 on: April 24, 2015, 03:08:50 pm »

Neat! +1 for being portable.
The Mac version expands into a folder named "BlockyMapApp_Mac.app", which OS X interprets as an application (e.g. an .exe on Windows). However, the application itself is inside this folder, and is named "BlockyMapApp.app" (which probably shows up as another folder on other platforms). I'd suggest renaming the zipped folder to something lacking the .app extension.
Other than that, it appears to work perfectly.
Logged
DFHack - Dwarf Manipulator (Lua) - DF Wiki talk

There was a typo in the siegers' campfire code. When the fires went out, so did the game.

mapper

  • Escaped Lunatic
    • View Profile
Re: Blocky Map App
« Reply #2 on: April 24, 2015, 03:29:50 pm »

Thanks lethosor. Updated the filename like you suggested.
Logged

ragundo

  • Bay Watcher
    • View Profile
Re: Blocky Map App
« Reply #3 on: April 25, 2015, 02:07:42 am »

This is fantastic.

I was trying to do something similar without Unity, using OpenGL because I wanted to show the elevation, biomes and population areas in a map.

My plan is to export the surface map using DFHack during in game and not to rely on exporting the elevation map using Legends Mode.

Tested on Ubuntu 64 bits and works like a charm.

Things I would like to see: Filtering on biomes, show local populations (hightlighted in the map), etc


Great work
Logged

mapper

  • Escaped Lunatic
    • View Profile
Re: Blocky Map App
« Reply #4 on: April 25, 2015, 03:55:24 am »

Thanks for trying it out ragundo, and for the feedback.

My plan is to export the surface map using DFHack during in game and not to rely on exporting the elevation map using Legends Mode.

That will be great. Seeing your fortresses is a real level above just seeing the world map. Originally I was hoping to do that too, but I couldn't figure out how to export the map from DFHack. I found the RPC interface but it's too complicated for me at this point. Have you figured out how to handle the map export?

Things I would like to see: Filtering on biomes, show local populations (highlighted in the map), etc

Do you mean showing only one biome at a time?
The local populations is a good idea. I want to add that if I can get the data. It's available somehow, the DF world map as a satelite map program is great and it includes this. When exporting my legends data there is info on all the sites and events, but I don't see any location information.
Logged

ragundo

  • Bay Watcher
    • View Profile
Re: Blocky Map App
« Reply #5 on: April 25, 2015, 04:49:51 am »

Hello mapper.

I managed to get the RPC communication between DFHack and a external program so this would not be a problem.  Also, protocol buffers works in C# in order to use them with Unity. That's the way that Japa's Armok Vision works, but for the moment, I would prefer a simpler solution.

I was thinking of exporting the data (population, region names, mountains names and elevations, rivers, etc in a format that would be easy to parse by your program. Maybe XML or JSON or plain text files, as you like. Then, you could filter, show, highlight, zoom to them, etc.

It would be necessary to develop a little plugin that iterates over the world map exporting the data to the required file. Again this is no problem because I was working on this and all the data is available in DFHack.

Greetings
Logged

mapper

  • Escaped Lunatic
    • View Profile
Re: Blocky Map App
« Reply #6 on: April 26, 2015, 02:40:13 am »

I like this idea. I can add a parser that reads the xml file and shows each landmark on the map.

The landmarks could initially just be a small icon and name, then expand to a panel with extended information when clicked.

The unity UI objects allow for some rich text markup. If the xml file contains that markup in the landmark's text it will be easier for me and it will give you more control over how it looks. Similarly for the icon and any other images, if the xml file specifies the image source my program can load it at runtime instead of having specific images built in.

I want to have the ability to use the sprites from a tileset as icons. For a landmark's icon the xml file could either give an image source, or give a tileset source and the number of the tile. Then the players looking at the 3d map would see the icons from their regular tileset that they are used to seeing on the game's world map, and neither of us will be required to make an image for every last landmark type.

I thought of a few questions:
Do all of the landmarks have a single position on the map or are there some that span a range of positions?
Does the location information that you have access to correspond to the pixels on the elevation map or does it need to be translated?
When exporting do you have access to the colormap colors that the game is using to shade the tiles?
Logged

PeridexisErrant

  • Bay Watcher
  • Dai stihó, Hrasht.
    • View Profile
Re: Blocky Map App
« Reply #7 on: April 26, 2015, 08:39:53 am »

PTW, because this is amazing!
Logged
I maintain the DF Starter Pack - over a million downloads and still counting!
 Donations here.

King_of_Baboons

  • Bay Watcher
    • View Profile
Re: Blocky Map App
« Reply #8 on: May 04, 2015, 02:13:15 pm »

My maps dont show up at all

I tried lowering the chunks in box 1,lowering the graphics,loading smaller maps and nothing shows up.Not even the samples work
Logged
A medium-sized creature prone to madness and insanity.

lethosor

  • Bay Watcher
    • View Profile
Re: Blocky Map App
« Reply #9 on: May 04, 2015, 02:29:31 pm »

Are you sure you have the right filename(s)? (I can't recall if there's any indication as to whether the files you specify exist or not.)
Logged
DFHack - Dwarf Manipulator (Lua) - DF Wiki talk

There was a typo in the siegers' campfire code. When the fires went out, so did the game.

King_of_Baboons

  • Bay Watcher
    • View Profile
Re: Blocky Map App
« Reply #10 on: May 04, 2015, 02:37:34 pm »

I put the maps inside the same folder where the executable is,copy and paste the map names and I even add the .png at the end and it still doesn't work
Logged
A medium-sized creature prone to madness and insanity.

mapper

  • Escaped Lunatic
    • View Profile
Re: Blocky Map App
« Reply #11 on: May 10, 2015, 05:42:52 pm »

lethosor: The updated version imports landmarks from XML data. The program includes a sample_landmarks.xml file. I hope the structure is straight forward enough to understand just by looking at the xml data. The file is a list of landmark types/categories followed by a list of the landmarks themselves. Let me know if you have any feedback regarding the file format. I wasn't able to add support for tilemapped icons but regular .png and .jpg files can be used as icons for now. The included landmarks file is just a placeholder sample to show the feature but I'm looking forward to seeing what is possible with real exported landmark data.

King_of_Baboons: I'm sorry it wasn't working. The updated versions comes with pre made configurations for the sample maps. Give that a try and if it still doesn't work let me know:
  • Are there any messages at the bottom of the screen after you click the draw button? (e.g. does it count the chunks or list an error?)
  • Which OS are you using?
Logged

PeridexisErrant

  • Bay Watcher
  • Dai stihó, Hrasht.
    • View Profile
Re: Blocky Map App
« Reply #12 on: May 11, 2015, 10:21:06 pm »

v1.0 looks great!  I particularly love the updated ocean depth and water options.

Feedback on the autofind feature:  it's a fantastic upgrade, and here's my updated comments :)
* Is the source online somewhere?
* Supporting multiple search paths would be great
* Repeating clicking 'find my maps' just adds duplicates
* Just automatically finding them would be great - why click at all?
* Why not display (the most recent or first found biome) map, and offer to change?

The concept I'm working with is that new users can launch, and immediately get blown away by an awesome map without doing anything else.  Showing a splash screen with how to export maps if now are found would also be great.

Edit with more ideas:
* Invisible backfaces look kinda weird when viewing from underground
* Could the simple water be tinted by biome information? Otherwise arctic areas etc aren't visible.
* Showing icecaps differently would also be awesome!
* Instead of a slider, can you autodetect correct sea level and just have "off" as (the default) of the display options?

Again though, this is awesome.
« Last Edit: May 12, 2015, 05:10:12 am by PeridexisErrant »
Logged
I maintain the DF Starter Pack - over a million downloads and still counting!
 Donations here.

tsuki66

  • Bay Watcher
    • View Profile
Re: Blocky Map App
« Reply #13 on: June 06, 2015, 04:23:29 am »

For anyone who fiddled with the app for 10 minutes before getting it to work, simply renaming the files isn't enough, you have to actually convert them to PNG. I used GIMP as it's free and simple enough to get that job done.
Logged

Rose

  • Bay Watcher
  • Resident Elf
    • View Profile
Re: Blocky Map App
« Reply #14 on: June 06, 2015, 06:48:00 am »

This is looking great, like a 3D version of Isoworld (link in sig)

If you ever want any help with pulling more detail from DF, I can help with that, though you might have to do fancy LOD stuff to avoid things getting too out of hand.
Logged
Pages: [1] 2