Bay 12 Games Forum

Dwarf Fortress => DF General Discussion => Topic started by: Mithaldu on July 31, 2008, 04:23:22 am

Title: Lifevis - A realtime 3D interface for DF - Now with more Speed!
Post by: Mithaldu on July 31, 2008, 04:23:22 am
Lifevis is a realtime 3D interface for Dwarf Fortress. What does this mean? It is a program that will connect to the DF process and continually read its memory contents, then render them in OpenGL, and will continually read the contents. Thus you can watch the 3D model of your map update as you play, while being able to fully move around in it and view it from any angle. It will also send whatever keyboard input you perform on to Dwarf Fortress, so you can play the game inside the 3D view without having to switch back and forth all the time. Lastly, it allows you to control the view of your map, by allowing you to configure the horizontal range it will scan around the cursor position, as well as the ceiling and floor of the view, so you can slice into mountains.

Lifevis has been updated work with v0.34.07, v0.34.10, v0.34.11. The current version is very alpha and still very borken, but it can be downloaded on github:

https://github.com/wchristian/lifevis/downloads

And if you have problems, ideas or suggestions, please report them here: https://github.com/wchristian/lifevis/issues

Newer screenshots:

(https://dl.dropbox.com/u/10190786/DF/thumb_perl%202012-06-12%2003-07-22-91.jpg) (https://dl.dropbox.com/u/10190786/DF/perl%202012-06-12%2003-07-22-91.jpg) (https://dl.dropbox.com/u/10190786/DF/thumb_perl%202012-06-12%2003-07-39-88.jpg) (https://dl.dropbox.com/u/10190786/DF/perl%202012-06-12%2003-07-39-88.jpg) (https://dl.dropbox.com/u/10190786/DF/thumb_perl%202012-06-12%2003-08-30-52.jpg) (https://dl.dropbox.com/u/10190786/DF/perl%202012-06-12%2003-08-30-52.jpg)


Old OPs:
Spoiler (click to show/hide)
Title: Re: 3Dwarf beautification project
Post by: Mr.Person on July 31, 2008, 04:33:18 am
Here I was thinking the hard part would be making models and textures. Silly me  ;)
Title: Re: 3Dwarf beautification project
Post by: Mithaldu on July 31, 2008, 07:39:58 am
For people getting errors on the .bat, i updated it and it works now. :)
Title: Re: 3Dwarf beautification project
Post by: Ioric Kittencuddler on July 31, 2008, 08:14:22 am
I'd like to help but I'm not quite sure about the instructions.  I need to run this when?  When I'm using k view and I put my cursor over a tile?  Then I write a description of it which appears in the log.txt?  Then I put it on the wiki?
Title: Re: 3Dwarf beautification project
Post by: Mithaldu on July 31, 2008, 08:18:50 am
Pretty much exactly that. :)

The output is:
Code: [Select]
type -------designation-flags-------- -------occupation-flags---------
So you just check the relevant wiki pages i linked above. The log.txt is for convenience so you don't need to copy from the dos window.

Maybe i should create a new wiki page where people can simply dump the log.txt content in?
Title: Re: 3Dwarf beautification project
Post by: Ioric Kittencuddler on July 31, 2008, 08:54:20 am
Hm, looking at those wiki pages I'm even more confused.  It's... binary...
Title: Re: 3Dwarf beautification project
Post by: Christes on July 31, 2008, 01:54:49 pm
That's ... really awesome.  I'll get right on it.
Title: Re: 3Dwarf beautification project
Post by: Mithaldu on August 01, 2008, 03:03:41 am
Ioric: I updated the OP, maybe it helps you a bit? =)
Title: Re: 3Dwarf beautification project
Post by: Toady One on August 01, 2008, 03:57:18 am
I think I gave this to somebody before.  I don't remember if it was for the wiki or just some utility, but if it has been lost, here it is again.  You don't need to look if you want to use the new tile reader thingy instead.

Tile Types:
Spoiler (click to show/hide)

Designations:
Spoiler (click to show/hide)

Occupancy:
Spoiler (click to show/hide)
Title: Re: 3Dwarf beautification project
Post by: MaxVance on August 01, 2008, 04:06:06 am
This seems as good a place as any to ask, so here goes: What about moss? The wiki mentions it (http://www.dwarffortresswiki.net/index.php/Moss) but has very little information. Wouldn't tiles with moss need their own texture, or does moss even still exist? (The tile list didn't seem to list it, but I may have missed it or misinterpreted the list.) Never mind, it's in the designation list.
Title: Re: 3Dwarf beautification project
Post by: Toady One on August 01, 2008, 04:10:33 am
It's designation bit 29.  I don't know if it's used that often anymore, since it'll only come by if you stay away from and then revisit a site after a while in the right biome...  maybe even then it's not appearing.  Used to.  Haven't checked for a long time.
Title: Re: 3Dwarf beautification project
Post by: Mithaldu on August 01, 2008, 04:50:07 am
Aw, finding all that stuff out was half the adventure. :D

In any case, many many thanks Toady. That stuff helps out a massive ton! :)

(http://i.somethingawful.com/forumsystem/emoticons/emot-woop.gif)(http://i.somethingawful.com/forumsystem/emoticons/emot-woop.gif)(http://i.somethingawful.com/forumsystem/emoticons/emot-woop.gif)(http://i.somethingawful.com/forumsystem/emoticons/emot-woop.gif)(http://i.somethingawful.com/forumsystem/emoticons/emot-woop.gif)

Tile reader analysis will still be necessary, as some of the flags are a bit vague. Some of the adventure is left! :D
Title: Re: 3Dwarf beautification project
Post by: Toady One on August 01, 2008, 05:17:29 am
The glass/metal wall stuff isn't stored in the type+occ+des if that's what you mean by vague flags.  I don't know anything about 3Dwarf's inner workings, so I'm not sure if it's looking at the 16x16x1 block's information, but you need to go there to get at specific mineral vein mats.  Also, I'm not sure if it's already doing this, but for construction materials, there are construction information objects stored in lexicographical order (if I remember) by coordinate off somewhere that it gets at from the coordinates once it knows there is a construction tile present.  This is done so it can store the specific item used as well as builder information and so on, without a per-tile cost everywhere (though there's a minor speed hit on print and other interactions).
Title: Re: 3Dwarf beautification project
Post by: Mithaldu on August 01, 2008, 05:38:30 am
So far it's only using the info here, sans the vein data:

http://www.dwarffortresswiki.net/index.php/User:Rick/Memory_research#Tile_Block

And from that only the type/des/occ data. Right now we're looking at metal/glass wall stuff mostly because that's the most requested. I doubt Sinoth will want to make textures for ALL kinds of materials nor that he can get that into 3dwarf without a severe performance hit. The other thing i wanted the data for, mostly the occupancy stuff, is that it should tell sinoth where to render bridges, doors and generic "here's a building" blocks.

The vague part comes in here mostly, figuring out what kind of building has what kind of occupancy flags, so we can get good generalized representations working. (Partly also because we don't know yet where building locations or creature locations are. (Although i have a hunch about the creature stuff, since there's some wiki pages i haven't looked at yet.)) Of course we could ask you for that, but I'm leery of that, because i don't want you to feel pressured or obligated to spend time on this. :)

As for the veins, i just looked at Rick's page again and thanks to Azure have a good idea of what's going on there. I think i'll be able to grab and export that in a sensible manner.

Finally, thanks again. :)

Edit:

Right now we're going with these representations for the occupancy flags:

OCCUPANCY_BUILDING_
BIT2 = floor covered
BIT1 + BIT3 = floor covered
BIT1 + BIT2 = half-height blocking object
BIT1 + BIT2 + BIT3 = full height blocking object
Title: Re: 3Dwarf beautification project
Post by: Toady One on August 01, 2008, 06:08:49 am
I can't think of anything clever that would let you get at metal/glass distinctions without going to the construction info where the mats are stored.

Building bits:

BUILDING_OCCUPANCY_NONE 0
BUILDING_OCCUPANCY_CONST  1
BUILDING_OCCUPANCY_NO_BLOCK  2
BUILDING_OCCUPANCY_BLOCK_FLOOR  1|2
BUILDING_OCCUPANCY_BLOCK  3
BUILDING_OCCUPANCY_FLOOR  1|3
BUILDING_OCCUPANCY_TOTAL  2|3
BUILDING_OCCUPANCY_SPECIAL   1|2|3
BUILDING_OCCUPANCY_ANY   1|2|3


Specials covers a pretty broad class of things that can have different states where it needs to query the building specifically about what's going on (or where that might come up in the future).
Title: Re: 3Dwarf beautification project
Post by: Mithaldu on August 02, 2008, 06:45:36 am
I'm absolutely speechless and a bit overwhelmed actually (both by the data and your acts). You've given me a lot to think about and to work on while at the same time saving a lot of time. I don't think i know the words to properly express my gratitude here, especially in light of the things you said in the interview.

As for the special type: We'll just have to see how it looks after rendering it. If all fails we can still put a stone question mark in their place. :)
Title: Re: 3Dwarf beautification project
Post by: Toady One on August 02, 2008, 07:02:34 am
Special = closed bars, closed grates, doors (except for closed lever-operated doors, which are total), hatches as doors but total=floor, archery targets

Doors are probably the most common.
Title: Re: 3Dwarf beautification project
Post by: Mithaldu on August 02, 2008, 07:20:09 am
Hmm, means it would require some predictive analysis. I'd say the cases where grates or hatches are built without having the floor under them digged out are seldom enough to identify them by that property.

If doors are rendered as simple walls in the middle of the tile, with some guessing as to direction based on surroundings it shouldn't be a problem to have them stand in for targets too. ... Maybe draw all doors with a targeting ring. :D

The one i don't quite understand is this one: hatches as doors but total=floor.

I just also noticed that 1+3 = road. Yay. \o/
Title: Re: 3Dwarf beautification project
Post by: Toady One on August 02, 2008, 07:32:10 am
The one i don't quite understand is this one: hatches as doors but total=floor.

I just meant take the text from door "doors (except for closed lever-operated doors, which are total)" and change it to hatch with total=floor "hatches (except for closed lever-operated hatches, which are floor)".

Floor = bridge, shop, depot, road, closed lever operated hatches
Block = well
Total = closed lever operated doors, also floodgates, blocking part of screwpump, blocking part of water wheel, window
No block = everything else that can be passed through (furniture, walkable workshop squares, etc.)
Block/floor = everything else that can't be passed through (unwalkable workshop squares, etc.)
Title: Re: 3Dwarf beautification project
Post by: Mithaldu on August 02, 2008, 07:45:17 am
Alright, had to read it a few times, but got it. Thanks again. :)
Title: Re: 3Dwarf beautification project
Post by: Ubersoldat on August 02, 2008, 10:13:45 am
When I first glanced at the title of this thread, I thought it said 3Dwarf beatification project. Truly an interesting thought.
Title: Re: 3Dwarf beautification project
Post by: Baboonanza on August 07, 2008, 06:24:26 pm
Hi. This is a fasinating thread and I've got a related question (I'm also playing with 3D visualisation).

DESIGNATION_MATGLOSS_BIT1-4 seems to be an index into a list of stone types that make up the layers for the map. However, I can't find the relation between this index and the array of stone types loaded from the raws. Presumably there is some sort of intermediate array, but I can't find it.

Does anyone have any info on either the form or location of this data? Or am I barking up the wrong tree?
 Cheers.
Title: Re: 3Dwarf beautification project
Post by: matryx on August 11, 2008, 02:47:06 am
Is there any information as to the development ongoing with this project?
I really enjoy using it as is, and I'm curious what lies in store currently!
Title: Re: 3Dwarf beautification project
Post by: Toady One on August 11, 2008, 04:42:05 am
Hi. This is a fasinating thread and I've got a related question (I'm also playing with 3D visualisation).

DESIGNATION_MATGLOSS_BIT1-4 seems to be an index into a list of stone types that make up the layers for the map. However, I can't find the relation between this index and the array of stone types loaded from the raws. Presumably there is some sort of intermediate array, but I can't find it.

Does anyone have any info on either the form or location of this data? Or am I barking up the wrong tree?
 Cheers.

Those will take you to the geological layer in the geological region associated to the world map square associated to the tile.  There's a lot of hopping around, which makes writing these utilities with the exact material a bit more difficult.
Title: Re: 3Dwarf beautification project
Post by: Mithaldu on August 16, 2008, 06:06:29 am
I'm sorry, but it will be a while before anything comes of this. I posted it at a time where i expected roughly a month before i had enough data to work with.

It will be some time until i can take enough of a break from work to actually invest in this. :/
Title: Re: 3Dwarf beautification project
Post by: Dadamh on August 16, 2008, 06:21:17 am
I'm sorry, but it will be a while before anything comes of this. I posted it at a time where i expected roughly a month before i had enough data to work with.

It will be some time until i can take enough of a break from work to actually invest in this. :/

WHAT?  WE DEMAND OUR FREE THINGS NOW DESPITE THE HARDSHIPS IT MAY CAUSE IN YOUR LIFE

I am of course kidding.  You're making a viewer for a game map.  I'm sure people don't mind waiting, man.  Good luck with it all.
Title: Re: 3Dwarf beautification project
Post by: Hishan on August 28, 2008, 02:47:26 am
A bit of a shameless bump here, but just to ask, how goes the project?
Title: Re: 3Dwarf beautification project
Post by: Tamren on August 28, 2008, 04:14:12 am
Yes how goes? Im hoping for added Z levels and colour visualization for my 8X11 map sized starship  :)
Title: Re: 3Dwarf beautification project
Post by: Joseph Miles on August 29, 2008, 12:34:29 am
The viewer is being updated?! I wish I knew that before, I made a fort on an older version just to see it in visualizer...
Title: Re: 3Dwarf beautification project
Post by: sinoth on August 29, 2008, 08:41:09 am
added Z levels and colour visualization

Could you explain this?
Title: Re: 3Dwarf beautification project
Post by: Hishan on September 03, 2008, 01:10:57 pm
added Z levels and colour visualization

Could you explain this?

Meaningmaking metal walls look metal, and wood walls look wood etc.
Title: Re: 3Dwarf beautification project
Post by: Tamren on September 04, 2008, 01:57:59 pm
Added Z levels means the ability to add more Z levels to a fortress over the default 31. Currently all structures are limited to 15 levels tall, unless the terrain is tall to begin with.

My projected starship fortress would need in the region of 140.
Title: Re: 3Dwarf beautification project
Post by: Draco18s on September 04, 2008, 03:00:02 pm
My projected starship fortress would need in the region of 140.

I believe that qualifies as a:
HOLY F*CK!
Or maybe a:
JESUS CHRIST!
Title: Re: 3Dwarf beautification project
Post by: Tamren on September 04, 2008, 08:21:23 pm
Neither. Its MADNESS!  :D

According to my blueprint, the completed fortress would be 570 tiles long, 386 tiles wide (or 11.9 X 8.1 map tiles) and 79 levels high. Since I want to suspend it off the ground far into the air to imitate a hovering starship, that adds at least another 60 levels, including the default 15 layers of rock and soil.
Title: Re: 3Dwarf beautification project
Post by: Earthquake Damage on September 04, 2008, 08:49:29 pm
Maximum site size is 480x480 tiles, IIRC.
Title: Re: 3Dwarf beautification project
Post by: Tamren on September 04, 2008, 11:53:58 pm
Not even close, its 768. Each map tile is 48X48 fortress tiles. That means a 16x16 map has 12288 tiles per level.
Title: Re: 3Dwarf beautification project
Post by: Earthquake Damage on September 05, 2008, 01:35:13 am
D'oh!  I was thinking of the old 2D map size.
Title: Re: 3Dwarf beautification project
Post by: Mithaldu on September 05, 2008, 02:47:17 am
Tamren: This has nothing to do with changing dwarf fortress. This is about 3Dwarf.

Aside from that, work is progressing. I've cooked up a prototype viewer so i can directly fiddle around with stuff and will soon be improving the extraction routines. :)
Title: Re: 3Dwarf beautification project
Post by: RickiusMaximus on September 05, 2008, 04:32:18 am
Do you need anymore help?

I would love to see a new version of 3Dwarf! It's sooooo preetty...

I had noticed a few glitches with the way ramps were shown, notibly that a single row of ramps displays as a row of square pyramids. I think it would be better if it showed up as a toblerone shape, so we can do sloping roofs better...
Title: Re: 3Dwarf beautification project
Post by: Mithaldu on September 05, 2008, 04:41:00 am
Actually, there is one thing people could still help with: Textures. :)
Right now the texture variation is pretty low and if people would make 256x256 textures matching the tile types in Toady's earlier post, that would help things out quite a bit. :)
Title: Re: 3Dwarf beautification project
Post by: Tamren on September 05, 2008, 07:06:12 pm
Tamren: This has nothing to do with changing dwarf fortress. This is about 3Dwarf.

And talking about how we could build awesome things with DF then use 3dwarf to view them is offtopic how? Were going to have to change 3dwarf to keep up with a changing dwarf fortress anyway. And its already somewhat behind in the colour department.

Do you think it would be possible to have transparent or at least translucent clear blocks to represent windows? It would be neat if we could make them glow as well, to simulate lights.
Title: Re: 3Dwarf beautification project
Post by: Mithaldu on September 18, 2008, 09:34:16 pm
Alright, the next step is done. As i mentioned before, i'm working on a viewer with which i can directly fiddle around, and it's now at a key point. As of now, i have a piece of code which pretty much emulates the visualize button ingame, only that it runs alongside in its own window and allows me to change how it displays stuff.

I've made a little demonstration here: http://www.veoh.com/videos/v15926805CxaYtejA
If you click on the download link you can also download the full-size original video. Also note that i was a bit quiet and you may need to turn your sound up.

As usual, you can download the source via SVN from googlecode here: http://code.google.com/p/dwarvis/source/browse/trunk/lifevis

As it's getting late now, i'll delay assembling a package for now and maybe do that tomorrow if people are interested.

Also keep in mind that this is not a competitor to 3Dwarf and only meant as a tool to help me make better use of Toady's data.
Title: Re: 3Dwarf beautification project
Post by: Janus on September 19, 2008, 04:49:58 am
Nice!
Title: Re: 3Dwarf beautification project
Post by: Dadamh on September 21, 2008, 02:02:56 pm
I agree with the guy with the spathi cypher.  Anyway, that video is a neat proof of concept.  Shows that at least some amount of realtime 3d viewer is somewhat possible, if a long way from complete.
Title: Re: 3Dwarf beautification project
Post by: Mithaldu on September 21, 2008, 02:45:39 pm
I agree with the guy with the spathi cypher.
Huh?
Anyway, that video is a neat proof of concept.
Haha, it's a lot more than that. Right now it's mostly a question of fleshing it out. :) (Currently working on a toolchain to convert Wavefront objects to perl code, since making ramps by hand is fucking tedious.)
Title: Re: 3Dwarf beautification project
Post by: Neonivek on September 21, 2008, 04:08:22 pm
I am guessing once this project is done... The tiles will have different colors and textures so that a Mudstone wall won't look like a Microline wall and will not look like a natural mudstone wall and will not look like a smoothed natural mudstone wall and will not look like a smooth microline wall?
Title: Re: 3Dwarf beautification project
Post by: Mithaldu on September 21, 2008, 04:54:08 pm
That's the idea. :)


Ah, totally missed that, thanks for the explanation. :D
vvvv
Title: Re: 3Dwarf beautification project
Post by: Dadamh on September 21, 2008, 05:02:48 pm
I agree with the guy with the spathi cypher.
Huh?

It was a reference to the guy above that comment.  "Huffi Muffi Guffi", under his avatar, is a reference to an old videogame.
Title: Re: 3Dwarf beautification project
Post by: Dadamh on September 22, 2008, 04:58:31 pm
Also, as an aside, I wasn't meaning to denigrate your work by calling it a proof of concept.  It's impressive to say the least; as I haven't seen any other realtime displays anywhere.
Title: Re: 3Dwarf beautification project
Post by: Mithaldu on September 22, 2008, 06:11:26 pm
Thanks for clarification, i was honestly more assumed, but i can understand where the impression comes from. :)

Today i have something new to show.

As i mentioned on the last page i was working on a toolchain to convert wavefront objects. At first i tried to get the landscape to show up properly and then i wanted to move to texturing. Turned out that things like ramps required a MASSIVE effort of analyzing and a zillion different representation depending on the surroundings.

On the other hand, i couldn't lean back and use convenient, but slow and large libraries that i could point at pre-built model files, since the actual process of converting the model files into 3d data on the gfx card cache is rather slow, but happens a lot while the viewer updates from DF.

So i had to take a middle step to not go insane. I found a slim and free 3d editor (Wings 3D), that could export into a text format (Wavefront Object), which i then ran through a perl script that generates the low level OpenGL instructions.

The first test ramp i inserted went absolutely fine, so i went looking for a bigger pre-built model to insert. In the following video, the engine renders 30000+ polygons at 30 fps without even hitching. Additionally i have proven that i can easily create models in a 3d modelling application and directly inject them into the viewer without any kind of performance loss.

And now the video. :D

http://www.veoh.com/videos/v16023678hb23TCjA
Title: Re: 3Dwarf beautification project
Post by: Tamren on September 23, 2008, 01:09:06 am
Heh, why the ice cube?
Title: Re: 3Dwarf beautification project
Post by: Mithaldu on September 26, 2008, 11:45:30 am
It was literally the smallest model that was still complex, that i could find. Everything else stomped in with 50000 polys and such.

In other news, work progresses nicely.

The modelling system is now completely functional and nicely working as well as comes with some provisions that will allow for later optimizations or tweaking of models, while still keeping manual changes to models squarely in the 3d editor and not in the text editor. Also, to make things a tad easier, the generator now automatically rotates the models as many times as needed, so one only has to model 1 basic ramp to the north to also cover the east, west and south.
I'm not sure if Sinoth will be able to port this to C++, as i'm using some syntax sugar of perl here, but it sure as hell makes development move a lot faster for me.

The above things enabled me to tackle something that's been a problem in 3Dwarf for a while: Ramps. Due to the incredible complexity of ramps, there are at LEAST 256 possible physical representations of them, and that's only taking into account the situation on the same 2D layer.
Thanks to the modelling system and the auto-rotation, i only needed to create 16 ramp models to cover 90% of all possible situations and 100% of the 256 above. Additionally i found a neat way to use bitmask comparisons to select the correct ramp out of the available ones, instead of crafting a huge, unmaintainable if tree. Lastly, after playing around with it for a day, i found a way of encoding the surroundings of each type of ramp in its name without creating massive textual monsters.
I'm fairly sure you'll see this in 3Dwarf down the line.
[Detail 1 (http://i38.tinypic.com/15i3urt.png)] [Detail 2 (http://i34.tinypic.com/333fte1.png)]
(http://i35.tinypic.com/2ywsp34.png)

Lastly, i finished the texturing system today, which works quite fast, despite using multiple smaller textures instead of one large texture with offsets. The way i'm doing this uses a really simple human-readable mapping of a spreadsheet via constants which allows me to simply write down the texture name i want next to a tile, paste it into my IDE and it'll use that. Adding textures also becomes as easy as adding 3 lines that mention the name of the texture.
[Water (http://i37.tinypic.com/2aipopx.png)] [Detail (http://i36.tinypic.com/21bjd06.png)] [The Hand (http://i38.tinypic.com/2mdmefb.png)]
(http://i36.tinypic.com/27yba0o.png)

This is, if it even is, of limited use to 3Dwarf, however it makes it possible for me to move on towards extracting and playing with memory data to see if i can get the textures to be more detailed. This means veins, varied ground tiles, glass, etc.

Next up is also display of creatures and then experiments to see how much i can do with the designation/occupancy flags posted earlier by Toady.


At this point i also need to thank some people: The goons over in SHSC were extremely helpful and made it possible for me to figure things out with which i'd been stuck on this for quite some time.


And for anyone who wants to play around with it, download is here:
http://dwarvis.googlecode.com/
Title: Re: 3Dwarf beautification project
Post by: Fleeb on September 26, 2008, 12:07:19 pm
This is awesome. Keep up the good work.
Title: Re: 3Dwarf beautification project
Post by: Janus on September 26, 2008, 01:06:17 pm
Wow, that is indeed awesome.
Title: Re: 3Dwarf beautification project
Post by: Mithaldu on September 26, 2008, 05:00:43 pm
Thanks to poking from the goons i bring another present today:

I've added remote control capability. (shift +) cursor keys get sent on to DF, k and space as well. I'll add more once i've slept.

Download is here: http://dwarvis.googlecode.com/svn/latest_downloads/lifevis.rar
Title: Re: 3Dwarf beautification project
Post by: Tamren on September 27, 2008, 03:33:18 pm
Due to the incredible complexity of ramps, there are at LEAST 256 possible physical representations of them, and that's only taking into account the situation on the same 2D layer.

I think were going to need a few more  ;D

(http://img237.imageshack.us/img237/5081/df48te5.jpg)
(http://img166.imageshack.us/img166/6961/df52ze0.jpg)
(http://img209.imageshack.us/img209/509/df30xu5.png)
(http://img248.imageshack.us/img248/8832/df31ky3.jpg)
Title: Re: 3Dwarf beautification project
Post by: Mithaldu on September 27, 2008, 05:19:00 pm
3 things:

1. That's 3Dwarf, Sinoth is programming that. I'm programming lifevis and experimenting in it to find stuff Sinoth can use. So far he hasn't incorporated *anything* in it from lifevis.

2. Can you upload a save (including the WHOLE df directory please) of that somewhere so i can see how it holds up in lifevis?

3. I just updated lifevis:
It has now complete remote control capability for DF in that it pipes *ANY* keyboard input directly to DF. There's also a lifevis.cfg file in the prog sub-directory now.

Download: http://dwarvis.googlecode.com/
Title: Re: 3Dwarf beautification project
Post by: Narushima on September 27, 2008, 06:35:02 pm
Great work you're doing there, man. Keep it up !
Title: Re: 3Dwarf beautification project
Post by: Tamren on September 27, 2008, 07:07:43 pm
Its going to be interesting how the visualizers will handle complex multi-level slopes. Right now you can make a perfect pyramid, but rotate that pyramid a couple degrees and you will lose the perfectly flat faces. Its a limitation of the system because everything is based on cube shaped spaces.

For my startship the outer hull looks like that even with the ramps simply because the terrain follows a curve and slope that the ramps simply can't handle with thier 45 degree shape. It makes sense for crafted terrain to be boxy, but natural terrain like hills would be much more rounded. The problem with that of course is that the polygon count would go through the roof and rabbit punch your pc.

Anyhow I can upload the saves for both of those games, the game is older from version 40c. 3dwarf was part of the directory so I left it in there. Problem is this package is 100 megs. I heard that we had a file upload server for DF stuff but 100 megs would be far too much for that. Any suggestions?
Title: Re: 3Dwarf beautification project
Post by: Spoggerific on September 27, 2008, 07:09:23 pm
Perhaps you could only upload the region folder, and not your Dwarf Fortress folder. That would certainly chop off a decent amount of data... unless the region alone is 100 MB.

If so, I recommend shrinking it via .zip or .rar. Then you can go to somewhere like http://www.rapidshare.com and upload it there.
Title: Re: 3Dwarf beautification project
Post by: Mithaldu on September 27, 2008, 10:08:14 pm
So, to serene melodies, arranged by Susumu Hirasawa, and voiced by transsexuals from Thailand, i created something.

I was not content however.

I sat down and searched for a suitable location. Then i sent out a group of seven dwarves.

Here they are:

(http://bildhoster.com/bild.php/1046,creatures3thumbpngCWNEP.png) (http://bildhoster.com/bild.php/1045,creatures3pngSZ4II.png)

I wonder who they will meet here...

To the north, a single hoary marmot overlooks its very own mountain.
(http://bildhoster.com/bild.php/1042,creatures1thumbpngMRQR5.png) (http://bildhoster.com/bild.php/1041,creatures1pngAG2Q5.png)

Directly underneath some fire imps were getting it on in their lava pool.
(http://bildhoster.com/bild.php/1044,creatures2thumbpngB7WQY.png) (http://bildhoster.com/bild.php/1043,creatures2pngTB0FS.png)

And further to the south some naked mole dogs were chilling in their deep hole.
(http://bildhoster.com/bild.php/1048,creatures4thumbpngP9QUN.png) (http://bildhoster.com/bild.php/1047,creatures4pngQARTJ.png)

Sadly i realized that there is still some work to do, since creatures left trails behind them when moving, but i won't keep this from you, so here's an updated package. :)

http://dwarvis.googlecode.com/
Title: Re: 3Dwarf beautification project
Post by: Spoggerific on September 27, 2008, 10:11:01 pm
What language is lifevis in? Will you be releasing the source?

I'm an amateur programmer, and being able to study something something like lifevis would be very cool and educational for the likes of me.

It's perfectly understandable if not... I was just curious. Or, maybe you already have, and I'm just too dumb to look for it.
Title: Re: 3Dwarf beautification project
Post by: Mithaldu on September 27, 2008, 10:15:21 pm
Completely open source and public domain.

http://code.google.com/p/dwarvis/source/browse/trunk/lifevis <- svn web viewer
http://code.google.com/p/dwarvis/source/list <- change log
http://code.google.com/feeds/p/dwarvis/svnchanges/basic <- rss feed

Also note: You should *really* get acquainted with SVN, TortoiseSVN works nice under windows and is what i use. It'd allow you to easily keep up-to-date with my changes.

P.S.: You need to be more curious. :p Try looking into the prog folder in the lifevis one.
Title: Re: 3Dwarf beautification project
Post by: Spoggerific on September 27, 2008, 10:23:32 pm
Ah. Perl. The language I'm most familiar with, and the one upon which I cut my teeth, is C++. However, I know enough about perl to at least be able to read this. Thank you!

Also, yeah, I'm acquainted with SVN. I used TortoiseSVN before, and it was fairly nice. However, that was quite a while ago... I'm on Linux, now. My IDE of choice, Eclipse, has handled SVN before, so I know how to set it up. Thank you, again.

May your semicolons never be forgotten, and your pointers never cause a segfault.
Title: Re: 3Dwarf beautification project
Post by: Janus on September 27, 2008, 10:38:58 pm
At long last, support for the display of critters! Keep up the good work. :D
Title: Re: 3Dwarf beautification project
Post by: corvvs on September 27, 2008, 11:08:33 pm
Ah. Perl. The language I'm most familiar with, and the one upon which I cut my teeth, is C++. However, I know enough about perl to at least be able to read this. Thank you!

Also, yeah, I'm acquainted with SVN. I used TortoiseSVN before, and it was fairly nice. However, that was quite a while ago... I'm on Linux, now. My IDE of choice, Eclipse, has handled SVN before, so I know how to set it up. Thank you, again.

May your semicolons never be forgotten, and your pointers never cause a segfault.

Hmm, does this utility work for you? I can't get any of the 3rd party stuff to work under WINE - my guess is that each program must be running in its own protected space so they can't find the DF window. Is there an option I need to pass to wineserver or something?
Title: Re: 3Dwarf beautification project
Post by: Spoggerific on September 27, 2008, 11:10:18 pm
Ah. Perl. The language I'm most familiar with, and the one upon which I cut my teeth, is C++. However, I know enough about perl to at least be able to read this. Thank you!

Also, yeah, I'm acquainted with SVN. I used TortoiseSVN before, and it was fairly nice. However, that was quite a while ago... I'm on Linux, now. My IDE of choice, Eclipse, has handled SVN before, so I know how to set it up. Thank you, again.

May your semicolons never be forgotten, and your pointers never cause a segfault.

Hmm, does this utility work for you? I can't get any of the 3rd party stuff to work under WINE - my guess is that each program must be running in its own protected space so they can't find the DF window. Is there an option I need to pass to wineserver or something?
Oh... no. I haven't tried running this on wine yet. I'll give it a shot tomorrow, though. It's 23:00 here, and I'm tired. I've only used utilities for Dwarf Fortress once, and that was on my windows partition, while I was fooling around. I'll let you know what I find out when I try.
Title: Re: 3Dwarf beautification project
Post by: Mithaldu on September 28, 2008, 01:31:39 pm
Alright, today i embarked with a number of Perlmonks into the lightly charted waters of parallelization and we found a little treasure which goes by the name Coro.

I won't mince words long and let the videos speak for themselves:

(http://ll-images.veoh.com/media/w100/media-v16083518yDCkDfcH1222625859Med.jpg) (http://www.veoh.com/videos/v16083518yDCkDfcH) (http://ll-images.veoh.com/media/w100/media-v16083519Y5TFBsk61222625842Med.jpg) (http://www.veoh.com/videos/v16083519Y5TFBsk6)

The first one shows me moving rapidly over a map and showcases how the movement is unhindered by the data synching and how the cells are being loaded in in the background and pop up when they've been loaded.

The second one shows that even with a 23x23 map, the updates running in the background don't block the drawing. I'm getting crap for framerate when zoomed out (middle mouse button), but when zoomed in the fps rises rapidly. Note that at this point one update in the background took roughly 50 seconds.

As usual, you can get the latest version here: http://dwarvis.googlecode.com/
Title: Re: 3Dwarf beautification project
Post by: Mithaldu on September 30, 2008, 10:49:06 pm
I've changed enough so i can't remember what i did anymore, so i'll paste the changelog (slightly cut to remove the less interesting stuff):

Quote
- Added models for boulders, shrubs, trees, saplings.
- Added brightness variations for various similar tile types (for example grass) via array in internals.
- All models draw their initial brightness modifier from the internals table now.
- Restricted brightness values in the model generator so it wouldn't generate pure black or white tiles.
- Disabled hiding of hidden tiles that are atop unhidden ones.
- Added culling of invisible polygons to floors (and similar, like trees, etc.) and walls.
- Added mouse sensitivity setting to config.
- Simplified the creature model for better performance.
- Creatures now get updated more frequently (almost real-time).
- Position is now calculated by using the viewport coordinates when no cursor is active.
- View range can now be modified via buttons in the lower left corner.
- Small bugfix to clamp cell access to map when range is too big.

Additionally i've done a lot of non-visible changes that have to do with working towards increased parallelization.

Some screenshots this time only, i'm too tired to record a video of mountain goats running in circles.

(http://bildhoster.com/bild.php/1062,perl2008092919074233thumbjpgIX7Y8.jpg) (http://bildhoster.com/bild.php/1061,perl2008092919074233jpgSG4E2.jpg)(http://bildhoster.com/bild.php/1064,perl2008092919075963thumbjpgSGQK9.jpg) (http://bildhoster.com/bild.php/1063,perl2008092919075963jpg4KQE2.jpg)(http://bildhoster.com/bild.php/1066,perl2008092919081228thumbjpg2VOD3.jpg) (http://bildhoster.com/bild.php/1065,perl2008092919081228jpgLM60B.jpg)(http://bildhoster.com/bild.php/1068,perl2008092919085008thumbjpg3KTBB.jpg) (http://bildhoster.com/bild.php/1067,perl2008092919085008jpgBWMN2.jpg)(http://bildhoster.com/bild.php/1070,perl2008092919085941thumbjpgJ6822.jpg) (http://bildhoster.com/bild.php/1069,perl2008092919085941jpg4L058.jpg)


Lastly, I'm randomly getting a corruption problem where the landscape gets all jumbled up and i can't find it. Suspecting OpenGL is messing up on my card somewhere. Please tell me if you notice the same.

Also, please check this topic if you're interested in helping me: http://www.bay12games.com/forum/index.php?topic=25521.0

Download as usual: http://dwarvis.googlecode.com/
Title: Re: 3Dwarf beautification project
Post by: Neonivek on September 30, 2008, 10:51:26 pm
Are those bushes or do you have problems getting boulders to appear as the correct material on the landscapes?
Title: Re: 3Dwarf beautification project
Post by: Mithaldu on September 30, 2008, 10:58:13 pm
The small green things are bushes, the grey things are boulders. Apparently i'm an awesome artist. Thus also the call for better ones here: http://www.bay12games.com/forum/index.php?topic=25521.0 ;)
Title: Re: 3Dwarf beautification project
Post by: EchoP on October 01, 2008, 03:16:59 am
Wow. Just awesome what you are doing here, keep up the good work.  :) 
Title: Re: 3Dwarf beautification project
Post by: Mithaldu on October 01, 2008, 04:07:47 am
Quick update thanks to Footkerchief: http://dwarvis.googlecode.com/

This improves responsiveness on maps with many creatures and makes some purple [?] tiles show up properly.
Title: Re: 3Dwarf beautification project
Post by: Podonok on October 01, 2008, 10:40:32 am
Is it possible to swap 3d models with editable sprites?

Because I would totally use some graphic mods made for DF in 3Dwarf.
Title: Re: 3Dwarf beautification project
Post by: Mithaldu on October 01, 2008, 11:08:47 am
I'd probably be able to do that with point sprites, but it'll probably have to wait until i start working on transparency effects, as point sprites are a bit pointless without that.
Title: Re: 3Dwarf beautification project
Post by: Mithaldu on October 02, 2008, 07:30:51 pm
Toady, I don't know if and when you'll answer this, but if you have a look in: Why are there creatures with insane coordinates like 50k+? :o
Title: Re: 3Dwarf beautification project
Post by: Mithaldu on October 02, 2008, 08:00:49 pm
Some more updates to lifevis, only performance- and structure-related this time though. I've made the whole thing run in a much more parallelized form and also added options in the config file with which one can tweak the update speeds of location/creature/landscape data.

If any of you download and play around with this, please do give me some feedback on how it performs for you, what numbers you see on the left under Tasks and Creature-Tasks and what kind of computer you have.

Link: http://dwarvis.googlecode.com/
Title: Re: 3Dwarf beautification project
Post by: Vicomt on October 03, 2008, 05:58:30 am
Toady, I don't know if and when you'll answer this, but if you have a look in: Why are there creatures with insane coordinates like 50k+? :o

HFS Creatures? possibly they're stored off map, then moved on map as soon as you find them.
Title: Re: 3Dwarf beautification project
Post by: Neonivek on October 03, 2008, 07:29:33 am
Yep so you heard it here first... They are stored... IN SPACE!!!
Title: Re: 3Dwarf beautification project
Post by: Duke 2.0 on October 03, 2008, 07:31:20 am
Yep so you heard it here first... They are stored... IN SPACE!!!

 Demons in SPAAAAAAAAAAAACE!
Title: Re: 3Dwarf beautification project
Post by: Mithaldu on October 03, 2008, 07:53:33 am
That may be possible. Does someone have a map with undiscovered HSF and the exact location of it so i can test it? I just lost my miner while digging for a cluster of creatures i'd seen underground. Turns out it was an underground river with snakesmen and the lot into the side of which i had digged. :D

On the other hand, it really showed me how well landscape updates work. :)
Title: Re: 3Dwarf beautification project
Post by: Bromor Neckbeard on October 03, 2008, 11:36:31 am
According to the site finder, my current site (which I just now started on and haven't moved so much as a pebble) has undiscovered HFS.

Since you were so quick to help me out a minute ago, the least I could do is to return the favor.  What do I have to do?  Do I just upload the Region1 folder to the DFFD or something?

(Edit)  Okay, I'm in the process of finding the actual location of the HFS right now so that you don't have to spend an hour digging for it.  Then I'll revert to my backup save and upload that version of the Region1 folder and put it on the DFFD for you.  Expect it in, oh, I don't know, a half hour or so.
Title: Re: 3Dwarf beautification project
Post by: Mithaldu on October 03, 2008, 11:51:11 am
Exactly, that's all i need. :)

Oh, and maybe a hint as to where the HFS is once you've found it. ;)

(And i'm glad to hear i was able to help on the other matter. :D)
Title: HFS uploaded
Post by: Bromor Neckbeard on October 03, 2008, 12:29:05 pm
Okay, here's a picture of where the HFS is.  The upper right corner of the cave that you see there is 15 spaces down from the top of the map and 68 spaces to the left of the extreme right side of the map, at z-15.  Of course, it extends above and below that, but z-15 is where I broke into it.

(http://img527.imageshack.us/img527/1601/hfsmv4.th.jpg) (http://img527.imageshack.us/my.php?image=hfsmv4.jpg)(http://img527.imageshack.us/images/thpix.gif) (http://g.imageshack.us/thpix.php)

Here's the actual file.

http://dffd.wimbli.com/file.php?id=583

When you load the game, the cursor should pretty much be sitting on the exact place the HFS appeared when I searched for it a few minutes ago.  Hope this helps. ;D
Title: Re: 3Dwarf beautification project
Post by: Mithaldu on October 03, 2008, 01:01:34 pm
Perfect, thanks. :D

Checked it out and no, that's something else. Neither before nor after i broke through were the out-of-bounds exceptions triggered. However interestingly the creature count was 55 before, with only 21 in the unit list, and 97 afterwards with 50 in the unit list.
Title: Re: 3Dwarf beautification project
Post by: Mithaldu on October 03, 2008, 07:37:37 pm
New version:

http://dwarvis.googlecode.com/

Did some refactoring so it looks like a real application now. Added some gui niceness which allows you to cut off slices at the top and added models for stairs as well.
Title: Re: 3Dwarf beautification project
Post by: EchoP on October 03, 2008, 10:29:49 pm
New version:

http://dwarvis.googlecode.com/files/Lifevis_R179.rar

Did some refactoring so it looks like a real application now. Added some gui niceness which allows you to cut off slices at the top and added models for stairs as well.
Yeah, this doesn't work for me anymore. I tried an older version a couple of days ago which worked fine, but when I open this one, the window freezes, and the console prints the same 3 lines over and over again:
Use of uninitiated value at 403, 405 and initialization.

This also creates a problem with the error file, which is now 200 mb big after 20 seconds...  :D

It might just be my computer, but I would get some other people to look at it as well.

Edit:
Ah ok
Title: Re: 3Dwarf beautification project
Post by: Mithaldu on October 03, 2008, 10:57:03 pm
Known issue. I'm afraid you'll have to get DF .40d. :)
Title: Re: 3Dwarf beautification project
Post by: Mithaldu on October 06, 2008, 02:57:45 pm
And a new version of Lifevis is done. :)

Changes:
- Something that quite a few people didn't seem to notice in the last update: Dragging on the grey bar with your mouse cuts off z-layers at the top so you can look underground or into buildings.
- Changed filename of Viewer.exe to Lifevis.exe since some people were running modelgen.exe and not getting that that's only a tool for model generation.
- Added error popups, haven't converted all error messages to use that yet though.
- Added online version checking. Everytime you start it, it'll download a small text file, compare it with its own version and tell you if i released a new one. You can switch this off in the config file.
- Changed parallelization updates, especially in regard to caches. Please tell me if the graphics behave oddly. Upsides should be more performance and better reaction to breaching of the memory limit.
- Added new preliminary dwarf model made by Emperor Bob on the DF forums.
- Added texture for smoothed stone and smoothed stone with minerals.
- Added preliminary building approximation. That means it checks the occupancy flags and then guesses at what building block could be in that tile. You should be able to recognize workshops now.
- Added models for fortifications and pillars.
- Added display ceiling locking. When you click on the lock icon in the upper right, the ceiling will be follow the location of the cursor ingame.
- Added differentiated rendering of Dwarves and other creatures.
- Removed display of dead creatures, which increases performance.

Download: http://dwarvis.googlecode.com/
Title: Re: 3Dwarf beautification project
Post by: EchoP on October 07, 2008, 02:21:39 am
And a new version of Lifevis is done. :)
Sweet, I got it working this time...
However, all the dwarves are just tiny dots for me. If I get very close I can make out that they are dwarves, but from any distance they are undistinguishable. But good work on finding the dwarf and building positions  :)
Title: Re: 3Dwarf beautification project
Post by: A_Fey_Dwarf on October 07, 2008, 02:41:09 am
Woah, this is amazing. Someone should give you a medal or something.
Title: Re: 3Dwarf beautification project
Post by: Baboonanza on October 07, 2008, 07:05:48 am
Very nice!

Have you had any luck with rock materials yet? If you are interested I can give you a full explanation (though my offsets are a bit out of date), it's more complicated than I ever would have imagined and my previous explanation was incomplete. I also have some info on determining the material types of constructed walls/floors.
Title: Re: 3Dwarf beautification project
Post by: Sukasa on October 07, 2008, 09:46:05 am
Lifevis is awesome.

WARNING: HUGE PICTURE
http://img.photobucket.com/albums/v714/darkflight_devil/asshigos1.jpg (http://img.photobucket.com/albums/v714/darkflight_devil/asshigos1.jpg)
Title: Re: 3Dwarf beautification project
Post by: Mithaldu on October 07, 2008, 11:02:42 am
However, all the dwarves are just tiny dots for me. If I get very close I can make out that they are dwarves, but from any distance they are undistinguishable. But good work on finding the dwarf and building positions  :)
I'm still experimenting there. One problem is, i'll eventually need to fit building stuff, up to 4 creatures and also items in one square. So i can't start it off with creatures filling the whole square.

Have you had any luck with rock materials yet? If you are interested I can give you a full explanation (though my offsets are a bit out of date), it's more complicated than I ever would have imagined and my previous explanation was incomplete. I also have some info on determining the material types of constructed walls/floors.
I haven't looked at that at all so far. Any kind of explanation that would save me research time would be greatly appreciated. :)

Also, many thanks to those of you leaving a few nice words and enjoying lifevis. :D
Title: Re: 3Dwarf beautification project
Post by: Thuellai on October 07, 2008, 11:06:12 am
It's definitely pretty cool, only thing I'm wondering, maybe I just haven't found it yet, but is there a zoom function?  The default distance gives me a good overview but doesn't let me get in close enough to really see all my fun stuff.
Title: Re: 3Dwarf beautification project
Post by: Mithaldu on October 07, 2008, 11:12:01 am
Middle-click + drag is the zoom. :)
Title: Re: 3Dwarf beautification project
Post by: Thuellai on October 07, 2008, 11:23:24 am
Ahhh, well, that explains it.  4-button mouse, you see.  Cool deal, that'll definitely make things much neater once I browbeat it into cooperation.
Title: Re: 3Dwarf beautification project
Post by: Mithaldu on October 07, 2008, 11:26:24 am
Be happy i don't design the ui around my 7-button mouse. :D
Title: Re: 3Dwarf beautification project
Post by: Thuellai on October 07, 2008, 11:30:17 am
But...  what...  seven...  That's so...  *asplode*

But yeah, the program itself seems to work great and as soon as I figure out which of these buttons is considered the "middle" click button, I'll enjoy it even more, especially when I do my towers.
Title: Re: 3Dwarf beautification project
Post by: andrea on October 07, 2008, 12:31:58 pm
sukasa, how do you take pictures like that?


also, i think it is time to use lifevis instead of 3dwarf
Title: Re: 3Dwarf beautification project
Post by: Sukasa on October 07, 2008, 02:04:25 pm
I just used printscreen, actually.  Just normal printscreen.

As well, will there ever be a mode to just view the map the way 3Dwarf lets you, or is that a feature you're wanting not to incorporate?

Secondly, I'm not too great, but if I could help with textures, are there any textures which would be particularly helpful for you to get?  Lastly, will you add display of [#/7] water at some point in the future?
Title: Re: 3Dwarf beautification project
Post by: andrea on October 07, 2008, 02:50:37 pm
i have never learnt how to use printscreen.
Title: Re: 3Dwarf beautification project
Post by: Mithaldu on October 07, 2008, 03:03:12 pm
Just hit the key, then open any image editor, like ms paint (preferrably something not shitty, like http://www.getpaint.net/ ), then press ctrl+v or in the menu edit->paste, then save as a PNG or a JPG. Never as a BMP though, that makes people wish bad things on your head, like the syphilis.
Title: Re: 3Dwarf beautification project
Post by: andrea on October 07, 2008, 03:23:45 pm
is the "paint" that comes with the computer good enough?
Title: Re: 3Dwarf beautification project
Post by: Sukasa on October 07, 2008, 04:33:01 pm
more than good enough, just be sure to save as a file type other than .bmp.
Title: Re: 3Dwarf beautification project
Post by: andrea on October 07, 2008, 04:42:07 pm
already done, thanks for the help. i posted a picture of 3Dwarf on dwarf mode forum(megaproject thread).
but next one will be lifevis! if i understood well , it also show my dwarves and other creatures?
Title: Re: 3Dwarf beautification project
Post by: YojimboUsaka on October 07, 2008, 07:28:04 pm
A most excellent piece of work there!  Now to just find a saved game of my port city so I can bask in its full gloriusnessness.

Much appreciated.

Yoj
Title: Re: 3Dwarf beautification project
Post by: Mithaldu on October 08, 2008, 03:40:20 am
(http://i35.tinypic.com/2cr4ygi.png)

Some of you may have noticed my earlier update. Here comes another one:

http://dwarvis.googlecode.com/

Changes in v0.202:
 - Converted the memory read calls, resulting in a speed-up of 200% at minimum to all update operations.
- Tweaked creature updates for some further smaller gains.
- Added a readme file.
- Added REAL reading of the building data. This means the previous guessing stuff vanishes and is replaced by the real thing. However, as i have no clue yet what the building data means aside from a guess at the coordinates, they're only displayed as bright red single square blocks and some of them may be off.

However, here's where you come in. I can do two things now:
1. I get down and analyze the building data to find out what all the numbers mean, delaying other improvements (liquids).
2. I write some code to export the data on the buildings, have you guys look through it and go on to improve other things myself.

Which way i go depends on *you*. If i can get some reassurance from you guys that you're interested in taking the building data apart, i'll go way 2, otherwise it's way 1. Personally i don't care either way. :)
Title: Re: 3Dwarf beautification project
Post by: sinoth on October 09, 2008, 10:15:26 am
I vote #2.  Feed us some daaata xD
Title: Re: 3Dwarf beautification project
Post by: Neonivek on October 09, 2008, 11:04:48 am
What are those red blocks in that picture? Errors? Placeholders for objects and constructions?
Title: Re: 3Dwarf beautification project
Post by: Sukasa on October 09, 2008, 12:11:34 pm
Buildings, from what I gather.  We don't have the specifics though, so that's why it's red blocks.

And on #2, I'd be willing to help, if I could
Title: Re: 3Dwarf beautification project
Post by: Mithaldu on October 09, 2008, 01:04:27 pm
Alright, you got it:

v0.204
  * Added display of item placeholders.
  * Tweaked settings to speed graphics up a bit.
  * Added export of data of items/buildings/creatures in current square.
  * Fixed bug in rendering loop that prevented buildings from rendering in cells without creatures.

Download: http://dwarvis.googlecode.com/

Note: You use F12 to export the data. It'll drop the hexdump into a file called export.txt. If you run the console version it will also display it on the screen.

--

Neonivek: Not to be mean, but didn't we have something like this already? Please read the entire posts above you before asking. It's clearly written in there.
Title: Re: 3Dwarf beautification project
Post by: Sukasa on October 09, 2008, 01:11:56 pm
haha, I went to run lifevis and found out about this new version because of the alert to v2.04, nice.  downloading now.
Title: Re: 3Dwarf beautification project
Post by: Neonivek on October 09, 2008, 01:26:36 pm
I personally didn't think "Red blocks" (being a placeholder) would be in the changes XD

So I appologise

Though in the future you could say "It was already mentioned in the original post", I don't need a lecture  ;D
Title: Re: 3Dwarf beautification project
Post by: Sukasa on October 09, 2008, 01:37:53 pm
Hm, perhaps it's just me, or perhaps my system is just bogged down by something, but this version seems a huge lot slower.  This isn't a complaint - there's a lot more to do, but if anyone just really wants to see their fort, v0.202 might be a better choice for them >_>
Title: Re: 3Dwarf beautification project
Post by: Mithaldu on October 09, 2008, 01:43:34 pm
I should note now that i am not a nice person. And as the not nice person i am i will now say: Anyone will be able to get lifevis to run exactly as fast as they want, as long as they read the readme and the config file. Anyone who doesn't, i don't care for. If a person cannot bring up the attention to read through two files totalling 1400 words, then i do not care for that person.

Neo: Only if the question doesn't come from you again. ;)
Title: Re: 3Dwarf beautification project
Post by: Mithaldu on October 09, 2008, 10:14:27 pm
Good news and some updates on progress:

A goon going by the name of tripwire, has made some pretty nifty stairs. You can check them out in the DF thread on SA. :)

As for code:

I've completely reworked the main program structure and implemented a central thread controller instead of having the threads just throw off control to any random other thread whenever they wish. This should theoretically make things a bit faster, but i can't really think of a way to measure that. Furthermore i managed to get the display routine into its own loop, which means two things: More speed-up, as looping is a lot faster than calling functions; as well as a more responsive interface, since i've currently set it up so the render loop gets at least 50% of all cycles whenever it needs to render. This means that any slowdown you may experience will absolutely only come from OpenGL bogging down under the load of how much it has to draw.

Which leads to the next thing. I think i have solved the problem of "Omg, i have 10 layers of stones in my stone bunker and the 3000 item are bogging down the performance!" The problem here is: I figured, since items aren't very static, i wouldn't need to put them in a display list. Reason being: Display list generation isn't very cheap and requires for me to create structures to organize them. However i'm pretty much forced to do it in some way.

As such i'm thinking: When an item has been in a place for some while, say, longer than a minute, then it's unlikely that it'll move again within the next ten minutes and can safely be put into a display list. Or am i thinking too naively about gameplay? I'm kinda lacking in real-world experience there. :)

Also: Why the heck did nobody tell me forwarding the numpad keys doesn't work?
Title: Re: 3Dwarf beautification project
Post by: Footkerchief on October 10, 2008, 04:50:25 am
Whoa, I didn't do the stairs, that was tripwire.  I just contributed the fortress in those screenshots.
Title: Re: 3Dwarf beautification project
Post by: Baboonanza on October 10, 2008, 06:39:39 am
This means that any slowdown you may experience will absolutely only come from OpenGL bogging down under the load of how much it has to draw.
If OpenGL rendering is what's slowing it down then you're doing something wrong :). Seriously, the numbers of triangles you're drawing is trivial, the trick is just knowing how to correctly and efficiently cache the geometry data on the video card. My suggestion would be:
Use Vertex Buffer Objects. These are the most optimised way and also give you more control than display lists.
For each terrain block:
   1 vertex buffer containing triangle vertices (ideally these should be optimised for vertex sharing between triangles)
   1 index buffer containing all the indices for drawing triangles, sorted by triangle texture (so that you have all 'granite' textured triangle indices, followed by 'loam' ect). It may be easier to use a different index buffer for each texture, but this adds the overhead of an additional GL pointer call.
   A structure containing the textures and their first index and number of triangles. To draw the block you iterate through the textures and call glDrawArrays once for each texture.
When you update the blocks it may also be faster to do a memcmp on the tile data to avoid regenerating the buffers when no changes take place.

Which leads to the next thing. I think i have solved the problem of "Omg, i have 10 layers of stones in my stone bunker and the 3000 item are bogging down the performance!" The problem here is: I figured, since items aren't very static, i wouldn't need to put them in a display list. Reason being: Display list generation isn't very cheap and requires for me to create structures to organize them. However i'm pretty much forced to do it in some way.
Each object's model should be stored *once* in vertex/index buffers as outlined above (or a display list if you really want to). Then draw this model as many times as necessary to represent the visible objects, and it won't make any difference whether they are moving or not.

If you have any interest in performance at all you should absolutely avoid sending *any* geometry to the graphics card during the rendering loop, and just be drawing precached data. This will give you many more cycles to spend on updating the map.
Title: Re: 3Dwarf beautification project
Post by: Draco18s on October 10, 2008, 10:45:59 pm
Middle-click + drag is the zoom. :)

Middle-click + drag should be pan, IMO.  Mouse WHEEL should be zoom.  Right Mouse is rotate.

Of course, that's the way I'm trained due to only 4 commercial level applications being set up that way...(Except Maya, but then Maya doesn't understand the concept that the mouse and the keyboard are separate entities and should be treated as such, alt+middle-mouse-drag is rotate while ctrl+middle-mouse-drag is pan while just middle-mouse is left click?)
Title: Re: 3Dwarf beautification project
Post by: Jifodus on October 11, 2008, 11:27:21 am
Middle-click + drag should be pan, IMO.  Mouse WHEEL should be zoom.  Right Mouse is rotate.
I hate it when everyone and their dog assume I want/have a mouse wheel with 3+ buttons.

Left+Right should be zoom.
Right rotate.
Left interact.

And keyboard shortcuts for all of the above. (Yes, I do have a computer that I do use that doesn't have a mouse attached to it).
Title: Re: 3Dwarf beautification project
Post by: Draco18s on October 11, 2008, 03:40:39 pm
Middle-click + drag should be pan, IMO.  Mouse WHEEL should be zoom.  Right Mouse is rotate.
I hate it when everyone and their dog assume I want/have a mouse wheel with 3+ buttons.

Left+Right should be zoom.
Right rotate.
Left interact.

And keyboard shortcuts for all of the above. (Yes, I do have a computer that I do use that doesn't have a mouse attached to it).

I agree about the keyboard shortcuts, however you might want left+right to be pan instead of zoom, because you'll use it more.
Title: Re: 3Dwarf beautification project
Post by: Zaratustra on October 11, 2008, 06:20:58 pm
I hate it when everyone and their dog assume I want/have a mouse wheel with 3+ buttons.

Left+Right should be zoom.
Right rotate.
Left interact.

Well -I- hate when everyone and their dog assume I don't have a mouse wheel with 3+ buttons.
I say accumulate both functions! OR have a config.
Title: Re: 3Dwarf beautification project
Post by: Mithaldu on October 11, 2008, 08:52:57 pm
Whoa, I didn't do the stairs, that was tripwire.  I just contributed the fortress in those screenshots.
Ack, thanks for correcting me, post modified. ^^



OpenGL!!!
How to put this ... I'm pretty much doing all of that already. ^^

You can check a post from me on that topic here: http://forums.somethingawful.com/showthread.php?threadid=2917631&userid=125080&perpage=40&pagenumber=2#post350470768

Summary: I was completely off-base and apparently trying to for-loop through 15000 items per render call is a tad too much. I'm not exactly sure what i can do about that yet. Maybe it's the fact that on each loop instance it instances a new copy of the array index, but in the end i'll figure something out.

Also, VBOs scare me. Working in Perl i can't use ANY c++ examples, since the syntax is slightly different and the variable typing radically so. Aside from that i've also been unable to find a simple enough example to go in and experiment with, since all examples seem to be "let's draw this uber-complex shit with VBOs", instead of "how do i draw a single triangle with VBOs?".
Display lists are nice and easy. They have begin, end, a number, and that's it.



Quote from: Everyone
Mouse buttons!
Everyone, Forums-Poster is throwing a tantrum!
Guys, if you want to have idelogical wars about this, do so, but somewhere else please? The implementation that is currently there happened as follows: First i wanted to turn around, but not all the time and with some freedom, so i put it on the left mouse button and ensured it scans as long as it's held, even outside the window. Then i played around with glut and found it has some menu stuff, so i played with that and put it on the left button. Sometime later i realized, moving around to get close to stuff is fucking awkward, i need zoom. But left and right were in use already, so i used the next free mouse button i had. Absolutely zero thought went into the layout, it all happened as it was needed.

Now, personally, i don't care how it's arranged. People will get used to anything. I may make the defaults a little bit nicer later on if i don't have anything more pressing to work on and i may even throw in options for it. However right now, i have more important stuff to do.

If you're interested, you can even fiddle around with it yourself. It's really rather easy. Go into the directory Lifevis, open Viewer.pm in any text editor (notepad++ recommended if you don't have an IDE. it has nice highlighting). Then scroll down to the bottom and check out these functions:

sub process_key_press {
sub process_special_key_press {
sub process_mouse_click {
sub process_active_mouse_motion {

Just by reading it, it should be pretty obvious what's going on and any change you do will be picked up by the executables instantly. Heck, if you change it and make it more solid, send it to me and i'll add it in. :)
Title: Re: 3Dwarf beautification project
Post by: Baboonanza on October 12, 2008, 12:32:05 pm
How to put this ... I'm pretty much doing all of that already. ^^

You can check a post from me on that topic here: http://forums.somethingawful.com/showthread.php?threadid=2917631&userid=125080&perpage=40&pagenumber=2#post350470768

Summary: I was completely off-base and apparently trying to for-loop through 15000 items per render call is a tad too much. I'm not exactly sure what i can do about that yet. Maybe it's the fact that on each loop instance it instances a new copy of the array index, but in the end i'll figure something out.

Also, VBOs scare me. Working in Perl i can't use ANY c++ examples, since the syntax is slightly different and the variable typing radically so. Aside from that i've also been unable to find a simple enough example to go in and experiment with, since all examples seem to be "let's draw this uber-complex shit with VBOs", instead of "how do i draw a single triangle with VBOs?".
Display lists are nice and easy. They have begin, end, a number, and that's it.
Apologies :) I suspect using VBOs would still give you some advantage but as you say they may be more difficult to use from Perl. One thing to consider using display lists is that I believe they are optimized more efficiently by the driver (ie straight to VBOs) when they contain only geometry calls (no state changes). This might be something to try.

As for the objects, I can think of one or two methods to reduce your overhead that should be simpler than normal frustum culling etc., although I'm basing this on a guess that they are stored similarly to constructions. If this is the case then they are ordered by tile coords (z then x then y if i remember correctly). This immediately allows you to skip multiple items in a single tile, since they will all be consecutive. As you also know which tiles are visible you should also be able to limit drawing to visible objects, especially by z level culling. To avoid iterating through the whole list to find certain coords I would suggest using a binary search, which is what Toady uses in DF.

As you can tell, I have an interest in the subject but I'm just trying to help so please don't take offense if I'm telling you stuff you already know ;) At some point I'll have a look at the code and see if I can help but not knowing Perl is a bit of a hinderance there.

Edit: And if it helps, here is my (limited) knowledge of the construction/building structure:
offset, length, field
0x0 WORD x-coord
0x2 WORD y-coord
0x4 WORD z-coord
0xC WORD stone matgloss index (ie. 192 = bauxite) of contruction material
I never got as far as working out how none-stone constructions worked.

 
Title: Re: 3Dwarf beautification project
Post by: Pure_W on October 13, 2008, 10:08:18 am
I keep on geting a warning about some adware gen whenever i open lifevis.

Then it crashes and asks me if i want to send a report!
Please help  :(
Title: Re: 3Dwarf beautification project
Post by: Mithaldu on October 13, 2008, 11:44:36 am
Baboon: You'll get a detailed answer once i'm more awake.

Pure_W: Download this and replace the .exe files. I've recompiled them manually and they shouldn't make paranoid AVs go crazy anymore.

http://dwarvis.googlecode.com/
Title: Re: 3Dwarf beautification project
Post by: Sukasa on October 13, 2008, 01:30:03 pm
haha, 15000 items?  My fort had about 34,000 item tasks listed alone x_x  Probably why it was running so slow, heh.  Also, thanks for reminding me about the readme, figures that would be the only time I would forget to read it  ._.
Title: Re: 3Dwarf beautification project
Post by: Mithaldu on October 13, 2008, 02:03:42 pm
The new version should be a bit faster. Also, is it ALWAYS slow or only when you're looking at the items?
Title: Re: 3Dwarf beautification project
Post by: Pure_W on October 13, 2008, 02:09:37 pm
Good!

Would it be possible for the arrow keys to move the cursor in the way the camera is facing?
Title: Re: 3Dwarf beautification project
Post by: Mithaldu on October 13, 2008, 02:24:58 pm
uh, no, not easily, as all input is sent to DF.
Title: Re: 3Dwarf beautification project
Post by: Sukasa on October 14, 2008, 09:50:13 am
I wouldn't know whether it was faster or not, since I only got about eight or nine frame updates before being forced to kill the process after ten minutes,
Title: Re: 3Dwarf beautification project
Post by: Mithaldu on October 14, 2008, 10:21:32 am
And new Lifevis version. I spent the past days poking at the information i have about items and found some nice stuff. For those interested, i also added it to the wiki, here: http://dwarf.lendemaindeveille.com/...earch#Classes_2

The changes in short are: Faster, cleaner. I managed to cut out all items that are actually not visible, and thus also improved performance a lot.

Change-Log:

v0.213 - Date: 16:38:01, Dienstag, 14. Oktober 2008
- New self-compiled executables.
- Items that are in bins now get ignored.
- Interface cleaned up a bit.
- Item data now stored in array and indexed by DF-internal item id, instead of in a hash indexed by memory address.
- Items are now only stored when they are lying on the ground and not hidden.

v0.209
- Mostly performance improvements, as follows:
- Memory loop now sleeps until needed.
- Memory loop becomes less aggressive when all current cells are protected.
- Idle tasks routine converted to "while"-loop with a central loop scheduler to cut number of routine calls.
- Added higher priority for drawing-loop, tweaked fps limiter to be more exact.
- Unnecessary cloning of arrays converted to much faster iteration over them.

Download: http://dwarvis.googlecode.com/
Title: Re: 3Dwarf beautification project
Post by: Mithaldu on October 14, 2008, 10:26:42 am
I wouldn't know whether it was faster or not, since I only got about eight or nine frame updates before being forced to kill the process after ten minutes,
Uh, thanks for only answering half my post, i guess? Please note for the future, that whenever you talk to software developers, it is absolutely imperative that you answer *all* questions they ask you. Otherwise you might not bother in the first place as you're wasting their time.

Anyhow, the new version should give you a marked performance increase. Could you also upload your save on drop.io so i can see if i can make some optimizations for problems encountered specifically in your save?

As for being forced to kill the process: I don't believe that, period. The only way you could actually lag shit out enough to make the X on the window unresponsive is by getting your ram filled. Lifevis however has an automatic ram limiter, which is currently set to 300 MB, as you should know by reading the config file.
Title: Re: 3Dwarf beautification project
Post by: Mithaldu on October 14, 2008, 10:42:13 am
Apologies :) I suspect using VBOs would still give you some advantage but as you say they may be more difficult to use from Perl. One thing to consider using display lists is that I believe they are optimized more efficiently by the driver (ie straight to VBOs) when they contain only geometry calls (no state changes). This might be something to try.
No need to apologize. :)

As for VBOs, the problem isn't in them being more difficult to use. The problem is that i have not the slightest idea how they work, no working examples to start off with and lastly, no *simple* vbo examples i could try to convert. It seems to me that whoever invented them was deadset on requiring anyone wishing to use them to already understand how they work before he begins.

As for splitting display lists to contain no state changes, that would roughly multiply the number of display lists i need to call per render by 10-20. I'm not sure that's worth it, tbh. It would also massively increase the code effort necessary to rebuild them whenever the environment changes.

As for the objects, I can think of one or two methods to reduce your overhead that should be simpler than normal frustum culling etc., although I'm basing this on a guess that they are stored similarly to constructions. If this is the case then they are ordered by tile coords (z then x then y if i remember correctly). This immediately allows you to skip multiple items in a single tile, since they will all be consecutive. As you also know which tiles are visible you should also be able to limit drawing to visible objects, especially by z level culling. To avoid iterating through the whole list to find certain coords I would suggest using a binary search, which is what Toady uses in DF.
I tried skipping of items when there are more than one per tile already. The cpu cycles needed to track that negated any gain that the skipping gave. Besides, i may want to actually draw all visible items on a tile later on. ^^

Object culling isn't something i really want to do. I'm already using gluPerspective, so anything not in front of the camera isn't being drawn either way. Z-level culling sounds neat in theory, but you forget that the camera can be tilted in MANY possible ways and thus there would need to be some pretty expensive visibility checks.

I'm not sure what a binary search in this context means, but i'm fairly sure i'm using something more effective: I'm maintaining a list of items in each cell, so when rendering the script cycles through the cells, gets the lists of ids, then looks the ids up in the item list directly. No extraneous searching at all. :) By the way, my philosophy here is "We're using a language that is horrible with memory efficiency and are doing something that pretty much requires a dual core CPU anyhow. If something can give a performance improvement, any memory cost is justified."

As you can tell, I have an interest in the subject but I'm just trying to help so please don't take offense if I'm telling you stuff you already know ;) At some point I'll have a look at the code and see if I can help but not knowing Perl is a bit of a hinderance there.
It wouldn't actually be much of a hinderance, since Perl is made to be very human-readable and i generally write pretty clean code. (Although lifevis is in dire need of refactoring and cleaning.)

Edit: And if it helps, here is my (limited) knowledge of the construction/building structure:
offset, length, field
0x0 WORD x-coord
0x2 WORD y-coord
0x4 WORD z-coord
0xC WORD stone matgloss index (ie. 192 = bauxite) of contruction material
I never got as far as working out how none-stone constructions worked.
The matgloss thing is new to me, which is pretty awesome. :D
Could you please add such things to the wiki here? http://www.dwarffortresswiki.net/index.php/User:Rick/Memory_research#Item
Title: Re: 3Dwarf beautification project
Post by: Sukasa on October 14, 2008, 12:27:07 pm
...Anyhow, the new version should give you a marked performance increase. Could you also upload your save on drop.io so i can see if i can make some optimizations for problems encountered specifically in your save?

As for being forced to kill the process: I don't believe that, period. The only way you could actually lag shit out enough to make the X on the window unresponsive is by getting your ram filled. Lifevis however has an automatic ram limiter, which is currently set to 300 MB, as you should know by reading the config file.
This doesn't show the processes tab, but I assure you, the CPU field was 97.

Consider that dwarf fortress never gets above 50 since it's a dual-core.  Lastly, I answered your question to the degree I was able to.  If the program was so badly lagged that I couldn't move to hide the items, exactly what do you expect me to say?  'least I'm trying to be helpful.  Lastly, about the X- if the program is lagging so badly as to be updating stupidly slow, do you honestly expect me to expect the program's close button to work?  But whatever, going to download the new version and let you know how well it works.
Spoiler (click to show/hide)

EDIT: Okay, went back and tried out the new version, here's what resulted:

First, it was way faster.  As in, more than one FPS.  Well, TBH it ran nicely, and was responsive.  I had approximately 38,500 item-tasks and 8,400 building-tasks.  However, it once about 3/4 of the items (by item-tasks when it was idling) were on-screen it started to slow down, pushing core 1 (last time, it was set to both cores.  This time, it was relegated to a single core only) to 100%.  Shortly thereafter, when I clicked 'close', it froze and Vista declared it a crash.  I also got the save for you- I hope it's complete, I checked out VirtualStore and /dwarf fortress/, so this should be the entire save.

http://drop.io/Sukasa_Cavepacks
Title: Re: 3Dwarf beautification project
Post by: Mithaldu on October 14, 2008, 01:43:31 pm
Quick update, because i think i just managed to improve performance again a good bit.

v0.215 - Date: 20:29:24, Dienstag, 14. Oktober 2008
 - Bugfix to make the view update when the drawing range is changed even then the cursor isn't moved.
 - Far clipping plane moved closer to reduce z-errors.
 - All Perl modules updated to most current versions, especially OpenGL, which is now at 0.57 and includes freeglut.

Download: http://dwarvis.googlecode.com/
Title: Re: 3Dwarf beautification project
Post by: Mithaldu on October 14, 2008, 01:57:17 pm
This doesn't show the processes tab, but I assure you, the CPU field was 97.

Consider that dwarf fortress never gets above 50 since it's a dual-core. 
Completely normal. Any 3D application will use as much CPU as it can get, in the case of lifevis even a bit more than DF can grab, since it can partly run threaded. Whenever running a 3D application and it is NOT hogging at least one core completely, something is foul. ... I really wish people would stop seeing 100% CPU and go all :tinfoil:.

Lastly, I answered your question to the degree I was able to.  If the program was so badly lagged that I couldn't move to hide the items, exactly what do you expect me to say?  'least I'm trying to be helpful.
Thing is, you never even mentioned that. I can't read thoughts and if you look back at your post, you might see how it looks like you completely ignored the second question. ;)

Also, you could've simply closed lifevis, moved the view/cursor in DF and restarted lifevis. It doesn't move *anything* by itself and only reads where DF is currently pointing at. ... Again, i wish people would actually bother to read the thread, so i wouldn't need to explain this again. :sigh:


Lastly, about the X- if the program is lagging so badly as to be updating stupidly slow, do you honestly expect me to expect the program's close button to work?
Yes, simple reason: The window chrome is constrolled by Windows itself, so even if the task freezes, it will recognize that and ask you whether it should nuke the task. And heck, if the program is not even frozen, then there is NO reason whatsoever to assume the X won't work, period.



First, it was way faster.  As in, more than one FPS.  Well, TBH it ran nicely, and was responsive.  I had approximately 38,500 item-tasks and 8,400 building-tasks.  However, it once about 3/4 of the items (by item-tasks when it was idling) were on-screen it started to slow down, pushing core 1 (last time, it was set to both cores.  This time, it was relegated to a single core only) to 100%.  Shortly thereafter, when I clicked 'close', it froze and Vista declared it a crash.  I also got the save for you- I hope it's complete, I checked out VirtualStore and /dwarf fortress/, so this should be the entire save.

http://drop.io/Sukasa_Cavepacks
That save is pretty damn awesome, thank you! There's so much shit going on there that it'll probably account for the majority of my test cases. :D

I'm not sure where you're getting 8000 building tasks from? I only see 2600 buildings. When it crashed, did it write something to error.txt?

Also, try the new version. I can display your entire map (upped the range to max with the little [ + ] button) at 8 FPS, with the window full-screened and view the [F1] position with all items loaded and default window size at default range with 24 FPS. (Wiggle the view around a bit to get fraps to show the full fps.)

Here's my system if you want to compare to your performance: http://rafb.net/p/7Rv3Rz50.html
Title: Re: 3Dwarf beautification project
Post by: Sukasa on October 14, 2008, 02:04:56 pm
I'll just post the relevant system specs for my system:

2.00Ghz. Intel Dual-Core CPU
3 GBytes RAM, 6GBytes Pagefile
256MByte nVidia GeForce 8600M GS
Unknown FSB

Operating processes that use noticable amount of CPU:
Dwarf Fortress; Core 2 (dedicated core e.g. all other processes relegated to core 1)
Explorer
WinAMP
Skype
MSN Messenger
System Monitors
Usually Chrome

The reason I noted the CPU increase was because the previous version was not lagging any other programs on the system, and that time it had actually caused WinAMP to stutter on an MP3, I should have clarified that, sorry.  The reason I couldn't close/reopen Lifevis was because the fort was too big to really get a good non-item shot without moving the camera with the mouse.  Lastly, 8000 buildings might have been me misreading that number, somewhat easy with how chaotic that fort is.

EDIT: update:

Can't load 'C:/Users/Sukasa/Documents/Downloads/Lifevis_v0.215/site/lib/auto/OpenGL/OpenGL.dll' for module OpenGL: load_file:The specified module could not be found at C:/Users/Sukasa/Documents/Downloads/Lifevis_v0.215/site/lib/DynaLoader.pm line 202.
 at Lifevis/Viewer.pm line 271
Compilation failed in require at Lifevis/Viewer.pm line 271.
BEGIN failed--compilation aborted at Lifevis/Viewer.pm line 271.
Compilation failed in require at Lifevis\Launcher.pm line 19.

I just tried to run v0.215 to give feedback on performance, but that occurred.  I couldn't see anything about that in the readme, though.  Lastly the error popup mentioned freeglut, not opengl.dll.

EDIT2: Unfortunately, I wouldn't know if it wrote anything to error.txt, since it was being run from Winrar, not a proper folder (as a side note, the crash above happened when run from both winRAR and a proper folder)
Title: Re: 3Dwarf beautification project
Post by: Mithaldu on October 14, 2008, 02:36:37 pm
The performance thing is weird. Lifevis is set to run at lowest priority, so there should always be something over for other processes. Maybe your gfx driver is a bit too old or something.

As for the bug, try downloading again, i hadn't included the freeglut dll, since i had it in my system32 directory and it thus didn't throw any errors on running it isolated.


"Run from winrar"? What the christ. I'll simply say that i do not support such methods and i can't think that *any* application will react well to being treated that way.

Why is it always furries who manage to find methods to do shit on their computer that make me want to bash my head into the desk?
Title: Re: 3Dwarf beautification project
Post by: Sukasa on October 14, 2008, 02:42:29 pm
Why is it always furries who manage to find methods to do shit on their computer that make me want to bash my head into the desk?
uhm, what?  You may want to check your facts here >_>

If you're referring to the 'Sukasa' on DeviantArt, I'll just let you know (since you couldn 't honestly know :P) that that's a completely different person in real life - the face we have the same username is a coincidence, and that I'm most definitely not a furry.

Oh, and as for WinRAR: basically, what I meant was that since winRAR extracts to a temporary directory, I never had the chance to view the error.txt file, since I closed winrar after closing lifevis - which, due to the way winrar works, meant the the files were all present until well after lifevis closed.  Chill.

EDIT: and on second thought, I'll add this: your program responds fine to winrar, so long as the files are present.  Go figure, I can run just about anything without there being problems ;)
Title: Re: 3Dwarf beautification project
Post by: Mithaldu on October 15, 2008, 02:29:48 am
I was actually going by your screenshot up there.

Anyhow, last i checked winrar only unpacked the executable, not the whole archive. Guess it's something new.

How's the performance on the latest one though? It should at least be usable now. :)
Title: Re: 3Dwarf beautification project
Post by: Sukasa on October 15, 2008, 08:11:57 am
Well, I haven't had time to try and tweak it yet, but going off the default settings for v0.215 versus v0.213, performance is a fair bit better.  I also noticed that this time it didn't hang or crash when I tried to close it via the chrome.  And yeah, winrar now unpacks the entire directory, so I tend to use that to save HD space (how the heck do I even manage to fill so many gigabytes so fast?!)
Title: Re: 3Dwarf beautification project
Post by: QuantumSawdust on October 16, 2008, 10:00:59 pm
versions .215 and .213 both don't work on my computer. However a version I had from about 10 days ago still does work (back before .exe move). Sorry for the lack of information, if you think it would be helpful I'll come back later when I have time and update with more details.
However, I can quickly say I have XP, 3gigs ram and 2x1.83 ghz processor.

The error log returns
Can't load 'C:/Clandestine Revolt/Games/Dwarf Fortress/Lifevis_v0.215/site/lib/auto/Coro/State/State.dll' for module Coro::State: load_file:This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem at C:/Clandestine Revolt/Games/Dwarf Fortress/Lifevis_v0.215/site/lib/XSLoader.pm line 70.
 at C:/Clandestine Revolt/Games/Dwarf Fortress/Lifevis_v0.215/site/lib/Coro/State.pm line 106
BEGIN failed--compilation aborted at C:/Clandestine Revolt/Games/Dwarf Fortress/Lifevis_v0.215/site/lib/Coro/State.pm line 112.
Compilation failed in require at C:/Clandestine Revolt/Games/Dwarf Fortress/Lifevis_v0.215/site/lib/Coro.pm line 64.
BEGIN failed--compilation aborted at C:/Clandestine Revolt/Games/Dwarf Fortress/Lifevis_v0.215/site/lib/Coro.pm line 64.
Compilation failed in require at Lifevis/Viewer.pm line 71.
BEGIN failed--compilation aborted at Lifevis/Viewer.pm line 71.
Compilation failed in require at Lifevis\Launcher.pm line 19.

Hope this helps, I love the program.
Title: Re: 3Dwarf beautification project
Post by: Mithaldu on October 17, 2008, 02:24:38 am
Yea, i need more details on that. Specifically i need you to download Process Monitor (http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx). Start it, try to run lifevis once so you get the error, then click the magnification glass button in procmon, file->save, then upload it on drop.io, zipped or rared, of course.
Title: Re: 3Dwarf beautification project
Post by: Mithaldu on October 17, 2008, 09:22:23 am
Ok, got the data. You'll need to install this: http://www.microsoft.com/downloads/details.aspx?familyid=9B2DA534-3E03-4391-8A4D-074B9F2BC1BF
Title: Re: 3Dwarf beautification project
Post by: QuantumSawdust on October 20, 2008, 04:00:07 pm
Thanks, that worked perfectly.
I love the new version, it does run much smoother. Because I have a very large map (x,y, and z) the livevis runs a tad slowly, but far faster than I would have expected. All around, impressive.
Title: Re: 3Dwarf beautification project
Post by: Dempf on October 22, 2008, 05:30:06 pm
Thanks for all the hard work you're putting into this program! This has great potential!
Title: Re: 3Dwarf beautification project
Post by: forsaken1111 on October 22, 2008, 10:34:30 pm
This has great potential!

Hah, that's an understatement. Mithaldu, if you could alter it a bit to make a simpler version that displayed things exactly the way Dwarf Fortress (1 item to a tile for example) and to show simple textures with the ASCII character on the sides of the blocks, and if you could make the text and menu appear in the window, I would just minimize DF and play completely in lifevis. Just being able to see everything in 3d, even if you didn't have nifty textures/models yet for everything, makes this full of win. I know that may seem like 'dumbing down' but it would be a workable, playable version and a middle step until you get everything fully implemented.
Title: Re: 3Dwarf beautification project
Post by: I3erent on October 22, 2008, 11:16:53 pm
I am decidedly impressed mithaldu.... Keep up the good work my friend.
Title: Re: 3Dwarf beautification project
Post by: AlienChickenPie on November 01, 2008, 11:31:44 am
Lifevis didn't start up, so I installed ActivePerl and the Microsoft doodad you linked to.
I had about five seconds to be amazed, after which my video card driver crashed, along with DF and Lifevis. Good times.
I'll try to reproduce it. What tools should I run along with the program to give you useful information regarding the crash?
Title: Re: 3Dwarf beautification project
Post by: Mithaldu on November 01, 2008, 04:08:44 pm
Three things for now: First, check the error.txt file. Second, make sure you're running .40d. Thirdly, start -> run -> dxdiag -> save information as, then upload to rafb.net/paste (http://rafb.net/paste).
Title: Re: 3Dwarf beautification project
Post by: Mithaldu on November 11, 2008, 08:12:22 am
New Lifevis version! v0.249
(http://bildhoster.com/bild.php/1391,perl2008111114071914pngPKN1I.png)

Hey guys. I've been quiet the past month and it was because i was working on the guts of Lifevis. The last few updates where i included items made one thing painfully clear: It was too slow. Additionally there was a problem with z-fighting due to too much crap being rendered.

Asking the SHSC goons for advice on the latter issue led to one of them, OneEightHundred, showing me a method on how to solve both in one go. After doing some rather painful hacking on the modules on CPAN i managed to get it to run in an experimental fashion.

Today marks the day where i have managed to officially bring occlusion testing to Lifevis. This means, in short, that Lifevis now does a rather crude check on whether anything in a given cell will actually be visible, and skips drawing it if that isn't the case. The best part about this is: The visibility check can be improved quite a bit yet.

For those who do not know yet what Lifevis is, i suggest watching this demonstration video: http://www.veoh.com/videos/v16314761MGwKDQR7 (http://www.veoh.com/videos/v16314761MGwKDQR7) (I have no idea if it's boring or whether i could improve on it, so if you have comments, please feel free to. I thrive on being criticized.)

For the rest of you, the download is here, as usual: http://dwarvis.googlecode.com (http://dwarvis.googlecode.com)
Title: Re: 3Dwarf beautification project
Post by: Mel_Vixen on November 11, 2008, 08:29:41 am
Awesome video and good work Mithaldu. Lifeis doesnt support ADV-mode right?
Title: Re: 3Dwarf beautification project
Post by: Mithaldu on November 11, 2008, 08:47:08 am
Thanks. :)

As for adventure mode ... I had no idea. Apparently it kinda works. :D But at one point it horribly died for me.
Title: Re: 3Dwarf beautification project
Post by: Mel_Vixen on November 11, 2008, 09:04:34 am
 ;D so after fort mode is done, you could cook up something for adv-mode. I would freak out if i could see the villages i burn er ehhmmm i mean purify from evil.

I never have done Perl so far so if this is an dumb question please excuse but did you add the sourcecode of your programm into the zip?
Title: Re: 3Dwarf beautification project
Post by: Mithaldu on November 11, 2008, 09:11:54 am
Unless something unforeseen happens, yes, i will. :)

As for the source, it's all there, right in the "Lifevis" folder. It actually runs straight from those files.
Title: Re: 3Dwarf beautification project
Post by: AlienChickenPie on November 11, 2008, 10:00:09 am
I think I managed to solve my crashing problem. This was a while ago, so I don't remember the exact things I did, but it had something to do with reinstalling everything you said to install, plus something that was either implied or seemed like a half-obvious good idea.
Title: Re: 3Dwarf beautification project
Post by: Greiger on November 11, 2008, 10:17:40 am
error.txt
glDeleteQueries is not supported by this renderer at Lifevis/Viewer.pm line 1628.

dxdiag wall o' text
http://rafb.net/p/AgQw6F15.html

Fraid I can't get it to run.  I think I know why as it sounds like my old ATI Radeon 9250 PCI can't handle it.  But it ran previous versions fine so I'm posting here in case its something weird.  You know what it's trying to do, I can only guess at it.
Title: Re: 3Dwarf beautification project
Post by: Mithaldu on November 11, 2008, 10:22:27 am
ACP: Good to hear. Probably Directx or graphics card driver.

Greiger: As mentioned above, try updating your graphics card driver as well as Directx from microsoft.com. Your stuff is from 2006.
Title: Re: 3Dwarf beautification project
Post by: Greiger on November 11, 2008, 11:52:45 am
Not sure what I can do about the graphics card drivers, as I apparently have the most recent Omega version that works with my card, maybe I can find something on the main ATI site.  I'll upgrade the directx too.

Thanks for the response.  Looks spiffy from what I see so far.
Title: Re: 3Dwarf beautification project
Post by: Mithaldu on November 11, 2008, 12:33:26 pm
Please tell me if you can't get it to work, and i'll make the occlusion checks an option. It'll make things a good bit slower, but there's no alternative way for me there.
Title: Re: 3Dwarf beautification project
Post by: Impaler[WrG] on November 11, 2008, 01:21:38 pm
Very interesting program, hope to see more of it, unfortunately I'm getting the following error.

Can't load 'C:/Documents and Settings/Impaler/Desktop/Lifevis_v0.249/site/lib/auto/Win32/GuiTest/GuiTest.dll' for module Win32::GuiTest: load_file:This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem at C:/Documents and Settings/Impaler/Desktop/Lifevis_v0.249/site/lib/DynaLoader.pm line 202.
 at Lifevis/Viewer.pm line 104
Compilation failed in require at Lifevis/Viewer.pm line 104.
BEGIN failed--compilation aborted at Lifevis/Viewer.pm line 104.
Compilation failed in require at Lifevis\Launcher.pm line 19.


DynaLoader.pm had some comments near the error line to the effect of "Don't blame me" explaining that this is simply the last bit of perl that runs before other low level code fails.  This could easily be the case as my system is ancient.  What do you recommend I try?  I think my video driver is as updated as it can be, because support ceased long ago and I can't use the latest directx.
Title: Re: 3Dwarf beautification project
Post by: Mithaldu on November 11, 2008, 01:57:39 pm
Please try installing this: http://www.microsoft.com/downloads/details.aspx?familyid=32bc1bee-a3f9-4c13-9c99-220b62a191ee&displaylang=en
Title: Re: 3Dwarf beautification project
Post by: Randominality on November 12, 2008, 01:16:36 pm
its WAAAAAY slower than the last version for me - it lags like hell whereas the previous version ran remarkably smoothly
Title: Re: 3Dwarf beautification project
Post by: Mithaldu on November 12, 2008, 01:47:21 pm
What kind of system specs do you have?

Please paste the text file you can save with Start -> Run -> dxdiag onto pastebin.ca or similar service.

Also, are you seeing anything in the error.txt file?
Title: Re: 3Dwarf beautification project
Post by: Randominality on November 13, 2008, 11:37:19 am
my error.txt file is empty
and here is my Dxdiag:
http://pastebin.ca/1255324 (http://pastebin.ca/1255324)
also my Q6600 is overclocked to 3.6GHz and my gfx card is overclocked a tad aswell
Title: Re: 3Dwarf beautification project
Post by: Kennel on November 13, 2008, 01:26:35 pm
Thanks. :)

As for adventure mode ... I had no idea. Apparently it kinda works. :D But at one point it horribly died for me.

Actually I think this might be even more useful for adventure than fortress mode. Exploring in mountaneous terrain is annoying in 2d mode and there is (I guess) less speed issues because it's turn based.

Good job btw, you are a real hero.
Title: Re: 3Dwarf beautification project
Post by: Mithaldu on November 13, 2008, 09:40:57 pm
my error.txt file is empty
and here is my Dxdiag:
http://pastebin.ca/1255324 (http://pastebin.ca/1255324)
also my Q6600 is overclocked to 3.6GHz and my gfx card is overclocked a tad aswell
Thanks for the info so far. Sadly pastebin.ca is acting up for me and not loading, but maybe that clears up tomorrow. Aside from that, from what you've told me, i can only guess that your drivers aren't quite up-to-date. Overclocking shouldn't be an issue.

You can also try uploading a copy of your region file at http://drop.io so i can check if anything is wrong with it.

That all aside, please download the latest version. It should run decidedly better.


Actually I think this might be even more useful for adventure than fortress mode. Exploring in mountaneous terrain is annoying in 2d mode and there is (I guess) less speed issues because it's turn based.
I noticed that myself. It seems to be fairly unintensive, compared with the Fortress mode. Also, thanks for the flowers. :)
Title: Re: 3Dwarf beautification project
Post by: roblob on November 14, 2008, 05:31:09 am
Hi,

I'm also getting the following error when running Lifevis:

Can't load 'D:/downloads/games/dwarf fortress/Lifevis/site/lib/auto/Win32/GuiTest/GuiTest.dll' for module Win32::GuiTest: load_file:This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem at D:/downloads/games/dwarf fortress/Lifevis/site/lib/DynaLoader.pm line 202.
 at Lifevis/Viewer.pm line 104
Compilation failed in require at Lifevis/Viewer.pm line 104.
BEGIN failed--compilation aborted at Lifevis/Viewer.pm line 104.
Compilation failed in require at Lifevis\Launcher.pm line 19.


I'm running the latest version of Lifevis and I've updated graphics drivers and directx, but to no avail. Any help would be greatly appreciated.
Title: Re: 3Dwarf beautification project
Post by: Mithaldu on November 14, 2008, 06:59:09 am
As i told the other dude with that problem before, please install this: http://www.microsoft.com/downloads/details.aspx?familyid=32bc1bee-a3f9-4c13-9c99-220b62a191ee&displaylang=en
Title: Re: 3Dwarf beautification project
Post by: Mel_Vixen on November 14, 2008, 12:41:25 pm
with that many details on creatures in the next release how about generating the creature Graphics procedural from the raws?
Title: Re: 3Dwarf beautification project
Post by: Footkerchief on November 14, 2008, 03:45:39 pm
with that many details on creatures in the next release how about generating the creature Graphics procedural from the raws?

Might be possible in the next version.  Right now bodies aren't specific enough.

e: oops, you already said "next release"
Title: Re: 3Dwarf beautification project
Post by: Mithaldu on November 14, 2008, 04:53:34 pm
Hey fuck you guys. :(

My mind is mapping out how to do stuff like that now.
Title: Re: 3Dwarf beautification project
Post by: Mike Mayday on November 14, 2008, 04:58:32 pm
That would be just like Slaves to Armok all around. A true torment.
Title: Re: 3Dwarf beautification project
Post by: Greiger on November 14, 2008, 05:47:01 pm
Did I mention that we love your work and you are an awesome dude? :D

Never could get it to work, but oh well, need to get a new computer one of these days anyway, this will be another reason for me to hurry up with the money saving.
Title: Re: 3Dwarf beautification project
Post by: mport2004 on November 14, 2008, 05:51:53 pm
I must say you are doing a fantastic job with this add-on so far. 
In the vid you mentioned that you didn’t have models for most of the items yet so would you possibly be accepting admissions for possible models if we happened to have the capability of making a few of them?  Also what program do you use when creating the models?
Title: Re: 3Dwarf beautification project
Post by: kasker on November 14, 2008, 08:00:07 pm
This is awesome. Models are in .obj so any program should work. I'll be making some models myself in my spare time and post them for anybody to use. Mithaldu is there a recommended triangle count for models? I got only the performance of my own comp to go by.
Title: Re: 3Dwarf beautification project
Post by: roblob on November 15, 2008, 01:38:39 am
As i told the other dude with that problem before, please install this: http://www.microsoft.com/downloads/details.aspx?familyid=32bc1bee-a3f9-4c13-9c99-220b62a191ee&displaylang=en

Forgot to mention it, but I did install that from reading the previous posts. No help there.

But it's my work computer that's acting up so I have to wait 'til Monday to try any other fixes. ;D

Anyway, thanks for this brilliant project. Keep up the great work!
Title: Re: 3Dwarf beautification project
Post by: Mithaldu on November 15, 2008, 08:10:05 am
That would be just like Slaves to Armok all around. A true torment.
Only for the dorfs. You need to keep in mind that writing an interface for an existing game is different than writing the game and the interface at the same time. ;)


Never could get it to work
Next thing i'll do is make this compatible with computers who can't do occlusion queries. :)


would you possibly be accepting admissions for possible models?  Also what program do you use when creating the models?
All that and more is answered in the readme and in the following thread. :) http://www.bay12games.com/forum/index.php?topic=25521.msg294382#msg294382
In short: Yes, Wings 3D or whatever you like that can do ".obj". :D


I'll be making some models myself in my spare time and post them for anybody to use.
Awesome! Please do note the thread linked above though. It has a bunch more info. =)
is there a recommended triangle count for models?
My target for now is ~1000 polys.


As i told the other dude with that problem before, please install this: http://www.microsoft.com/downloads/details.aspx?familyid=32bc1bee-a3f9-4c13-9c99-220b62a191ee&displaylang=en
Forgot to mention it, but I did install that from reading the previous posts. No help there.
Sorry to hear. Maybe this helps: [ http://www.microsoft.com/downloads/details.aspx?familyid=9B2DA534-3E03-4391-8A4D-074B9F2BC1BF&displaylang=en ] I think i got the wrong link in the previous post. I really need to add this to a FAQ file.
Title: Re: 3Dwarf beautification project
Post by: Mithaldu on November 18, 2008, 12:49:02 pm
Greiger and anyone else with older graphics card or non-nvidia graphics cards: Can you please do these steps to help me understand a bit about your hardware?

1. download http://www.realtech-vr.com/glview/download.html
2. save data via the blue cylinder at the top
3. upload at drop.io
Title: Re: 3Dwarf beautification project
Post by: EchoP on November 19, 2008, 12:21:02 am
http://drop.io/t1qdbfh
Title: Re: 3Dwarf beautification project
Post by: Mithaldu on November 19, 2008, 06:55:02 am
Interesting, thank you. Does the latest Lifevis version work for you at all?
Title: Re: 3Dwarf beautification project
Post by: EchoP on November 19, 2008, 07:56:02 am
No. Error Log:
Use of uninitialized value in subtraction (-) at Lifevis/Viewer.pm line 834.
glDeleteQueries is not supported by this renderer at Lifevis/Viewer.pm line 1759.

Upgraded drivers
DX 9.0c
DF 40.d

I presume it is my crappy graphics card playing up  :(
Title: Re: 3Dwarf beautification project
Post by: Mithaldu on November 19, 2008, 10:22:25 am
Yeah, i'm using some extra features and i'm trying to figure out how to determine which cards can use them. :)
Title: Re: 3Dwarf beautification project
Post by: Impaler[WrG] on November 21, 2008, 11:08:21 am
After using the correct version of VC Redistribution Pack you linked too at the bottom of the last page I now get the exact same error message as EchoP.

Also I have a recommendation for how to handle viewing of depth.  I see your currently using one 'plane' to slice through the world and render everything below that plane and that plane can be raised or lowered by the dragging a marker on a vertical 'depth' bar.

I propose you expand to what I call a 'slice' system which employs two planes of intersection with the world, a bottom and top plane which can move independently through the z levels with the sole restriction that they maintain the arrangement their names indicate (Top must remain greater then or equal to Bottom).  The levels the planes are set to and the space between them is referred to as the 'slice' and only that which is in the slice is rendered, if top and bottom planes are on the same z level then only that level will be rendered. 

UI wise this could take the form of two markers or arrows attached to the depth indicator currently present on the right hand side of the screen, each can be grabbed with the mouse and moved up or down to change the top and bottom slicing planes, a third marker generated in the halfway point between the first two would move the whole slice up and down without altering its thickness.

In addition to only rendering what falls in the slice the objects within receive a gray scale shading proportional to depth.  The top most z level in the slice is unshaded and the shading increases each level down and would theoretically reach full black one level bellow the bottom of the slice.  Because the shading is dynamically generated based on slice thickness the contrast between each adjacent layer can be heightened by narrowing the slice.
Title: Re: 3Dwarf beautification project
Post by: Mithaldu on November 21, 2008, 11:35:31 am
New Lifevis version! v0.257

This time only small tweaks and a compatibility mode for all those with older graphics cards. :)

http://dwarvis.googlecode.com (http://dwarvis.googlecode.com)




Impaler: Thanks for the feedback. I'll add in something to catch these errors then and automatically open a download link for that.

As for the "bottom slice" idea: That sounds REALLY good. I'm tryign to keep the UI simple, as such i'll simply add 2 buttons with which the slice thickness can be changed. It starts off at -1 (inactive) and increases the slice thickness or decreases the slice thickness as the user sets it.

I don't really agree with the shading though, as high contrasts DO look bad. Trust me, i played around with that a good bit. Additionally, keeping the shading consistent will give the player better feedback on where he is, z-wise.
Title: Re: 3Dwarf beautification project
Post by: Greiger on November 21, 2008, 01:09:37 pm
It works!  And well too!   I would fax you a double chocolate chip cookie if I had a fax machine!

Sorry I didn't respond sooner.  Using that other version gave me the same error as EchoP.

Anyway here's proof it works now!  I'm building an all surface fort.   Unfortunatly Its not old enough yet to have any spectacular constructions so heres a picture of a rock quarry.
Spoiler (click to show/hide)

Keep up the excellent work sir!  I'm think I'm beginning to like this more than 3Dwarf,  and 3Dwarf is awesome!
Title: Re: 3Dwarf beautification project
Post by: Impaler[WrG] on November 22, 2008, 10:28:28 am
Indeed the new version now works for me as well, I only notice one possible bug.  I set my keyboard commands such that insert and delete are z-up and z-down (its very easy to navigate with one hand with these commands close to the arrow keys).  Lifvis will intercept the insert/up command but not the delete/down.  I suspect this might be due to how the string buffer stores characters, delete might be removing characters rather then being entered as a character.  Its probably not serious enough to bother with because my key bindings are so unique.
Title: Re: 3Dwarf beautification project
Post by: Asehujiko on November 22, 2008, 02:21:26 pm
Can't load 'C:/Documents and Settings/Asehujiko/Bureaublad/DF/lifevis/site/lib/auto/Coro/State/State.dll' for module Coro::State: load_file:De toepassing kan niet worden gestart omdat de configuratie van de toepassing onjuist is. Het opnieuw installeren van de toepassing kan dit probleem oplossen at C:/Documents and Settings/Asehujiko/Bureaublad/DF/lifevis/site/lib/XSLoader.pm line 70.
 at C:/Documents and Settings/Asehujiko/Bureaublad/DF/lifevis/site/lib/Coro/State.pm line 106
BEGIN failed--compilation aborted at C:/Documents and Settings/Asehujiko/Bureaublad/DF/lifevis/site/lib/Coro/State.pm line 112.
Compilation failed in require at C:/Documents and Settings/Asehujiko/Bureaublad/DF/lifevis/site/lib/Coro.pm line 64.
BEGIN failed--compilation aborted at C:/Documents and Settings/Asehujiko/Bureaublad/DF/lifevis/site/lib/Coro.pm line 64.
Compilation failed in require at Lifevis/Viewer.pm line 87.
BEGIN failed--compilation aborted at Lifevis/Viewer.pm line 87.
Compilation failed in require at Lifevis\Launcher.pm line 19.
Title: Re: 3Dwarf beautification project
Post by: Moogie on November 27, 2008, 12:44:03 am
Absolutely love this, and I'm eagerly looking forward to its future progress. :)

One bug that I did find during my play-around today: The window does not update unless it's on the primary monitor. When I move the window over to a different display, it stops refreshing, and even moving the cursor around in DF doesn't update it.

Keep up the brilliant work. This is an amazing project!
Title: Re: 3Dwarf beautification project
Post by: Randominality on November 27, 2008, 02:16:18 pm
ok so v0.202 is still by FAR the fastest for me and that may have to do with the fact this one doesnt check for occlusion since all the ones afterwards run slow and they all check for occlusion if im correct. Is there anyway to turn off checking fo rocclusion so i can properly test this / make it run faster?
Title: Re: 3Dwarf beautification project
Post by: Destroyer224 on November 28, 2008, 04:34:09 pm
I'm getting the same error as Asehujiko, except for the fact that mine is in English. It happens whenever I try to start the program and doesn't even get as far as loading the program itself.
Title: Re: 3Dwarf beautification project
Post by: Jackrabbit on November 29, 2008, 02:58:28 am
Can't load 'C:/Documents and Settings/Asehujiko/Bureaublad/DF/lifevis/site/lib/auto/Coro/State/State.dll' for module Coro::State: load_file:De toepassing kan niet worden gestart omdat de configuratie van de toepassing onjuist is. Het opnieuw installeren van de toepassing kan dit probleem oplossen at C:/Documents and Settings/Asehujiko/Bureaublad/DF/lifevis/site/lib/XSLoader.pm line 70.
 at C:/Documents and Settings/Asehujiko/Bureaublad/DF/lifevis/site/lib/Coro/State.pm line 106
BEGIN failed--compilation aborted at C:/Documents and Settings/Asehujiko/Bureaublad/DF/lifevis/site/lib/Coro/State.pm line 112.
Compilation failed in require at C:/Documents and Settings/Asehujiko/Bureaublad/DF/lifevis/site/lib/Coro.pm line 64.
BEGIN failed--compilation aborted at C:/Documents and Settings/Asehujiko/Bureaublad/DF/lifevis/site/lib/Coro.pm line 64.
Compilation failed in require at Lifevis/Viewer.pm line 87.
BEGIN failed--compilation aborted at Lifevis/Viewer.pm line 87.
Compilation failed in require at Lifevis\Launcher.pm line 19.


me too.
Title: Re: 3Dwarf beautification project
Post by: Mithaldu on November 29, 2008, 03:07:34 am
Greiger: Thanks for the update. It's good to know when something doesn't blow up. ^^


Impaler: Due to the way keypresses are transmitted they can sometimes end up as something different in DF as when input directly. So far I've only found out it's a localization problem and the only advice i can give is to remap the keys while using lifevis.


Moogie: Update your graphics card driver and then look for "multi-display support". Your problem is something that i cannot fix as it is a driver issue.


Asehujiko, Destroyer224, Jackrabbit: Two things, please try reading the last few pages of a thread before you ask questions, okay? =)

Secondly, download and install this: http://www.microsoft.com/downloads/details.aspx?familyid=9B2DA534-3E03-4391-8A4D-074B9F2BC1BF&displaylang=en


Randominality: What you're talking about is not the occlusion, but the items. With v0.204 i introduced extraction and display of item data. I'm working on speeding that up more and if you really think you'd use it, i can make it an option. Occlusion IS an option already.
Title: Re: 3Dwarf beautification project
Post by: Randominality on November 29, 2008, 11:43:35 am
oh ok thats cool :) cant wait for that to happen
The reason i thought it was occlusion was i remember downloading v2.02 and then a few days later you said in the thread you released a new version with occlusion and that was the first edition that was slow for me. But thats probably because you added in item data between those two editions aswell.
otherwise keep up the good work
oh also, how do you switch occlusion on / off?
Title: Re: 3Dwarf beautification project
Post by: Techhead on November 30, 2008, 01:12:55 pm
Kinda random:

Can we get a different fortification style?
Code: [Select]
XY .5 Cross Section
##\./##
###.### --YZ.3
\##.##/
....... --YZ.5
/##.##\
###.###
##/.\##

YZ .3 Cross section
#######
### ###
### ###
### ###  --XY.5
### ###
#######
#######

YZ .5 Cross section
\#####/
... ...
... ...
... ... --XY.5
... ...
/#####\
#######
It would probably look more better both in walls and on top of them, and not too hard to make.
Title: Re: 3Dwarf beautification project
Post by: Mel_Vixen on December 10, 2008, 04:28:14 pm
Mithaldu did you get around making a new version of your programm?
Title: Re: 3Dwarf beautification project
Post by: Sumguy21 on December 13, 2008, 07:34:56 pm
I'd love to help model and texture stuff. Hit me up Sumguy21@gmail.com
Title: Re: 3Dwarf beautification project
Post by: Salbrismind on December 14, 2008, 12:25:42 pm
Not sure if anyone else has this problem but I can't press + or - on my numpad from LifeVis.

Since this is my first post here, just wanted to thank you for you work on this project, I was hoping someone in the community would go about something like this, its the final thing that will make Dwarf Fortress great!

-Thanks, Salbris

Edit: I don't want to ask too much, you have done so much already, but I just noticed that designated tiles don't show up. When I designate a tile to be mined it doesn't show anything there. Is that something you have in the works?
Title: Re: 3Dwarf beautification project
Post by: Salbrismind on December 15, 2008, 02:17:44 pm
More Bugs I found:

For some reason on my new fortress I started digging into the ground and I changed the render z-level bar, the one on the right side, and soon after ponds started disappearing, my tunnels disappeared, and even some ponds that didn't exist started to form. Happened twice yesterday and I'll try to replicate it to show you.

Also, when you right click it brings up a menu that I don't think is supposed to be there.

Also, when I was digging around and the first bug came up I noticed a little ways away a huge number of pink up-down-stairs with question marks, as well as other walls just floating in space, In game there is nothing there.


The pink tiles are supposed to be dead grass...
And those hills aren't supposed to be there, I started digging and I did some zooming and I moved the camera a bit and they appeared.
Spoiler (click to show/hide)



Some of these bodies of water don't exist in game...
Spoiler (click to show/hide)


Title: Re: 3Dwarf beautification project
Post by: Asehujiko on December 16, 2008, 11:59:59 am
Jpeg artifacts hurt my eyes.
Title: Re: 3Dwarf beautification project
Post by: Salbrismind on December 16, 2008, 12:03:56 pm
Jpeg artifacts hurt my eyes.

Sorry, made them spoilers...
Title: Re: 3Dwarf beautification project
Post by: Benny on December 24, 2008, 05:16:45 pm
/love .png
Title: Re: 3Dwarf beautification project
Post by: Draco18s on December 25, 2008, 04:15:08 pm
Oh, ew png slash fiction. D:
Title: Re: 3Dwarf beautification project
Post by: Podonok on December 28, 2008, 12:19:43 pm
I wonder how much resources could be freed up using sprites?..
Just musing, though. ::)

Spoiler (click to show/hide)

Spoiler (click to show/hide)
Title: Re: 3Dwarf beautification project
Post by: Savok on December 28, 2008, 01:48:08 pm
Aw...
Spoiler (click to show/hide)
Title: Re: 3Dwarf beautification project
Post by: Footkerchief on December 28, 2008, 03:41:01 pm
I wonder how much resources could be freed up using sprites?..
Just musing, though. ::)

Spoiler (click to show/hide)

Spoiler (click to show/hide)


That's a nice looking mockup.  I was asking Mithaldu about using tileset sprites, and he said it should be easy and he was already working on it.   That was a while ago though.
Title: Re: 3Dwarf beautification project
Post by: Mel_Vixen on December 28, 2008, 06:06:35 pm
he does some chrismas and new years hollyday i hope. Would be a shame if he did abadon this project.

This mockup reminds me by the way on Bluebytes "Albion" that had to an mixed 2D/3D world in some parts of the game.
Title: Re: 3Dwarf beautification project
Post by: Footkerchief on December 28, 2008, 06:16:55 pm
I honestly think the future of any practical visualizer lies with attempting to 3D-ify the existing look of DF with as little change as possible.  It has a lot more visual charm (seriously, that mockup is beautiful) and gives you much more bang for your buck -- you can use existing art assets rather than having to create hundreds of models for all the creatures etc.  Terrain probably still needs to be handled with polygons, but cube faces can be textured with the terrain tile, etc.  Certain buildings like siege engines might still need models, but many workshops could just use their tiles as sprites.
Title: Re: 3Dwarf beautification project
Post by: Mel_Vixen on December 28, 2008, 07:26:13 pm
Sprites are very good for people. Done right they can help to visualize an dwarf very nice. For example haircollors and clothing - just blend the Blue eyes and the gray beard over the face and the green vest over the body.
Title: Re: 3Dwarf beautification project
Post by: Mithaldu on December 29, 2008, 05:13:51 am
Yeah, i'm indeed taking a break, this is however by no means abandoned. :)

Also, thanks for the mock-up, it really showed me how sprites would massively help. They'll definitely be in the next version.
Title: Re: 3Dwarf beautification project
Post by: Podonok on December 29, 2008, 06:29:28 am
So, is it a right time to start accumulating\pixelarting nice-looking sprites?  ;D
Title: Re: 3Dwarf beautification project
Post by: Maggarg - Eater of chicke on December 29, 2008, 10:48:00 am
This is truly awesome.
I'm going to mess around with this right now.
Title: Re: 3Dwarf beautification project
Post by: MMad on January 02, 2009, 10:51:16 am
This mockup reminds me by the way on Bluebytes "Albion" that had to an mixed 2D/3D world in some parts of the game.

I agree. Also, that was an awesome game.

So, is it a right time to start accumulating\pixelarting nice-looking sprites?  ;D

At this stage it would probably make most sense to use existing graphics sets.
http://dwarf.lendemaindeveille.com/index.php/List_of_user_graphics_sets
Title: Re: 3Dwarf beautification project
Post by: soundandfury on January 06, 2009, 12:15:43 pm
Alas! for it does not work for me.
error.txt:
Quote
Can't load 'C:/Program Files/DF/site/lib/auto/Coro/State/State.dll' for module Coro::State: load_file:This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem at C:/Program Files/DF/site/lib/XSLoader.pm line 70.
 at C:/Program Files/DF/site/lib/Coro/State.pm line 106
BEGIN failed--compilation aborted at C:/Program Files/DF/site/lib/Coro/State.pm line 112.
Compilation failed in require at C:/Program Files/DF/site/lib/Coro.pm line 64.
BEGIN failed--compilation aborted at C:/Program Files/DF/site/lib/Coro.pm line 64.
Compilation failed in require at Lifevis/Viewer.pm line 87.
BEGIN failed--compilation aborted at Lifevis/Viewer.pm line 87.
Compilation failed in require at Lifevis\Launcher.pm line 19.
Title: Re: 3Dwarf beautification project
Post by: Kishmond on January 16, 2009, 08:06:17 am
That's fixed earlier in the thread.
But you're lucky, mine doesn't even detect DF running.
Title: Re: 3Dwarf beautification project
Post by: Mithaldu on January 16, 2009, 08:21:52 am
Oh, it sure would detect it, if you're running this version: v0.28.181.40d, posted September 6
Title: Re: 3Dwarf beautification project
Post by: SolarShado on January 16, 2009, 11:54:43 pm
Just a few things re:lifevis:
 * is it still being worked on? 'cuz it's F***ING AWESOME!
 * minor bug report: Millstones look odd when they're close together:
Code: [Select]
  M
 MgM
  M
M=millstone, g=gearbox
the model for workshops overlaps, severely
 * how can i help? I'd love to help make the building models, but i don't know what app i'd need or how to put them in lifevis, or even what needs to be done
 * shouldn't this be moved to another topic?
Title: Re: 3Dwarf beautification project
Post by: CobaltKobold on January 17, 2009, 01:24:28 am
You'll want to fix for querns too, as the other 1-tile workshop. (Psst: You don't need the gearbox if that's a 40-power windmill, SolarShado)

I think workshops're better done modeled, though. Wagons too.
Title: Re: 3Dwarf beautification project
Post by: Cheshire Cat on January 17, 2009, 02:21:42 am
bah, just make it really customizable so people can easily change between sprites/models and what particular sprite/model there is for each object and building. that way we will probably see lots of great and interesting sprite/model packs in the same way we currently see so many different tile set packs.

also means people can tailor sets for faster and slower systems. i personally really like the sprites, and fondly remember a lot of old games with 3d terrain and sprites for units, trees and nearly everything else. anyone remember myth and myth 2? populous: the beginning? the original dungeon keeper?

images of myth 2
http://au.pc.ign.com/dor/objects/10305/myth-ii-soulblighter/images/myth24.html (http://au.pc.ign.com/dor/objects/10305/myth-ii-soulblighter/images/myth24.html)

i really couldn't find any decent images for populous and dk1 that weren't postage stamp sized. but yeah, im definitely looking forwards to the next version of this, way to go mithaldu, and also toady for giving out that info at the start of the thead.
Title: Re: 3Dwarf beautification project
Post by: Mithaldu on January 18, 2009, 07:30:16 pm
Buildings are only very basic right now and will be fleshed out later on. As for customization, yes, that is planned. Try looking at the actual *.pl files themselves to see how i am laying the groundwork for that. Look at ALL of them too.

As for help, right now the following is the most important one.

----

I'm slowly starting to work on Lifevis again. However, before getting to the meat on that, I need the offsets of the latest version. Why do i need them? Quite simply: If the offsets cannot be determined for all versions, then there is no point in going on, as there could be a wall beyond which they cannot be determined anymore.

Furthermore, I cannot rely on non-public methods of locating these. To do so would be to rely on the niceness of strangers, which can, due to Toady's varying release schedules, be quite fleeting. Additionally, so far it seems that there are quite a few people who work on finding the offsets, but everyone uses their own methods with only low amount of discussion between these people. (At least as far as public discussion goes. I know there were some private discussions, but to the DF community these are useless.)

As such, I have started with my knowledge and experience in DF so far, to look for and determine the offsets of 40d9 and at the same time document the steps taken to get them, both for myself and for others.

The progress so far is documented here: http://www.dwarffortresswiki.net/index.php/Offset_Finding_Methods

For anyone interested, i encourage you to follow my steps, retrace them, look for patterns that i missed, or try going down other paths that i ignored. I intend for this document to be written in such a manner that the average person capable of working their way through the DF interface should be able to follow these steps on their own.
Title: Re: 3Dwarf beautification project
Post by: Baboonanza on January 19, 2009, 07:48:46 am
To find the pointer to the arrays storing the map blocks you can:
- Search for the dimension of the map in blocks (stored as a 4-byte integer). Each region on the world map is 3 blocks, so for a 6x6 map with 45 levels you would search for 0x00000012,0x00000012,0x0000002D (18,18,45).
- The 4 bytes directly preceding the x-dimension is the pointer to the block allocation.
This sequence should never change.

To find the other offsets I generally use an assembly debugger though (like OllyDbg) since the offsets are right there in the code if you know where to look.
Title: Re: 3Dwarf beautification project
Post by: strich on March 11, 2009, 04:19:33 am
Jeez, what a round about way of doing things. Isn't DF open source? Why not?
Title: Re: 3Dwarf beautification project
Post by: Footkerchief on March 11, 2009, 04:38:50 am
Jeez, what a round about way of doing things. Isn't DF open source? Why not?

From the FAQ:

Quote
Will you make Dwarf Fortress open-source so the community can speed development and fix bugs?
No. We don't want to associate with other people at a quasi-professional level, since this would make development less enjoyable. This is not a job for us; it is our personal mission.

But will you make Dwarf Fortress open-source for forks and tinkering?
No. Heavily diluting Dwarf Fortress adds a strong element of unpredictability to our support, and your donations are our sole source of income. While donations might not be affected at all, it's not a risk we can take at this point if the project is to continue.

Toady explained his position in greater depth in this thread (http://www.bay12games.com/forum/index.php?topic=21806.0).
Title: Re: 3Dwarf beautification project
Post by: Jackrabbit on March 11, 2009, 04:39:09 am
Yea, what he said.
Title: Re: 3Dwarf beautification project
Post by: exoleet on March 11, 2009, 01:50:45 pm
Could not find process ID, make sure DF is running and a savegame is loaded. at Lifevis/Viewer.pm line 347

It won't load.
DF is booted up normally, no change to the name of the executable.
Title: Re: 3Dwarf beautification project
Post by: Sowelu on March 11, 2009, 06:42:20 pm
What version are you running?  This doesn't work with the d# versions.
Title: Re: 3Dwarf beautification project
Post by: strich on March 16, 2009, 12:30:45 am
So how can we help? From what I've read the app currently requires memory offsets for a lot of data in the new version. What data? How much has been done? What hasn't been done? I can navigate Ollydbg perfectly fine so I could help out in that regard.
I also took a look at the code. Not very much documentation in there.

I'd like to help, but I don't know what the status of this project is. Any updates?
Title: Re: 3Dwarf beautification project
Post by: Sumguy21 on March 25, 2009, 08:57:29 pm
I can't wait!
Title: Re: 3Dwarf beautification project
Post by: stormbringer951 on April 26, 2009, 12:57:58 pm
So which is the latest version?
Title: Re: 3Dwarf beautification project
Post by: Gamli on March 22, 2010, 02:12:45 am
This tool is amazing and I think it nails just what we're looking for in a 3D visualization tool.  I can finally see if my grandiose statues and green glass castles actually look anything like what I had imagined while I'm building them.  Obviously it has a great deal of potential yet and I would like to help.

Please contact me and send me a developer ticket or two.  Since I am so happy with this tool, I am very willing to devote some of my time to improving it.
Title: Re: 3Dwarf beautification project
Post by: Blargityblarg on March 22, 2010, 05:28:24 am
The previous post in this thread was nearly a year ago, Gamli.

AFAIK, 3Dwarf is dead, though I haven't really been paying attention. The more common visualisers nowadays are Visual Fortress and Stonesense.
Title: Re: 3Dwarf beautification project
Post by: Mithaldu on March 22, 2010, 05:41:01 am
I'm still watching and have merely been too busy to get anything done on this front.

Gamli, if you really want to work on this, PM me your email address and I'll send you an invite to the repo.
Title: Re: 3Dwarf beautification project
Post by: Rose on June 11, 2012, 10:09:18 am
(http://tnypic.net/6a333.jpg)
Title: Re: Lifevis - A realtime 3D interface for DF
Post by: Pyro on June 11, 2012, 11:34:28 am
Anything I can help out with code wise?
Title: Re: Lifevis - A realtime 3D interface for DF
Post by: Mithaldu on June 11, 2012, 11:39:05 am
The github repo is linked in the first post. Feel free to take a look, fork, send pull requests. :)

The issues tab should give you inspiration for the things that need done. ;)
Title: Re: Lifevis - A realtime 3D interface for DF
Post by: Crossroads Inc. on June 11, 2012, 11:47:35 am
Ho ho! SOMEONES been busy!
Any more screen shots?
Title: Re: Lifevis - A realtime 3D interface for DF
Post by: Urist_McGamer on June 11, 2012, 02:08:10 pm
A four year old thread back from the dead on its own? I'm going to have to look into this visualizer!
Title: Re: Lifevis - A realtime 3D interface for DF
Post by: BigD145 on June 11, 2012, 02:56:39 pm
I look forward to more support.
Title: Re: Lifevis - A realtime 3D interface for DF
Post by: Mithaldu on June 11, 2012, 08:12:14 pm
New version with bottom slicing, making it feasible to actually load the whole map: https://github.com/wchristian/lifevis/zipball/v0.258_003

Have some screenshots:

Spoiler (click to show/hide)
Title: Re: Lifevis - A realtime 3D interface for DF
Post by: SolarShado on June 11, 2012, 08:21:04 pm
Firstly, I apologize for not re-reading the entire thread. If this question's already been answered somewhere, feel free to call me an idiot.

Linux support? Being written mostly in perl makes me hopeful, but a glance through the repo shows no Linux launcher script(s)...
Title: Re: Lifevis - A realtime 3D interface for DF
Post by: Mithaldu on June 11, 2012, 08:33:55 pm
Linux support is an extremely remote possibility, depending on a lot of extra development in DFHack, or some linux user manning up and sending me some pull requests on github.
Title: Re: Lifevis - A realtime 3D interface for DF
Post by: Rose on June 11, 2012, 09:10:04 pm
DFhack has linux offsets, though.
Title: Re: Lifevis - A realtime 3D interface for DF
Post by: Mithaldu on June 12, 2012, 02:43:11 am
It's not about the offsets. The problem is that i have no idea how to access the memory space of other programs on Linux and lack the time to find out.
Title: Re: Lifevis - A realtime 3D interface for DF
Post by: Mithaldu on June 14, 2012, 05:04:00 pm
No new screenshots, or anything today, however, big news, Lifevis will now easily work with these Dwarf Fortress versions:

v0.34.07, v0.34.10, v0.34.11

You can download it here: https://github.com/wchristian/lifevis/zipball/v0.258_004
Title: Re: Lifevis - A realtime 3D interface for DF
Post by: Rafal99 on June 14, 2012, 05:43:36 pm
No new screenshots, or anything today, however, big news, Lifevis will now easily work with these Dwarf Fortress versions:

v0.34.07, v0.34.10, v0.34.11

You can download it here: https://github.com/wchristian/lifevis/zipball/v0.258_004

Doesn't work for me.
Both Lifevis.exe and Lifevis-Console.exe instantly close.
The only line in the error log is:
Quote
read_file 'adresses/v0.34.07/version.lisp' - sysopen: No such file or directory at Lifevis/ProcessConnection.pm line 114.

But I am using DF v0.34.11 SDL.

The previous version you posted (v0.258_003) doesn't work either.


Edit: All subfolders in the "addresses" folder are empty in the versions you posted.
Title: Re: Lifevis - A realtime 3D interface for DF
Post by: Rafal99 on June 14, 2012, 05:58:08 pm
After I got the df-structures source from github and put it in EACH of the folders v0.34.07, v0.34.10 and v0.34.11 it worked!

So it seems that zipballs you posted were incomplete, they didn't include stuff linked from df-structures repo.
Title: Re: Lifevis - A realtime 3D interface for DF
Post by: Mithaldu on June 14, 2012, 06:38:06 pm
Thanks for the note!

Yeah, those folders would autopopulate in a git checkout, so i assumed the zips would do it too. I'll put up new zips. :)
Title: Re: Lifevis - A realtime 3D interface for DF
Post by: Mithaldu on June 14, 2012, 06:48:25 pm
And new ZIP is up here: https://github.com/wchristian/lifevis/downloads
Title: Re: Lifevis - A realtime 3D interface for DF
Post by: Mithaldu on June 17, 2012, 04:30:12 pm
I just uploaded a new version that will run a lot faster in normal use, since it restricts data collection and rendering to only a certain slice:

https://github.com/downloads/wchristian/lifevis/lifevis%20v0.258_005.zip

It will also be a lot more responsive, since it'll start rendering the world at the cursor itself and reset a rendering process if it detects movement.

Note: The slice settings will be locked to the cursor at the start. In order to adjust them you'll need to undo the lock first.
Title: Re: Lifevis - A realtime 3D interface for DF - Now with more Speed!
Post by: Mithaldu on June 18, 2012, 04:03:43 am
Alright, at this point i have a question to ask:

Interest in new releases seems to be fairly low, with the last one having received only 2 downloads besides my own test download since yesterday. I have a number of directions i can go in with further development, those specifically being:

- Ease of Use: The user interface is still very much programmer quality and could use some cleaning up.
- Data Compatibility: A number of things is not recognized or rendered properly, specifically: Mud, Glass, Ramps, Buildings. I would need to do some research, model assignment, texture creation to get those working properly.
- 3D Speed: Right now the rendering is done with very outdated OpenGL techniques and i need to learn how to use and implement Vertex Buffers, which should make the performance a lot better. This would be a fairly lengthy process akin to a rewrite.

Which of those would you most prefer to see in a new release?
Are there maybe other things you'd like to see that i haven't listed here?
Title: Re: Lifevis - A realtime 3D interface for DF - Now with more Speed!
Post by: Rafal99 on June 18, 2012, 08:13:49 am
For me the biggest problem with Lifevis is speed. And yeah I tried the latest version and it is indeed better but not much (sorry to say that).

It is just so painfully slow that it is annoying to use even as static visualizer, and it is supposed to be realtime one...
One z-level of one map tile (48x48x1 tiles) takes like 20-30 seconds to render. I have no idea why is it so slow. It doesn't even draw that many polygons actually. I have worked with OpenGL and could draw much more stuff much faster even when using the simplest functions like glBegin, glVertex and glTexCoord.
It seems to me that you are either doing something horribly wrong or have some bug in the code and this why it is so slow, because I do not see any other reason why it could be that bad.
Title: Re: Lifevis - A realtime 3D interface for DF - Now with more Speed!
Post by: Mithaldu on June 18, 2012, 08:38:05 am
For me the biggest problem with Lifevis is speed. And yeah I tried the latest version and it is indeed better but not much (sorry to say that).
Thanks for the feedback. One more reason to get started on that.

It is just so painfully slow that it is annoying to use even as static visualizer, and it is supposed to be realtime one...
One z-level of one map tile (48x48x1 tiles) takes like 20-30 seconds to render. I have no idea why is it so slow. It doesn't even draw that many polygons actually. I have worked with OpenGL and could draw much more stuff much faster even when using the simplest functions like glBegin, glVertex and glTexCoord.
It seems to me that you are either doing something horribly wrong or have some bug in the code and this why it is so slow, because I do not see any other reason why it could be that bad.
20 seconds for a single Z-Slice? How did you arrive at that measurement? The slowest i have seen was 1 second on my machine. What kind of numbers are you seeing in the "Calls" line of the debug output? What kind of hardware are you running? As for how it is rendered: It generates DisplayLists for each slice, by using glbegin, glDrawArrays, etc. The bug here might be that DisplayLists are deprecated and i assume that they're performing worse as a result of that.
Title: Re: Lifevis - A realtime 3D interface for DF - Now with more Speed!
Post by: Rafal99 on June 18, 2012, 01:22:51 pm
20 seconds for a single Z-Slice? How did you arrive at that measurement? The slowest i have seen was 1 second on my machine.

It takes about 2 seconds per each small block (which is 16x16 tiles I think).
Actually it was not set to a single z-level slice when I measured this. It was set to the default span of 20 z-levels. But the top level was the surface level, while 20 z-levels under it were solid unmined rock, so it effectively was only drawing the surface level.

Edit: I set the Z-levels span to only 5 levels and it started running actually quite fast.

What kind of numbers are you seeing in the "Calls" line of the debug output?

Here is Lifevis output:
http://i47.tinypic.com/2akhw3.png (http://i47.tinypic.com/2akhw3.png)
I noticed that "Item-Tasks" line goes from 1/6895 up to 6895/6895 then starts from the begining again and repeats. "Creature-Tasks" does this too.
DF remains paused so it is probably doesn't really need to update the items repeatedly.

What kind of hardware are you running?

Intel Core i3 550 3,2Ghz
GeForce GTS 450

I have good FPS in games, including games using OpenGL, so I don't think it is a problem with my hardware or drivers.
Title: Re: Lifevis - A realtime 3D interface for DF - Now with more Speed!
Post by: Rafal99 on June 18, 2012, 01:27:19 pm
One more thing:
Lifevis frequently suddenly closes without any warning or anything.
error.txt contains several lines of this:
Quote from: error.txt
Modification of non-creatable array value attempted, subscript -16 at Lifevis/Viewer.pm line 1348.
Title: Re: Lifevis - A realtime 3D interface for DF - Now with more Speed!
Post by: Rose on June 18, 2012, 04:03:48 pm
@Rafal99, the 20 seconds you are seeing isn't the drawing, it's the geometry generation and the map reading, there's a difference.
Title: Re: Lifevis - A realtime 3D interface for DF - Now with more Speed!
Post by: Mithaldu on June 18, 2012, 05:00:19 pm
[snip]
Many useful :words:.
[snip]
Ok, wow, thanks a lot for the feedback. I thought i was going insane here!

What's going on is this: For each 16x16 blocks you're seeing, it is getting the data for 16x16xZ-Levels tiles from the DF process and caching it into one OpenGL Display List for each Z-Level. The first time this happens it is fairly slow, because it has to do that for literally every 16x16 slice. On later runs it can go a lot faster since it only grabs the memory data, compares it against cached data and only needs to do further processing if it changed. As well, you set the view range to a level that i'd call "ridiculously large" for the moment. So, if you'd wait out the initial load, it should become a good bit faster. :)

The Calls-Time you're seeing is very reasonable as well. It means that it only takes 0.02 seconds to render what you see on screen, with another 0.01 secs spent on rendering creatures, items and buildings, and 0.01 secs more for occlusion analysis (which i should probably drop as i don't even know if it works anymore). That, with some extra work, combines to 0.06 seconds render time for a frame, which is pretty decent actually.

However, something i've seen on my rig, and which i'm unsure about whether you're seeing it: Sometimes the Calls time just soars for a while, hovers at 200ms and randomly drops down later again. This is without any big change in the data being rendered and i'm very sure that it is caused by using Display Lists, which present the gfx card with cache sorting issues. Display lists are also likely the source of slowness in loading in the data. If you look at the Landscape-Data/3D-Tasks counters, you'll see that the Data tasks run much faster than the 3D tasks and the 3D tasks are where Display Lists are created.

So yeah, that's definitely the next big thing i'll tackle, after these two things:

Thanks for the suggestion of suspending refresh updates while DF is talked. I looked around and i can do some things with cur_year_tick to avoid rechecking stale data.

Also, thanks for reporting that bug. I'll look into what causes it.
Title: Re: Lifevis - A realtime 3D interface for DF - Now with more Speed!
Post by: Dadamh on June 18, 2012, 07:07:50 pm
Use of uninitialized value in numeric gt (>) at Lifevis/Viewer.pm line 917.

I get this on attempting to run lifevis.  It gets so far as rendering a couple of... I guess in minecraft you'd call them chunks.  A few large tiles of play area, and then closes and puts that line into error.txt.

Just reporting a bug.  Version 34.11
Title: Re: Lifevis - A realtime 3D interface for DF - Now with more Speed!
Post by: Mithaldu on June 18, 2012, 07:30:14 pm
Use of uninitialized value in numeric gt (>) at Lifevis/Viewer.pm line 917.

I get this on attempting to run lifevis.  It gets so far as rendering a couple of... I guess in minecraft you'd call them chunks.  A few large tiles of play area, and then closes and puts that line into error.txt.

Just reporting a bug.  Version 34.11
Wow, that's weird and should literally not be able to happen. I've uploaded a bandaid release: https://github.com/downloads/wchristian/lifevis/Lifevis%20v0.258_006.zip

Can you maybe upload the save this occurs on?
Title: Re: Lifevis - A realtime 3D interface for DF - Now with more Speed!
Post by: Dadamh on June 18, 2012, 07:50:39 pm
Can't locate Lifevis/constants.pm in @INC (@INC contains: .. . C:/Documents and Settings/.../Desktop/Lifevis v0.258_006/site/lib) at Lifevis/Viewer.pm line 92.
BEGIN failed--compilation aborted at Lifevis/Viewer.pm line 92.
Compilation failed in require at Lifevis\Launcher.pm line 19.


Looks like a failed include or equivalent?
Title: Re: Lifevis - A realtime 3D interface for DF - Now with more Speed!
Post by: Mithaldu on June 18, 2012, 08:08:13 pm
Looks like a failed include or equivalent?
Ugh, a debugging aid moved the process one dir up and as such couldn't find the necessary deps anymore. Fixed release: https://github.com/downloads/wchristian/lifevis/Lifevis%20v0.258_007.zip
Title: Re: Lifevis - A realtime 3D interface for DF - Now with more Speed!
Post by: Dadamh on June 18, 2012, 08:39:25 pm
Well it runs now.  I tried it on a new save, and it works fine there.  Keyboard input is a bit wonky, tends to crash out after freaking out on me and flipping the view all over the place.  Error log:

Modification of non-creatable array value attempted, subscript -9 at Lifevis/Viewer.pm line 1347.

Still fails on the old save.  I figured something stupid about my already fairly stupid above-ground fort.  Who knows what exactly. 

I don't really know where to put the save.  But the current error is something different than before:

ReadProcessMemory failed with code: 299 at Lifevis/Viewer.pm line 112.
   Lifevis::Viewer::_ReadMemory(268, undef, 676) called at Lifevis/Viewer.pm line 919
   Lifevis::Viewer::landscape_update_loop called at C:/Documents and Settings/.../Desktop/Lifevis v0.258_007/site/lib/Coro.pm line 691
   Coro::_coro_run called at Lifevis\Launcher.pm line 0

Anyway, neat little tool when it works.  I always think folks who go out of their way to make things for free for a community deserve thanks for it.  So thanks!
Title: Re: Lifevis - A realtime 3D interface for DF - Now with more Speed!
Post by: Mithaldu on June 18, 2012, 08:57:08 pm
Well it runs now.  I tried it on a new save, and it works fine there.
Phew! I was worried there. :)
Keyboard input is a bit wonky, tends to crash out after freaking out on me and flipping the view all over the place.
Yeah, that is a known bug i haven't gotten around to debugging yet. It worked perfectly under XP and with Win7 it is borked. I suspect it's not sending the keyup correctly. You need to control things through DF for the time being. :(
Modification of non-creatable array value attempted, subscript -9 at Lifevis/Viewer.pm line 1347.
That one was mentioned earlier and i'll be looking at it tomorrow i hope! :)
Still fails on the old save.  I figured something stupid about my already fairly stupid above-ground fort.  Who knows what exactly. 

I don't really know where to put the save.  But the current error is something different than before:
Can you please get a dropbox account and share it from there? That should be the easiest and most convenient way for you. I can look at it tomorrow then.
ReadProcessMemory failed with code: 299 at Lifevis/Viewer.pm line 112.
   Lifevis::Viewer::_ReadMemory(268, undef, 676) called at Lifevis/Viewer.pm line 919
   Lifevis::Viewer::landscape_update_loop called at C:/Documents and Settings/.../Desktop/Lifevis v0.258_007/site/lib/Coro.pm line 691
   Coro::_coro_run called at Lifevis\Launcher.pm line 0
That is very interesting. It indicates that Lifevis is trying to read from a memory position that is undefined, so somehow i'm trying to read from a cell that is not actually initialized and i have not yet seen any of those in my tests. If that is from your save, then i'd REALLY love to have it! :D
Anyway, neat little tool when it works.  I always think folks who go out of their way to make things for free for a community deserve thanks for it.  So thanks!
Thanks for the kind words. :)
Title: Re: Lifevis - A realtime 3D interface for DF - Now with more Speed!
Post by: Dadamh on June 19, 2012, 05:51:13 am
Well assuming drop box is working, the save should be uploaded to:

https://dl.dropbox.com/u/86370856/LVFailSave.rar

I renamed it from "Region1" because I don't want you overwriting something you're playing.

Anyway, there you go.  I have the worst luck with utilities, so who knows, maybe you won't even see the same bug.
Title: Re: Lifevis - A realtime 3D interface for DF - Now with more Speed!
Post by: Mithaldu on June 19, 2012, 06:10:41 am
I have the worst luck with utilities, so who knows, maybe you won't even see the same bug.
Your bad luck is my good luck. :)

Thanks for uploading. That save crashes on my machine almost immediately as well, so debugging it should be rather easy. :D
Title: Re: Lifevis - A realtime 3D interface for DF - Now with more Speed!
Post by: Mithaldu on June 19, 2012, 07:08:13 pm
Quote from: error.txt
Modification of non-creatable array value attempted, subscript -16 at Lifevis/Viewer.pm line 1348.
ReadProcessMemory failed with code: 299 at Lifevis/Viewer.pm line 112.
   Lifevis::Viewer::_ReadMemory(268, undef, 676) called at Lifevis/Viewer.pm line 919
   Lifevis::Viewer::landscape_update_loop called at C:/Documents and Settings/.../Desktop/Lifevis v0.258_007/site/lib/Coro.pm line 691
   Coro::_coro_run called at Lifevis\Launcher.pm line 0

Both of these are fixed in v0.258_008: https://github.com/wchristian/lifevis/downloads

Two things were happening here:

First, Toady uses a hack of sorts to make items invisible. He puts them outside the bounds of the map. My detection for that was off by one. :)

Secondly, when rendering a slice i need to know what's around it. The code that gathered that data reached outside of the map, which caused the array to wrap around at the edge. It is now clamped.
Title: Re: Lifevis - A realtime 3D interface for DF - Now with more Speed!
Post by: Dadamh on June 19, 2012, 09:07:07 pm
Alright cool, glad I could sorta bring some issues to the front.

It works with the save I had.  Though that fort died today to tantrum spirals started by a kobold wereelephant.

The newer versions of DF man.  Nuts.

Anyway, thanks for the fix!