Bay 12 Games Forum

Please login or register.

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

Author Topic: Dwarftraitist - A Dwarf Portrait Creator (version 0.1)  (Read 24470 times)

Kennel

  • Bay Watcher
    • View Profile
Re: Dwarftraitist - A Dwarf Portrait Creator
« Reply #15 on: May 09, 2009, 05:11:30 am »

Nice amount of answers already, thanks for posting everyone.

Will women dwarves have beards?

It will make bearded ladies, if you give it a she-dwarf and set her beard length over 0.

My current idea is that the only difference with male and female dwarves would be (family friendly) breasts. So no masculine or femine head/shoulder/hip shapes. However all parts can be made gender specific so you can make all men have huge cheeks etc.

Looks good, but i have to ask: what do you mean by no UI? do you have to re-compile with different settings?

In current version you just edit couple of text files and run the program and it gives you the result (and if I want to test group picture/random dwarf/custom dwarf I have to re-compile, but I'm adding those to text files too). I have no clear plans for the final UI yet but it would be nice to have a simple window with different controllers, preview screen and save button. We'll see.

Why such bright colors in the clothing?
To make it more appealing for kids and Nintendo fans, heh.

Yeah, I guess I should tone some of them down a little bit. I just copied most of profession related colors directly from the game.

I'm not sure how Toady will handle item colors, but I've made it possible to have material or profession specified colors or even totally unique color for each item.

---

Ah, I forgot to give any explanation on how it actually works. Here's a quick version. More detailed one might come at some point.

1. User starts program

2. It reads text files for
races
professions (colors)
materials (color and type, different types allow metallic boot and leather boot to have different sprites)
itemtypes (for example an axe has wooden handle and *material* blade)

3. Reads a creature file
Spoiler: Example (click to show/hide)

4. Adds race related bodyparts

5. Reads drawing order for bodyparts/items and possible tags (length, material, gender, wears/holds item in certain place...).

6. Chooses best sprite for all parts based on tags. For example if creature has an item in left hand, all left arm related parts use normalfilename_WEARHOLD.png file if possible.
Here's a chainmail example:
ITEM_ARM_ARMOR_CHAINMAIL.png and ITEM_ARM_ARMOR_CHAINMAIL_WEARHOLD.png

7. Color and combine the sprites in race specified order. This is the most time consuming part because it just dumbly goes through them all pixel-by-pixel. Current version takes about 3 seconds/dwarf.
Animation

8. Saves dwarf images or uses them to combine some bigger picture.
Logged

Tormy

  • Bay Watcher
  • I shall not pass?
    • View Profile
Re: Dwarftraitist - A Dwarf Portrait Creator
« Reply #16 on: May 09, 2009, 06:23:37 am »

This is pretty awesome!  8)
Logged

IronValley

  • Bay Watcher
  • Purple Smile!
    • View Profile
Re: Dwarftraitist - A Dwarf Portrait Creator
« Reply #17 on: May 09, 2009, 07:05:21 am »

Looks like a great idea.


Also, would it be possible to show us what a Adamantine full-plate, all-armor-and shield wearing hammerdwarf would look like? ;)

Logged

Vilien

  • Bay Watcher
    • View Profile
Re: Dwarftraitist - A Dwarf Portrait Creator
« Reply #18 on: May 09, 2009, 07:15:20 am »

This looks pretty awesome.
Logged

Davion

  • Bay Watcher
    • View Profile
Re: Dwarftraitist - A Dwarf Portrait Creator
« Reply #19 on: May 09, 2009, 07:53:44 am »

I am an artist I suppose.

I wouldn't mind messing around with the dwarf-parts. I suppose my one suggestion would be to have the graphic dwarf-parts available as a template so people can just edit them and make their own from it; like the way tilesets are done now.
« Last Edit: May 09, 2009, 07:56:08 am by Davion »
Logged

Kennel

  • Bay Watcher
    • View Profile
Re: Dwarftraitist - A Dwarf Portrait Creator
« Reply #20 on: May 09, 2009, 08:15:38 am »

Just a quick comment because this..
I suppose my one suggestion would be to have the graphic dwarf-parts available as a template so people can just edit them and make their own from it; like the way tilesets are done now.
is a pretty good idea that I hadn't thought at all. There's some challenges because current system is pretty flexible and allows ~infinite number of source pictures (you can create different sprite for each hair length 0-1000) but I'll give it a thought. It would certainly help others to create stuff.

But now I have a class reunion and tomorrow is a hangover day so I'll be back in 30 hours.
Logged

Kennel

  • Bay Watcher
    • View Profile
Re: Dwarftraitist - A Dwarf Portrait Creator
« Reply #21 on: May 11, 2009, 03:55:32 pm »

Status update:

I've added a crude UI system that allows me to generate any number of random dwarves/load them from files and either save individually or in a group photo. Group photos themselves take background picture, area that dwarves are allowed to stand and can be either strickly bordered or connected by left and right edge.
http://i44.tinypic.com/z69as.png

Dwarves also have height differences. Only things that actually change are their legs but it looks pretty good and saves workload when there's no need to make different torso and upperbody item for each height. I still have to think, if I need another solution for humans, elves etc.

I haven't created different images for pants yet so here's some hot naked dwarf action (I hope this page gets lots of hits from google):
http://i42.tinypic.com/mjbzgk.png

I haven't started the graphic template generator yet but I do have a quite good plan for it.

Also, would it be possible to show us what a Adamantine full-plate, all-armor-and shield wearing hammerdwarf would look like? ;)

I still haven't made platemail but here's current version (I should probably change adamantine color).



Oh, and adamantine hammers will be pretty useless but perhaps he's in the Royal Guard.


I'm also planning to make smaller status updates to LiveJournal (nothing there yet) so I won't bump this thread daily.
« Last Edit: May 11, 2009, 03:58:47 pm by Kennel »
Logged

qwertyuiopas

  • Bay Watcher
  • Photoshop is for elves who cannot use MSPaint.
    • View Profile
    • uristqwerty.ca, my current (barren) site.
Re: Dwarftraitist - A Dwarf Portrait Creator
« Reply #22 on: May 11, 2009, 08:32:09 pm »

Although this is just my opinion, it would be nice to have slightly reduced colors and top/bottom shading to give a semirealistic depth. On the other hand, adding slight black borders, cartoon style, would also work.

But maybe it works just fine as it is...
Logged
Eh?
Eh!

Fieari

  • Bay Watcher
    • View Profile
Re: Dwarftraitist - A Dwarf Portrait Creator
« Reply #23 on: May 11, 2009, 10:28:26 pm »

I believe there is also going to be some slight variation in height in the new version as well.  As well as fat too.
Logged

Vugor

  • Bay Watcher
    • View Profile
Re: Dwarftraitist - A Dwarf Portrait Creator
« Reply #24 on: May 12, 2009, 11:53:57 am »

Wow, I like where this is going.  I only wish i could help in someway, but sadly i hold next to zero actually useful skills for this, oo well
Logged

IronValley

  • Bay Watcher
  • Purple Smile!
    • View Profile
Re: Dwarftraitist - A Dwarf Portrait Creator
« Reply #25 on: May 12, 2009, 01:32:44 pm »

Awesome! ;)
Logged

MMad

  • Bay Watcher
    • View Profile
Re: Dwarftraitist - A Dwarf Portrait Creator
« Reply #26 on: May 12, 2009, 01:55:14 pm »

Really cool! :) Keep up the good work, it will be fun to watch this great idea develop.
Logged
"Ask not what your fortress can do for you - ask what you can do for your fortress."
Unapologetic ASCII abolitionist.

Random832

  • Bay Watcher
    • View Profile
Re: Dwarftraitist - A Dwarf Portrait Creator
« Reply #27 on: May 12, 2009, 02:31:05 pm »

Looks like great project, PLEASE do not give up!

I have also a suggestion - when dwarf has some artifact allow using custom picture for it.

Powergoal: have it make a picture of the artifact.
Logged

Tenebrous

  • Bay Watcher
    • View Profile
Re: Dwarftraitist - A Dwarf Portrait Creator
« Reply #28 on: May 12, 2009, 03:50:24 pm »

Sounds like a fun project - put some beards on those legendary figures we previously could only imagine. :)

On the subject of a standalone program with Eclipse, for compatibility across platforms I would recommend exporting the project as an executable JAR file. In Eclipse, this is done by right clicking on your project, selecting Export -> Java -> JAR File. Hit next until the "Manifest Specification" page, and select the class which contains your main() function as the application point of entry. The JAR file can contain the resources (images, etc) used by your program.

I don't know if you are already doing this, but running the program outside of Eclipse will mean a lack of console, so you will need to use something like the Swing API to either build a simple console-like UI or a more complex UI. If your program takes ALL of its information (including instructions on what to do with data) from the text file, it'd probably be easier just to build your program like a command line application, so using it will just mean dragging the text file onto the JAR file.

The only other thing I can think of is regarding the memory access. I am not aware of how you would do this with Java in particular because, unlike an application written in C++ or the like, Java runs on a virtual machine with its own "memory". I haven't researched this topic, so don't take my word as the only source on this, though. I believe that there is a standard Java API which can load a program (allowing the Java program to have control over the process and so, theoretically, its memory) but I cannot remember the name of the class at the moment, sorry.

Anyways, cool idea, and good luck on your project!
Logged
Enter TO CREATE THE WORLD.

Kennel

  • Bay Watcher
    • View Profile
Re: Dwarftraitist - A Dwarf Portrait Creator
« Reply #29 on: May 22, 2009, 04:09:11 pm »

First (test) version 0.1 released!

(Download)

This is just for people who want to create some random dwarves or make custom ones by editing text files (in data/creatures folder).

It's still quite unpolished and doesn't read any information from Dwarf Fortress but you can already have some fun with it. The files in data folder are editable and you can already create pretty interesting stuff by editing them (or could - there's no good tutorial yet and it's quite easy to make it crash).

I'm not sure how well it will work in non-windows computers. Tell me about any problems you'll encounter etc.

Well I guess that's it. Download and have fun with it for five minutes.
Logged
Pages: 1 [2] 3