.com.unity Forums

.com.unity Forums (http://forum.shrapnelgames.com/index.php)
-   Scenarios, Maps and Mods (http://forum.shrapnelgames.com/forumdisplay.php?f=146)
-   -   PERFECT SPRITE EXTRACTION (http://forum.shrapnelgames.com/showthread.php?t=34427)

Sombre April 28th, 2007 08:48 AM

PERFECT SPRITE EXTRACTION
 
Sorry for the caps but this really is a HUGE announcement. Thanks to something Endoperez said in a sort of offhand manner we now appear to have a way of extracting perfect (though not attacking) sprites from Dom3.

This is going to be a MASSIVE help to modders like myself who have previously had to pretty much redraw the sprites by eye and hand in order to modify them,... AND it's going to mean any random fool (if you'll pardon the term) can now make graphical alterations and new units and whatnot that fit in with Vanilla dom3 more or less perfectly. With this method there is literally no excuse for dodgy or very basic graphics any more.

Here's how I did it, following Endo's guidance.

Turn off the filter in graphical preferences.
Switch resolution to 800x600.
Find the unit you want and right click on it to bring up its display screen.
Then printscreen (screengrab), paste it into a graphical app and cut out the graphic you want.

THAT'S IT.

If I'd known this a few months ago,.... wow that woulda saved me a LOT of time. I'd also have made probably twice as many mods.

THANKYOU ENDO! I really can't stress that enough http://forum.shrapnelgames.com/images/smilies/laugh.gif

Endoperez April 28th, 2007 08:56 AM

Re: PERFECT SPRITE EXTRACTION
 
It might not wprk just right, though. Half the human sprites I get are about 40 pixels high instead of ~32. Singularity's post has some details.

Endoperez April 28th, 2007 09:06 AM

Re: PERFECT SPRITE EXTRACTION
 
Okay, now I got why it didn't work when I last tried it. I used 800x600 resolution fullscreen and took the screenshots from windowed mode, thinking that what I saw was 800x600. However, it isn't! Even though the command line file, at least, claims that the default windowed resolution is 800x600, using commandline -r 800x600 in the shortcut makes Dom window much smaller. Unit screenshots can be grabbed from windowed mode if you have a shortcut with that property.

Any sprite wishes? I'll do some Caelum ones first.

Endoperez April 28th, 2007 09:13 AM

Re: PERFECT SPRITE EXTRACTION
 
Wow, it will be EXTEREMLY easy to grab sprites if you just change the GUI into something that is of single, even color everywhere and put GUI opacity into 1. Then just PrtScreen, paste, use color chooser to select all black that's ever-so-slightly hued by the background, change it into color of your choice. Then change the shadow, pure black, into magenta. VERY FAST!

Sombre April 28th, 2007 09:29 AM

Re: PERFECT SPRITE EXTRACTION
 
1 Attachment(s)
I honestly think this is so easy that we don't even need a sprite library any more - you can just get whatever sprite you need at any given moment.

I have just made two new units using this technique. The old way of doing things this would have been like an hours work or something, to get it this good. It took me literally 5 minutes.

The bmp with the two new units (which will be for ulm reborn) will be attached in a moment.

Sombre April 28th, 2007 09:35 AM

Re: PERFECT SPRITE EXTRACTION
 
I'd like to add that, now, if anyone needs any more complex artwork done for their mods (stuff that goes beyond changing the vanilla sprites a bit, making attack sprites etc) I will probably be free to do it, provided I like the mod.

Might be able to do some awesome stuff for padmassa, for instance, using vanilla sprites as a base.

Endoperez April 28th, 2007 09:40 AM

Re: PERFECT SPRITE EXTRACTION
 
1 Attachment(s)
LA Caelum unit sprites attached to this post. This is FAST! Choose unit, take screenshot, paste, select area tool, select unit, new window, paste, select eraser, select background color, erase background, move unit/shadow to nice position, save. I did most of these twice, due to not noticing the black area between their legs. INSANE SPEED!

Endoperez April 28th, 2007 09:55 AM

Re: PERFECT SPRITE EXTRACTION
 
Gandalf, or anyone else who happens to know the answer:

Would it be possible to do a shortcut for Dominions that first replaces guiborder2.tga with some other tga file, then launches Dom with a --postexec command that somehow replaces the new guiborder2.tga with the original? Or copy of the original, actually, but you know what I mean. It would enable one Dom directory to be used for both normal games AND for ultra-quick screen-grabbing of units, with the only difference being in the shortcut used to launch Dom.

I'm pretty sure it could be done with two .bat files, but I can't write those. http://forum.shrapnelgames.com/images/smilies/frown.gif

Sombre April 28th, 2007 10:00 AM

Re: PERFECT SPRITE EXTRACTION
 
I don't even think it's that important to be able to do them super fast - I mean even without changing the borders and whatnot you can still get the sprite out cleanly and make the shadow in under a couple of minutes.

I really think there's no need to go extracting all the sprites, since it's so easy to just get the ones you need from right clicking 'em on the recruit screen and following the method. The rest can be got from the monster file cabinet map. I mean having all the sprites to hand would be nice and all, but it would only save you a few minutes - modifying them to look different instead of trying to extract them is what takes the time now, as it should be.

For sure the biggest thing to happen on this forum. Crazy that we only just got this working.

Juzza April 28th, 2007 10:27 AM

Re: PERFECT SPRITE EXTRACTION
 
It may not be able to do attack sprites but other that I have to share with Sombres Excitement! now I shouldn't look so stupid with my silly animations!!!

Endoperez April 28th, 2007 10:49 AM

Re: PERFECT SPRITE EXTRACTION
 
Nah, I don't think this's the biggest thing to happen here. Those who can draw will still draw their sprites by hand, but perhaps a bit quicker than earlier. Those who are too lazy to draw still won't. The handful of would-be modders who don't want to spend their time making pixel-soldiers will get their mods finished, and might post them here. However, this won't start an explosion of mods - we already had that one! Really, I don't remember having seen this many active mod threads in DomII forums, ever. I don't know what the big thing was, but it sure must have been spectacular to have this kind of an effect!

normalphil April 28th, 2007 11:20 AM

Re: PERFECT SPRITE EXTRACTION
 
Quote:

Endoperez said:
However, this won't start an explosion of mods - we already had that one! Really, I don't remember having seen this many active mod threads in DomII forums, ever. I don't know what the big thing was, but it sure must have been spectacular to have this kind of an effect!

For me, I'm pretty sure it's the eras and not having to overwrite an existing faction. All of a sudden there's a narrative, and the reason for me to make a mod isn't just to see how a given set-up plays, it's also a way to tell a story. Was never seriously tempted to make a DomII mod.

Gandalf Parker April 28th, 2007 12:09 PM

Re: PERFECT SPRITE EXTRACTION
 
Its pretty much what was done in Dom2 to create the library we had. Someone also created a macro which worked its way thru the entire All_Units game to save all of the units to a graphic named for its unit ID number.

We do have a complete collection for Dom3. Altho its a couple of patches old so a few might be missing. Its in the Tools and Tutorials link.
Dom3 Unit Reference v3.04

If I remember correctly there were like 5 filters that could be turned off in order to get the cleanest image-grab. The result tended to look ugly without the smoothing and shadowing effects that the game does, but the end results were better. If you edit a "smoothed" copy of an image, and then the game smoothed it again, it tended to be pretty blurry.


Sombre April 28th, 2007 01:02 PM

Re: PERFECT SPRITE EXTRACTION
 
I can't get that link working (the one pointing to the reference, not your one pointing to the thread) and I was under the impression the images weren't the right size.

Endo: I think you underestimate the difference between drawing a peltast with a new kind of shield by hand and just grabbing the shield from one unit and pasting it on another. Look at the hoch-hammer unit I made - it's basically a modification of the hochmeister, but in order to make that before I knew about this, I had to basically redraw the hochmeister himself. That takes a lot of time and effort.

Some of the mods on here have used some fairly shakey graphics. With this technique they can cut and paste and edit a bit using these graphics and make something which looks much better and fits with Dom3. Again, the difference between drawing from a very rough / blurry template or from scratch and just modifying an existing graphic is huge.

Gandalf Parker April 28th, 2007 01:19 PM

Re: PERFECT SPRITE EXTRACTION
 
Hmm worked just now for me using Firefox.

Editing sprites for this game IS much easier when there are some to cut-n-paste from. Making a combat image (the second sprite for the "combat" move in case there are lurkers reading this) is much easier by cut-n-pasting the arm into a new position. Making new sprites by changing some colors of a unit image, or pasting together pieces of different images, also helps. Even just having an example to use for sizing and such.

Of course eventually its good to draw your own but I think this is a great thing for that middle section between just changing the text and completely designing your own units. And it will be a particular help to the "improved nations" modders who are working with the nations that are already in the game.

Foodstamp April 28th, 2007 03:19 PM

Re: PERFECT SPRITE EXTRACTION
 
Bah, you got me excited. I thought you had found a way to extract the attack sprites too. Knowing the optimal settings will definitely reduce the time I spend on sprites if I decide to edit in game sprites.

Now if we can get the modding graphics limit cap fixed, I may consider replacing some of my reused sprites with custom ones in a few of my mods.

Gandalf Parker April 28th, 2007 05:15 PM

Re: PERFECT SPRITE EXTRACTION
 
I think he was emphasizing "perfect sprites" rather than "perfect extraction" http://forum.shrapnelgames.com/images/smilies/happy.gif

and I thought the sprite cap was worked out. Something to do with the order that the commands were put into the mod file?

Foodstamp April 28th, 2007 05:29 PM

Re: PERFECT SPRITE EXTRACTION
 
Quote:

Gandalf Parker said:
I think he was emphasizing "perfect sprites" rather than "perfect extraction" http://forum.shrapnelgames.com/images/smilies/happy.gif

and I thought the sprite cap was worked out. Something to do with the order that the commands were put into the mod file?

Really? If so, this is great news. I have been steering clear of adding new graphics because of this bug.

lch April 28th, 2007 05:45 PM

Re: PERFECT SPRITE EXTRACTION
 
Quote:

Endoperez said:
Would it be possible to do a shortcut for Dominions that first replaces guiborder2.tga with some other tga file, then launches Dom with a --postexec command that somehow replaces the new guiborder2.tga with the original? Or copy of the original, actually, but you know what I mean. It would enable one Dom directory to be used for both normal games AND for ultra-quick screen-grabbing of units, with the only difference being in the shortcut used to launch Dom.

I'm pretty sure it could be done with two .bat files, but I can't write those. http://forum.shrapnelgames.com/images/smilies/frown.gif

Something along the lines of <font class="small">Code:</font><hr /><pre>@echo off
ren "&lt;path to file&gt;\guiborder2.tga" guiborder2.old
ren "&lt;path to file&gt;\guiborder2.new" guiborder2.tga
"&lt;path&gt;\dom3.exe"
ren "&lt;path to file&gt;\guiborder2.tga" guiborder2.new
ren "&lt;path to file&gt;\guiborder2.old" guiborder2.tga</pre><hr />
Batch files are like shell scripts, just a collection of commands that you would type into the command line window.

Endoperez April 28th, 2007 05:50 PM

Re: PERFECT SPRITE EXTRACTION
 
I know that, but I don't have experience with shell commands or command lines in general. Using renaming that way is also new to me. Thanks, I can use that.

Sombre April 28th, 2007 09:44 PM

Re: PERFECT SPRITE EXTRACTION
 
Quote:

Foodstamp said:
Bah, you got me excited. I thought you had found a way to extract the attack sprites too.

Attack sprites are easy for the most part - just adjust an arm and a leg, shift the weapon a bit etc.

Juzza April 29th, 2007 08:52 AM

Re: PERFECT SPRITE EXTRACTION
 
Quote:

Sombre said:
AND it's going to mean any random fool


I wonder who he meant when he said that!! *shifty eyes*

VedalkenBear April 29th, 2007 12:14 PM

Re: PERFECT SPRITE EXTRACTION
 
Well, if someone can tell me a graphics program that can open and manipulate a .tga file, I might be able to get something done.

As it is, nothing I have seems to work.

Sombre April 29th, 2007 12:41 PM

Re: PERFECT SPRITE EXTRACTION
 
I use Paint Shop Pro, but people here seem to like GIMP, which is free. Just google for it.

Gandalf Parker April 29th, 2007 12:51 PM

Re: PERFECT SPRITE EXTRACTION
 
alot of people use IrfanView (I think its free) as a viewer so that you can see the graphics in the maps folder easily. Very handy when you are batch-generating maps. An added benefit is that it offers to "save as" to many formats. So you can convert the tga to a bmp, use paint, then convert it back.

VedalkenBear April 29th, 2007 02:09 PM

Re: PERFECT SPRITE EXTRACTION
 
IrfanView? All right, I'll check into that, Gandalf, thanks. (All I need to do is change the filetype.)

I might look at GIMP too, but I'm really not that good at art. Pixel-by-pixel in Paint is about my limit. &gt;&lt;

Endoperez April 29th, 2007 04:12 PM

Re: PERFECT SPRITE EXTRACTION
 
I use MsPaint for the extraction because it's very quick to use and to open. Once I define the image size to 64x64 it's very easy to paste, copy unit, ctrl+n for new 64x64 blank, paste, edit and save. I could do the same in Gimp, but it opens much more slowly.

I use IrfanView to open Paint-saved .bmp files and to save them as targa files Dominions uses.

I use Gimp when I need to change the colors of the unit or of (some of) its equipment. It's easy to change e.g. all blue of a Ranger's (LA Ulm) clothes to green. The things you want to be able to do are:
1) use the color changing/shifting tools, and the blurring tools
2) use various selection tools (by area, all similar color, the magic wand selector tool) to restrict e.g. the blurring or the color shift into just parts of the sprite
3) use the basic tools for pixel-by-pixel editing to change one weapon to a different one, or to make a shield or change the shield's type, or to add a symbol, or to make an attack sprite.
4) use layers.


Examples:
You take a LA Ulm Ranger: a crossbowman clad in green. You choose a correct option from the toolbar and get to a window that lets you change all blue in the picture to a different hue, e.g. green. the boots are now discolored, so you paste another ranger into another layer, copy the original boots and paste them on the green one. Ta-da: a William Tell the Marksman!

You take a Vanir, and remove the horse. You take a Wyvern. You select the Wyvern's wing and move it into a separate layer. You add the riderless Vanir to a third layer. You realign the layers so that the rear wing is behind the Vanir, but the front wing is before him. Ta-da: a Wyvern Knight!

Foodstamp April 29th, 2007 05:12 PM

Re: PERFECT SPRITE EXTRACTION
 
You make it sound so easy. I may take a stab at graphic editing.

Gandalf Parker April 29th, 2007 05:22 PM

Re: PERFECT SPRITE EXTRACTION
 
Using a paint program is fun but learning layers sucks IMHO

Endoperez April 29th, 2007 05:28 PM

Re: PERFECT SPRITE EXTRACTION
 
Quote:

Foodstamp said:
You make it sound so easy. I may take a stab at graphic editing.

I have a week of free time. I might make a few simple tutorials, mainly about which tools of Gimp you want to use.

Many nice tools affect the whole layer, so I move copy sprites into new layers pretty often, then use recoloring tool to change their color. Sometimes I have two-three layers of these recolored sprites, with various transparency settings, so that one makes a Great Eagle red, another (recolored orange and with high contrast and adjusted brightness) gives its wings bright red-yellow tips, and a third is another red eagle, almost transparent, that softens the deep shadows of the high-contrast layer a bit. SAttached, and shown below, is a double-size version of a sprite I posted into Fiery Caelum thread. Don't use this jpg in mods!

http://www.shrapnelcommunity.com/thr...3-firebird.jpg

EDIT:
As for Gandalf's comment...

I can make new layers, and paste content into them. I can also adjust their transparency level. That's all I do with layers, and it already allows all kinds of tricks. At least with Gimp's interface, it isn't hard.

Gandalf Parker April 29th, 2007 06:28 PM

Re: PERFECT SPRITE EXTRACTION
 
I tried to get gimp to do what I wanted. Working with maps of course. The white dots are the most important part of a map. You cant let them get fuzzied or smeared. I tried to grab all of the white dots to a layer for safekeeping. Then the border lines of the map into a layer. Then do some colorations to the map (such as blurs). And make the borders abit transparent. Then paste the layers back together.
Its.. um.. on my list of things to learn.

Juzza April 29th, 2007 06:29 PM

Re: PERFECT SPRITE EXTRACTION
 
I use CorelDraw for stuff like saving it as a TGA file and changing colours, I do all my other work in paint, I find it simple and easy, unlike Corel which is like, woa!!

And if a fifteen year old can do it so can all of you!!

Foodstamp April 29th, 2007 06:44 PM

Re: PERFECT SPRITE EXTRACTION
 
1 Attachment(s)
Ok Endo, you inspired me to give it a shot. Here is a Captain of Rohan I created using the Equite of the Sacred Shroud as the base unit. It took me about 30 minutes to make the unit because I am terribly slow and art is not my thing at all. But for a first attempt, I am really pleased with the results.

http://www.shrapnelcommunity.com/thr...ptainrohan.jpg

BandarLover April 29th, 2007 06:53 PM

Re: PERFECT SPRITE EXTRACTION
 


[/quote]

I have a week of free time. I might make a few simple tutorials, mainly about which tools of Gimp you want to use.



[/quote]

Huzza!! A tutorial on how to make units is exactly what I'm looking for!! I use to be O.K. with Illustrator but that was many years ago, and I've forgotten much since then. I NEED tutorials to walk me thru the process a couple of times before I feel comfortable doing things on my own. You'll be my friend forever if you do this Endo. http://forum.shrapnelgames.com/images/smilies/happy.gif

And I feel sure I qualify as the 'any fool' Sombre mentioned earlier in this post. http://forum.shrapnelgames.com/image...es/biggrin.gif

Endoperez April 29th, 2007 06:58 PM

Re: PERFECT SPRITE EXTRACTION
 
Very good! Congrats for getting started. It takes time, but the results are usually quite good when you have a good sprite or several which you use for reference. Copypasting and color-changing usually gives me the best results. You can get pretty fancy units if you remove the horse of a mounted unit, take sprite of a glamourous/ethereal unit and don't give it either, remove and/or add cape, wings, shield or mount. My avatar is a Horse Brother without a horse, my Warlord from Ulm Upgrade is LA Ulm Zweihänder with Black Lord's cape, Wyvern and DomII Daoine Sidhe (Van dressed in green) make a good Wyvern Knight, etc.

Foodstamp April 29th, 2007 07:03 PM

Re: PERFECT SPRITE EXTRACTION
 
I need a break from modding, I may retire to doing graphics a bit, kinda fun http://forum.shrapnelgames.com/images/smilies/happy.gif

Amos April 29th, 2007 07:22 PM

Re: PERFECT SPRITE EXTRACTION
 
Layers are a great tool, but when you get to 20-30 layers in 1 sprite, as I some times do, it becomes very confusing. Without layers though, painting sprites one pixel at a time is an extremely time consuming work.

Foodstamp April 29th, 2007 08:47 PM

Re: PERFECT SPRITE EXTRACTION
 
1 Attachment(s)
I think I am doing it the time consuming way. With a bit of planning, I can probably make better use of layers and speed up the process. Here is my second attempt, a displacer beast made from recolored Mind Lord tentacles and a Ghost cat.

http://www.shrapnelcommunity.com/thr...lacerbeast.jpg

llamabeast April 29th, 2007 08:54 PM

Re: PERFECT SPRITE EXTRACTION
 
Both the Captain of Rohan and the Displacer Beasts look awesome! This does look like it's going to herald a lot of amazing mod graphics.

VedalkenBear April 30th, 2007 08:58 AM

Re: PERFECT SPRITE EXTRACTION
 
Those _do_ look quite nice, Foodstamp, but is there any way you can get the Displacer Beasts' tentacles over their head? That, and they're usually depicted a little leaner...

llamabeast April 30th, 2007 09:41 AM

Re: PERFECT SPRITE EXTRACTION
 
Do you reckon his displacer beast is too podgy, Vedalken? Greedy displacer beast! http://forum.shrapnelgames.com/images/smilies/happy.gif

Sombre April 30th, 2007 10:31 AM

Re: PERFECT SPRITE EXTRACTION
 
1 Attachment(s)
It's interesting that you made a graphic using the ghost cat as a base, because I just did exactly the same thing for Jomon Broken. The Black Nekoni had been using the ghost cat graphic, but I decided to give it a new and more dinstinctive one. It took me about 5 minutes total, including extracting the sprite :]

A pic is attached - it also features the new Neko Maiden graphic, which I made by extracting a pic from a Jomon female of some sort. Note the red tail and cat ears. Much more distinctive. This also took about 3-5 minutes. Under the old method I wouldn't have even bothered it would have taken so much longer.

llamabeast April 30th, 2007 10:40 AM

Re: PERFECT SPRITE EXTRACTION
 
Are they tails that it has two of?

Sombre April 30th, 2007 10:44 AM

Re: PERFECT SPRITE EXTRACTION
 
Sure are. Is that not clear enough? I could redraw 'em.

llamabeast April 30th, 2007 11:23 AM

Re: PERFECT SPRITE EXTRACTION
 
They look like they have suckers or something on the end of them. Well, I might just be going mad. I think what it is is they get a bit wider at the end, and have a funny texture there as well.

Sombre April 30th, 2007 11:56 AM

Re: PERFECT SPRITE EXTRACTION
 
That's just what the vanilla sprite's tail looks like. Not my work at all -shrug-

But I can change it for next version no problem.

Gandalf Parker April 30th, 2007 01:02 PM

Re: PERFECT SPRITE EXTRACTION
 
Yes I thought they were DnD Displacer Beasts. They look like them. Cats with two octopus-style tentacles. They would be fighters with glamour.

Foodstamp April 30th, 2007 04:25 PM

Re: PERFECT SPRITE EXTRACTION
 
Quote:

Sombre said:
It's interesting that you made a graphic using the ghost cat as a base, because I just did exactly the same thing for Jomon Broken. The Black Nekoni had been using the ghost cat graphic, but I decided to give it a new and more dinstinctive one. It took me about 5 minutes total, including extracting the sprite :]

A pic is attached - it also features the new Neko Maiden graphic, which I made by extracting a pic from a Jomon female of some sort. Note the red tail and cat ears. Much more distinctive. This also took about 3-5 minutes. Under the old method I wouldn't have even bothered it would have taken so much longer.

I like your graphic, I think the tales looked fine. The first time I saw the ghost cat in the all unit view, I thought "Oh wow, I gotta make a displacer beast out of this guy."

As gandalf was saying, I plan to slap glamour on the sucker when I implement it in game. I have no mods that need the unit currently, but I had to make it http://forum.shrapnelgames.com/images/smilies/laugh.gif

Foodstamp April 30th, 2007 07:30 PM

Re: PERFECT SPRITE EXTRACTION
 
1 Attachment(s)
Here is another one I did late last night. Rohan Banner Carrier. I used bits and pieces from some of my other units and used the Van Hero as the base unit.

http://www.shrapnelcommunity.com/thr...-rohanhorn.jpg

BandarLover April 30th, 2007 07:35 PM

Re: PERFECT SPRITE EXTRACTION
 
Foodstamp can't be stopped! He's a graphic making fool now!

Very nice work. So when's the Lord of the Rings mod coming out?

http://forum.shrapnelgames.com/images/smilies/happy.gif Just kidding....or am I?


All times are GMT -4. The time now is 09:40 PM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.