Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 2 [3] 4 5 ... 20

Author Topic: Dwarf Fortress graphics repositories  (Read 97295 times)

Quiet-Sun

  • Bay Watcher
  • Escaped Lunatic
    • View Profile
    • www.solardynamo.org
Re: Dwarf Fortress graphics repositories
« Reply #30 on: January 29, 2016, 07:44:23 pm »

Note that the Tokens GHOST and ANIMATED go in the profession spot, not the texture token as you would expect - this means that you can't have separate graphics for miner zombies, axedwarf zombies, speardwarf zombies, etc.

@Quiet-Sun This may answer a lot of your questions.


Ah! this is very helpful! thank you guys!  I almost have a working version to show.  I'll post it when I have it
Logged

Quiet-Sun

  • Bay Watcher
  • Escaped Lunatic
    • View Profile
    • www.solardynamo.org
Re: Dwarf Fortress graphics repositories
« Reply #31 on: January 29, 2016, 11:03:08 pm »

Ok guys!   Here is the result of my creature script.  It works by asking the user to select a reference DF build (I downloaded a fresh 42.05) and a graphic set (I ran it on the Afro, Mayday, Phoebus, and Spacefox taken from the Fricy's repository).  It works like this:

- Open each creature object file from the reference DF build.
- Find the creature tags inside that file.
- Look in all .txt files of the graphic set for the corresponding match.
- Open the corresponding png and extract the tile.
- Add it to a png file with the same name as the DF reference txt file.  Different creatures are placed in different columns.  Different textures and/or professions are placed in different rows.  Each combination is unique and identical regardless of the set.

Here are the outputs for the aforementioned sets for the creature_domestic.txt file:

Afro:


Mayday:


Phoebus:


Spacefox:


Each column corresponds to an animal, the rows are:

- DEFAULT
- CHILD
- STANDARD
- ANIMATED
- GHOST
- TRAINED_HUNTER
- TRAINED_WAR

Note that some animals are missing in some of the sets (so those tiles are left blank), but now there is a uniquely defined tile for all sets.

What I'm proposing (based on CLA's idea) is that we create a standard set of text files pointing to standard tiles that are exactly the same regardless of the graphics set.   Then, using a more sophisticated version of my script, we populate the png files for each set.   The advantage is that it becomes very easy to mix and match sets and we can very easily update the whole thing if DF adds or removes creatures.  The other nice thing is that by doing this with a script, the artists can do their own thing in whichever order they want, and then we can just run some code and create standardized versions of the sets.

Anyway, forgive me for the wall of text.   Let me know what you guys think so that I know whether to move forward.

If you want to compare the different sets at your own leisure you can download them here:

https://dl.dropboxusercontent.com/u/408446/DF/Graphics%20Standardization.zip
« Last Edit: January 30, 2016, 02:24:12 am by Quiet-Sun »
Logged

burned

  • Bay Watcher
    • View Profile
    • burnedFX
Re: Dwarf Fortress graphics repositories
« Reply #32 on: January 30, 2016, 03:49:49 am »

Note that some animals are missing in some of the sets (so those tiles are left blank), but now there is a uniquely defined tile for all sets.

What I'm proposing (based on CLA's idea) is that we create a standard set of text files pointing to standard tiles that are exactly the same regardless of the graphics set.   Then, using a more sophisticated version of my script, we populate the png files for each set.   The advantage is that it becomes very easy to mix and match sets and we can very easily update the whole thing if DF adds or removes creatures.

How is this standard definition file being created? I didn't see any in the download.
Is this standard definition file going to be automated somehow?
If the standard definition file is automated, does it know NOT to define a creature's tile if it's left blank?*
If it's not automated, how are you going to mix and match sets?
How are the professions pulled for the standard races and animal people?


*If you define a creature to a transparent tile that's exactly what you'll get in game.
Logged
DFMA Profile | burnedfx Graphic Set

The process of delving into the black abyss is to me the keenest form of fascination. - H. P. Lovecraft
The Delvers
. . .the middle ground between light and shadow . . . - Rod Serling
The Delvers' Podcast

CLA

  • Bay Watcher
    • View Profile
Re: Dwarf Fortress graphics repositories
« Reply #33 on: January 30, 2016, 07:12:40 am »

Quote from: burned
does it know NOT to define a creature's tile if it's left blank?*
Good point. Any better options than commenting out that creature definition?
Spoiler: regarding CLA (click to show/hide)

Speaking of CLA - how do we deal with several creature definitions pointing at the same tile? I use that sometimes (Giant creatures whose base creature uses a capital letter like Lion share the same graphic), and as it stands right now, with the new standard, I would have the same graphic multiple times in several files. Is there a smart way around that without compromising the standard? In the end it's not that much of a maintenance problem, but I figured I'd mention it.
Logged
CLA - an ASCII-like Graphic Pack with simplified letter-like creature graphics. The simple and clean looks of ASCII with distinct creature graphics - best of both worlds!

http://www.bay12forums.com/smf/index.php?topic=105376.0

Quiet-Sun

  • Bay Watcher
  • Escaped Lunatic
    • View Profile
    • www.solardynamo.org
Re: Dwarf Fortress graphics repositories
« Reply #34 on: January 30, 2016, 10:41:35 am »

How is this standard definition file being created? I didn't see any in the download.

1. Is being created using a matlab script.  It is very much a work in progress, I was not planning to release it until we have a standard, but if you are curious here it is:

https://dl.dropboxusercontent.com/u/408446/DF/DF_Graphics_Standardization.m


Is this standard definition file going to be automated somehow?

2. Fully automatic, no burden whatsoever on the artists.  We would provide matrix templates with (names crossing textures/professions with the respective animals/races) in case artists just want to fill them up and not to bother with making the text files.  However, thanks to the automatic script, artists can still do things in whichever way they want and we can standardize things for them.


If the standard definition file is automated, does it know NOT to define a creature's tile if it's left blank?*

3. I was thinking about keeping each artist work as pure and unpolluted as possible.  This means there will blanks wherever a particular artist has not drawn art.   The creation of a functional graphic set would be done separately (automatically with a separate script) and would involve the user submitting a file in which he/she ranks artists from highest to lowest preference and then the blanks are filled in order of preference.  Alternatively one could chose to fill blanks with letters from a given set (see CLA's concern below).


How are the professions pulled for the standard races and animal people?

We need to define standards for, creatures, beastmen, and major races.  But my plan is to base the order strictly in the way they appear in DF object files.  This way if toady changes something we simply run the script and now is fully compatible.


Speaking of CLA - how do we deal with several creature definitions pointing at the same tile? I use that sometimes (Giant creatures whose base creature uses a capital letter like Lion share the same graphic), and as it stands right now, with the new standard, I would have the same graphic multiple times in several files. Is there a smart way around that without compromising the standard? In the end it's not that much of a maintenance problem, but I figured I'd mention it.

In the standard I'm proposing the tile would be repeated in the matrix.  Note that the artists don't need to repeat things to mantain the standards.  Artists would have two options:

1.  Submit just the png files if they follow the standard (in which case they would certainly need to repeat the tile).
2.  Do it the usual way: submit png files with tiles in any order they want and supporting .txt files indicating which file corresponds to each creature/profession (here is where you would indicate that the same tile would be use for several creatures).   If this is the case, we just run the artist's work though the script and voila! standard version :)

See for example the output of the creature_large_ocean file for Mayday.  They use a fallback texture to indicate a creature when there is no specific art so in the output it just gets repeated.  When it's time to create a fully functional graphic set something like this is what we would do.  Note that we can create automatic rules to fill some of the holes.  We can for example desaturate the animal (make it black and white) to indicate an animated version.

« Last Edit: January 30, 2016, 11:01:24 am by Quiet-Sun »
Logged

CLA

  • Bay Watcher
    • View Profile
Re: Dwarf Fortress graphics repositories
« Reply #35 on: January 30, 2016, 11:30:26 am »

If this is the case, we just run the artist's work though the script
Oh yeah, of course. Didn't think of that.
Logged
CLA - an ASCII-like Graphic Pack with simplified letter-like creature graphics. The simple and clean looks of ASCII with distinct creature graphics - best of both worlds!

http://www.bay12forums.com/smf/index.php?topic=105376.0

burned

  • Bay Watcher
    • View Profile
    • burnedFX
Re: Dwarf Fortress graphics repositories
« Reply #36 on: January 30, 2016, 12:31:15 pm »

I didn't see anything in your script regarding a standard definition file. It reads as if it goes through the existing image(s) and existing definition file(s) and creates png(s) as far as I can tell. But, maybe I don't understand your script and I'm just missing the part that creates the definition file. But, based on your answers, I think this is really about our terminology. Let me start over to avoid confusion.

How is this standard definition TEXT file being created? I didn't see any in the download.
Is this standard definition TEXT file going to be automated somehow?
If the standard definition TEXT file is automated, does it know NOT to define a creature's tile if it's left blank?
If it's not automated, how are you going to mix and match sets?
How are the professions pulled for the standard races and animal people for the TEXT file?

Sorry if I wasn't clear before. I do understand what you have done. I wanted to know how you are going to tackle the standard definition text file. Based on this comment . . .

We would provide matrix templates with (names crossing textures/professions with the respective animals/races) in case artists just want to fill them up and not to bother with making the text files.

 . . . you would just "provide matrix templates."

How?
Logged
DFMA Profile | burnedfx Graphic Set

The process of delving into the black abyss is to me the keenest form of fascination. - H. P. Lovecraft
The Delvers
. . .the middle ground between light and shadow . . . - Rod Serling
The Delvers' Podcast

Quiet-Sun

  • Bay Watcher
  • Escaped Lunatic
    • View Profile
    • www.solardynamo.org
Re: Dwarf Fortress graphics repositories
« Reply #37 on: January 30, 2016, 01:21:35 pm »

I didn't see anything in your script regarding a standard definition file. It reads as if it goes through the existing image(s) and existing definition file(s) and creates png(s) as far as I can tell. But, maybe I don't understand your script and I'm just missing the part that creates the definition file. But, based on your answers, I think this is really about our terminology. Let me start over to avoid confusion.

How is this standard definition TEXT file being created? I didn't see any in the download.
Is this standard definition TEXT file going to be automated somehow?
If the standard definition TEXT file is automated, does it know NOT to define a creature's tile if it's left blank?
If it's not automated, how are you going to mix and match sets?
How are the professions pulled for the standard races and animal people for the TEXT file?

Sorry if I wasn't clear before. I do understand what you have done. I wanted to know how you are going to tackle the standard definition text file. Based on this comment . . .

We would provide matrix templates with (names crossing textures/professions with the respective animals/races) in case artists just want to fill them up and not to bother with making the text files.

 . . . you would just "provide matrix templates."

How?

I'm on my phone so I'll give you a more detailed explanation later. Currently, there is no script to create the text files yet, but I don't expect this to be difficult to implement. My focus right now is to develop a proof of concept and that's why I started with the creature images. 

My intention for the next improvement of the script is the generation of the template so give me a couple of days and you'll see them
Logged

Quiet-Sun

  • Bay Watcher
  • Escaped Lunatic
    • View Profile
    • www.solardynamo.org
Re: Dwarf Fortress graphics repositories
« Reply #38 on: January 31, 2016, 03:30:53 am »

Ok, here is what I mean by a matrix template.  The files you are going to look have all been generated by the automatic script (text and all).  I have now filled all rows if there is at least a standard tile like this:

- If no child, use standard
- If no animated, turn standard B&W and flip it along the left-right direction
- If no trained_hunter, or trained_war, use standard.

tiles where you see black outlines don't exist in a particular graphic set:

creature_birds_new - Phoebus:  Had only standards and childs for all animals, all other tiles filled as above


creature_insects - CLA: Missing giants


creature_domestic - Spacefox:  Has it all except trained_hunter and trained_war.  I don't know how many creatures can become trained.



creature_mountain_new - Afro:  Empty



Anyway, you get the idea.  All converted creature sets for this iteration can be found here:

https://dl.dropboxusercontent.com/u/408446/DF/Standard%202.0/Graphics%20Standardization2.zip


The idea is that with each tile uniquely defined, artists can fill the gaps without worrying about the text files.   Even if you just want to fill one creature, incorporating such a contribution to a functional graphic set is going to be much easier than Fricy trying to plug holes everywhere in an increasingly large group of graphic sets.
Logged

CLA

  • Bay Watcher
    • View Profile
Re: Dwarf Fortress graphics repositories
« Reply #39 on: January 31, 2016, 07:03:42 am »

- If no animated, turn standard B&W and flip it along the left-right direction
I was about to ask whether we could drop that and just leave it as it is, but the more I think about it, the more I actually like it for CLA.

Another thing though: How do we deal with AS_IS vs ADD_COLOR? tell the script which to use? I figure you could let the script check whether the tile only contains white/greyscale or other colors too, but there's always the possibility that someone wants ADD_COLOR even with other colors or AS_IS with no colors (for example those animated tiles, or maybe a polar bear). Replacing all instances of AS_IS with ADD_COLOR is easy enough, but if you have mixed sets, it's gonna get annoying.

Pulling the color out of the raws and coloring the png automatically is problematic too, since it depends on the color scheme.


In the end, I think the most sensible thing to do is to just keep it as ADD_COLOR as default, and have people replace it with AS_IS where they need it. It's the less used alternative anyway.
Logged
CLA - an ASCII-like Graphic Pack with simplified letter-like creature graphics. The simple and clean looks of ASCII with distinct creature graphics - best of both worlds!

http://www.bay12forums.com/smf/index.php?topic=105376.0

Pidgeot

  • Bay Watcher
    • View Profile
Re: Dwarf Fortress graphics repositories
« Reply #40 on: January 31, 2016, 07:45:11 am »

Ok, here is what I mean by a matrix template.  The files you are going to look have all been generated by the automatic script (text and all).  I have now filled all rows if there is at least a standard tile like this:

Obviously this is a work in progress, so the details are not finalized, but one thing I notice is that it's not entirely obvious where the tile boundaries are located just based on the grid lines on the edge. On the first column, the first tile includes both the "left" and the "right" line of black pixels; on subsequent ones it's only the right line that's included.

Would it perhaps make sense to include space for the grid lines, perhaps, and actually extend them into the "tile" area for the sake of overview? That would also make it easier to identify an undefined cell: it's one where every pixel is transparent, rather than one where certain edges are black and everything else s transparent.

(It would also theoretically make it possible to specify special cases, e.g. ADD_COLOR/AS_IS, by using specific RGB values for specific pixels in the border... but that's a more advanced concept anyway, so don't worry too much about that for now)

burned

  • Bay Watcher
    • View Profile
    • burnedFX
Re: Dwarf Fortress graphics repositories
« Reply #41 on: January 31, 2016, 12:00:36 pm »

How do we deal with AS_IS vs ADD_COLOR?
I totally forgot about the AS_IS versus ADD_COLOR. Thanks.


The files you are going to look have all been generated by the automatic script (text and all).
&
The idea is that with each tile uniquely defined, artists can fill the gaps without worrying about the text files.

Standard image organization is great for the repo, but the current problem that exists in the repo are with the definition text files. Organizing the images in each set to match a standard means nothing without updated working definitions. The challenge is the definition text file that syncs with the images you are creating.

Anyway, you get the idea.

I do get the idea and I'd love to see you or someone pull this off, but all of some of my questions still remain unanswered.

edit: Well, not all of them since you said it would be automated. Heh.

I don't know how many creatures can become trained.
P.S. Here is a list. I hope that helps.

edit 2: link fixed =X!
« Last Edit: January 31, 2016, 01:06:24 pm by burned »
Logged
DFMA Profile | burnedfx Graphic Set

The process of delving into the black abyss is to me the keenest form of fascination. - H. P. Lovecraft
The Delvers
. . .the middle ground between light and shadow . . . - Rod Serling
The Delvers' Podcast

Quiet-Sun

  • Bay Watcher
  • Escaped Lunatic
    • View Profile
    • www.solardynamo.org
Re: Dwarf Fortress graphics repositories
« Reply #42 on: January 31, 2016, 12:09:37 pm »

Obviously this is a work in progress, so the details are not finalized, but one thing I notice is that it's not entirely obvious where the tile boundaries are located just based on the grid lines on the edge. On the first column, the first tile includes both the "left" and the "right" line of black pixels; on subsequent ones it's only the right line that's included.

Would it perhaps make sense to include space for the grid lines, perhaps, and actually extend them into the "tile" area for the sake of overview? That would also make it easier to identify an undefined cell: it's one where every pixel is transparent, rather than one where certain edges are black and everything else s transparent.

My bad, I intended to mark all borders, but forgot.  Now it's done and columns/rows alternate between black and gray

   

Another thing though: How do we deal with AS_IS vs ADD_COLOR? tell the script which to use? I figure you could let the script check whether the tile only contains white/greyscale or other colors too, but there's always the possibility that someone wants ADD_COLOR even with other colors or AS_IS with no colors (for example those animated tiles, or maybe a polar bear). Replacing all instances of AS_IS with ADD_COLOR is easy enough, but if you have mixed sets, it's gonna get annoying.

Pulling the color out of the raws and coloring the png automatically is problematic too, since it depends on the color scheme.

In the end, I think the most sensible thing to do is to just keep it as ADD_COLOR as default, and have people replace it with AS_IS where they need it. It's the less used alternative anyway.

(It would also theoretically make it possible to specify special cases, e.g. ADD_COLOR/AS_IS, by using specific RGB values for specific pixels in the border... but that's a more advanced concept anyway, so don't worry too much about that for now)

Since I'm so new to DF, I'm only familiarizing myself with the different sections so that's why I greatly appreciate your feedback.  Pidgeot, what you suggest is very easy to do I will give it a try. 

QUICK QUESTION: Can the ADD_COLOR and AS_IS entries have anything after them besides DEFAULT?


I don't know how many creatures can become trained.
P.S. Here is a list. I hope that helps.

Thank you!


Standard image organization is great for the repo, but the current problem that exists in the repo are with the definition text files. Organizing the images in each set to match a standard means nothing without updated working definitions. The challenge is the definition text file that syncs with the images you are creating.

Anyway, you get the idea.

I do get the idea and I'd love to see you or someone pull this off, but all of my questions still remain unanswered.

Seeing that the idea has traction, what comes next is generating the text files.  I honestly think it shouldn't be too difficult.  Let's see how it goes.
Logged

CLA

  • Bay Watcher
    • View Profile
Re: Dwarf Fortress graphics repositories
« Reply #43 on: January 31, 2016, 12:31:10 pm »

QUICK QUESTION: Can the ADD_COLOR and AS_IS entries have anything after them besides DEFAULT?

Yes, the texture tokens (i.e. the various rows in your example image: ANIMATED, GHOST, ADVENTURER, etc).
http://dwarffortresswiki.org/index.php/DF2014:Graphic_set#List_of_Professions.2C_Creatures_and_States

As for the border thing, I assume that's only for the example files or - if we follow pidgeots suggestion to use it for colorization indication - temporary, because those would be visible in game.
Logged
CLA - an ASCII-like Graphic Pack with simplified letter-like creature graphics. The simple and clean looks of ASCII with distinct creature graphics - best of both worlds!

http://www.bay12forums.com/smf/index.php?topic=105376.0

burned

  • Bay Watcher
    • View Profile
    • burnedFX
Re: Dwarf Fortress graphics repositories
« Reply #44 on: January 31, 2016, 12:44:52 pm »

I guess the flaw that I see in your current script is that it relies on preexisting definition text files. So if a HIPPO is defined twice or something is misspelled or GIANT_LION is defined as LION_GIANT or the myriad of other possibilities - how does that even work? Also, what's the point if you need a preexisting error free definition text file for the script to work in the first place, you know?

When you say it shouldn't be too difficult I feel as if you're not considering things like professions that exist in game that you can define tiles for that are not in the raws . . . how are you going to pull that off?

No pressure Quiet-Sun. ;]
« Last Edit: January 31, 2016, 01:12:53 pm by burned »
Logged
DFMA Profile | burnedfx Graphic Set

The process of delving into the black abyss is to me the keenest form of fascination. - H. P. Lovecraft
The Delvers
. . .the middle ground between light and shadow . . . - Rod Serling
The Delvers' Podcast
Pages: 1 2 [3] 4 5 ... 20