Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 28 29 [30] 31 32 ... 50

Author Topic: 3Dwarf Visualizer - a tool to view maps in 3D  (Read 250477 times)

Baboonanza

  • Bay Watcher
    • View Profile
Re: 3Dwarf Visualizer - a tool to view maps in 3D
« Reply #435 on: August 16, 2008, 07:57:17 am »

1- Yes. C++/OpenGL using a BSD-licensed GUI toolkit. It's a bit like Qt, but without all 'new' usage, and has some very fast containers: www.ultimatepp.org
2- This is more difficult to explain :)

As Toady stated in another thread, the DESIGNATION_MATGLOSS_BITX is the index of the geological layer for a rock tile. You have to jump through a load of hoops to link this to a material type though.

To get the list of geological layers you have to:
1- Find the coordinates of the map block on the world map. ie. (mapXY + blockXY + (1,1)) / 16
2- Use these to find the region block data in the world map. There is a 2-dimensional array that holds these
3- Read the geological block index from the region block (I assume these are kept seperate to save space)
4- Find the geological block. These are stored in a vector.
5- Read the list of matgloss indices.
You can then use the designation matgloss index to find the material.

My notes:
Spoiler (click to show/hide)
My hideous code to do it (Point region already holds the correct region coords for the block, proc is an abstraction of the Win32 ReadProcess calls):
Spoiler (click to show/hide)
The relevant offsets:
Spoiler (click to show/hide)
As you can imagine, this took a little while to figure out :) Good luck if you try and implement it. I'm going to try the same contructed walls/pillars next but that seems even more complicated.
« Last Edit: August 16, 2008, 08:01:46 am by Baboonanza »
Logged

Mithaldu

  • Bay Watcher
    • View Profile
Re: 3Dwarf Visualizer - a tool to view maps in 3D
« Reply #436 on: August 16, 2008, 08:05:22 am »

great to hear about the open-source-ness, kudos. :)

as for the second part: apologies, but there wasn't much need to go into detail, since i'd already been doing this, thanks to jifodus, in a way that covers ALL versions (to which he has xml files on his web space): http://code.google.com/p/dwarvis/source/browse/branches/dev/map_extract/map_extract.pl

Still thanks for explaining the matgloss stuff, saves me a bit of time for when i implement that. :)

I'd also suggest you check out the wiki, there is a LOT more data on that stuff. ;)
Logged

TheSpaceMan

  • Bay Watcher
    • View Profile
    • http://www.digital-lifeform.com
Re: 3Dwarf Visualizer - a tool to view maps in 3D
« Reply #437 on: August 16, 2008, 11:23:23 am »

Have you decided how to fix collision. My first idea would be to use something like physx (easy to set up) and parse the world for solid tiles and simply calculate as big collision boxes as possible from the data, not careing about unused tiles. Specialy since it got a working player object that would be able to walk around in the enviorment.
Logged
Poking around with a DFParser.
Bodypart names, creatures names in one easily overviewable place.

Oh my new (old) picture?

Andir

  • Bay Watcher
    • View Profile
Re: 3Dwarf Visualizer - a tool to view maps in 3D
« Reply #438 on: August 17, 2008, 12:51:51 am »

Have you decided how to fix collision. My first idea would be to use something like physx (easy to set up) and parse the world for solid tiles and simply calculate as big collision boxes as possible from the data, not careing about unused tiles. Specialy since it got a working player object that would be able to walk around in the enviorment.

Simple tile based collision won't work?  You're transferring the data of the tiles I assume.  Some are "walkable" others are not.  You convert your coordinate and the coordinate for the center of the tile into common numbers (divide by tile width, cast to integer (optional), compare)
Logged
"Having faith" that the bridge will not fall, implies that the bridge itself isn't that trustworthy. It's not that different from "I pray that the bridge will hold my weight."

TheSpaceMan

  • Bay Watcher
    • View Profile
    • http://www.digital-lifeform.com
Re: 3Dwarf Visualizer - a tool to view maps in 3D
« Reply #439 on: August 17, 2008, 04:18:54 am »

It was more a general tought/question for the people who started working on 3d "walk around in" viewer.

I will look more into the mapdata stuff later. But now the Creature Mod Gui takes my time, and a co-op game contest and a old project from school that is being revived. After that I will do some more DF related "stuff".
Logged
Poking around with a DFParser.
Bodypart names, creatures names in one easily overviewable place.

Oh my new (old) picture?

Hundsstern

  • Bay Watcher
    • View Profile
Re: 3Dwarf Visualizer - a tool to view maps in 3D
« Reply #440 on: August 22, 2008, 09:53:53 am »

Compliments! I'm really waiting for a version which works with 28_181_40c.
Logged
Freedom and individuality!

Mithaldu

  • Bay Watcher
    • View Profile
Re: 3Dwarf Visualizer - a tool to view maps in 3D
« Reply #441 on: August 22, 2008, 10:02:38 am »

This one does, it's not in the OP, but it's the most current version: http://code.google.com/p/dwarvis/downloads/detail?name=3dwarf_04f.rar
Logged

Mohreb el Yasim

  • Bay Watcher
  • ♫♪♫♫♪♫♪♪♫♪
    • View Profile
Re: 3Dwarf Visualizer - a tool to view maps in 3D
« Reply #442 on: August 22, 2008, 10:03:12 am »

It might be interesing to see if the maps can be exported to Cube. It's a free engine for FPS shooters, which seems simple enough that an exporter could be a possibility.

http://cubeengine.com/



will it say that maybe some they we can play FPS (with a fantasy style First Person Smasher) in our fortresses ... i would be so happy ...
-a sniper in the Granit room with an adamantin cross-bow
-where there is an engraving of elf surrended by elfs?
-yes
-ok i pull that lever and he will be in magma ...
-how did you know it?
-it was my fortress :D
Logged
Mohreb el Yasim


GENERATION 24:The first time you see this, copy it into your sig on any forum and add 1 to the generation. Social experime

Hundsstern

  • Bay Watcher
    • View Profile
Re: 3Dwarf Visualizer - a tool to view maps in 3D
« Reply #443 on: August 22, 2008, 10:36:32 am »

This one does, it's not in the OP, but it's the most current version: http://code.google.com/p/dwarvis/downloads/detail?name=3dwarf_04f.rar

You're right. Thx!
Logged
Freedom and individuality!

Dorten

  • Bay Watcher
  • [CAFFEINE_DEPENDENT ]
    • View Profile
Re: 3Dwarf Visualizer - a tool to view maps in 3D
« Reply #444 on: August 26, 2008, 11:08:24 pm »

Quote
map_extract.pl - extracts dwarf fortress map data from the memory while ingame
Show help with 'map_extract -h'.

Could not find DF version in local data store. Checking for new memory address d
ata...
  Locally...
    Found 0 memory data files...
  Remotely...
Couldn't get it! at map_extract.pl line 304.

So... any chnces of downloading this "memory data files" manually?
Logged
Cacodemon 2nd Leutenant
medals: 8/40
specials: 30/44
badges: 13:8:3:0:0

Jifodus

  • Bay Watcher
  • Resident Lurker
    • View Profile
    • Dwarf Fortress Projects
Re: 3Dwarf Visualizer - a tool to view maps in 3D
« Reply #445 on: August 27, 2008, 04:00:05 pm »

Logged

Dorten

  • Bay Watcher
  • [CAFFEINE_DEPENDENT ]
    • View Profile
Re: 3Dwarf Visualizer - a tool to view maps in 3D
« Reply #446 on: August 27, 2008, 10:40:04 pm »

Strange. After that is said, that found file locally, but still tried to download it and failed.
I had to type new params in script itself.
Logged
Cacodemon 2nd Leutenant
medals: 8/40
specials: 30/44
badges: 13:8:3:0:0

Grath

  • Bay Watcher
  • Escaped Lunatic for life
    • View Profile
Re: 3Dwarf Visualizer - a tool to view maps in 3D
« Reply #447 on: August 29, 2008, 10:31:14 pm »

I keep getting this message, running 40c (with a few minor mods, like changing 'Marksdwarf' to 'Sniper', stuff like that) and 04f with the conf files manually downloaded:
Code: [Select]
Map data is not yet available, make sure you have a game loaded.I do have a game loaded and paused. I said 'Yes' to it being 40c, 'No' to show hidden tiles, and 'FortressName' to the third question. Saying 'Yes' to show hidden tiles doesn't change anything.
Logged

Drunken

  • Bay Watcher
    • View Profile
Re: 3Dwarf Visualizer - a tool to view maps in 3D
« Reply #448 on: September 05, 2008, 07:28:57 pm »

I am having trouble getting this to work. The map file is created without errors but when I try and load it it just crashes the 3d program. It is a very mountainous map does this sometimes cause problems? I can load the deafault maps that came with the visualiser without any problems
Logged
A stopped clock is right for exactly two infinitessimal moments every day.
A working clock on the other hand is almost never ever exactly right.

Andir

  • Bay Watcher
    • View Profile
Re: 3Dwarf Visualizer - a tool to view maps in 3D
« Reply #449 on: September 06, 2008, 07:00:23 am »

I am having trouble getting this to work. The map file is created without errors but when I try and load it it just crashes the 3d program. It is a very mountainous map does this sometimes cause problems? I can load the deafault maps that came with the visualiser without any problems

The maps that come with the visualizer are already formatted to work properly.  They are in no way a valid test of the map export process.
Logged
"Having faith" that the bridge will not fall, implies that the bridge itself isn't that trustworthy. It's not that different from "I pray that the bridge will hold my weight."
Pages: 1 ... 28 29 [30] 31 32 ... 50