PDA

View Full Version : Problem/Question: Messing around with Object Gifs.



Lytha
20th Jul 2002, 13:19
Well, it may be that I just don't have the right programs here, but this is a bit annoying now. All this is for Dromed 2.

First of, I can modify the skins of AIs without any problems, using Gimp for the painting, and Ulead Photoimpact 3.02 for the 8bit conversion and for saving it as a gif.

Alright. Here comes the big BUT. Lets take as an example the Gif for the Healthshield (/obj/txt16/shield.gif). When I mess around with this gif, already when I only save an existing gif without any modifications with that Ulead Photoimpact thing, dromed will crash, pointing the finger at the gif. This happens no matter with what palette I save the image.

Now after isolating this problem to the saving algorithms of the Ulead thing (at least, it looks like that), I tried messing with the images in Staroffice. Now dromed won't crash anymore, but the gifs look funny in the game mode. As in:

Ingame:

Black, White become transparent.
One colour & black, no matter which one, will become a disgusting turquoise on a transparent background.
More than one colour & black: one of the colours might become turquoise, the other colour(s) will become black, the black will stay transparent.


Err. Would I need to get one of the expensive programs to modify these gifs? Why then can I mess around with and save the AI skins without any problem?

THEthief
20th Jul 2002, 18:20
Hmm...I'm not sure about what program you're using, but I used a combination of MS paint (horrid, rotten little thing, I know - but sometimes it works for some things:D), and Jasc Paint Shop Pro 7 (YAY!!! LET'S HEAR IT FOR THE GREATEST PROGRAM IN HISTORY!!). I encountered no problems - one thing to note is that your pallette (at least in PSP) always has an 'invisible' color - I believe Thorin goes into this in his skin tutorial...I'm not sure that he's the one who wrote the tutorial, you'll have to ask him...ANYWAYS, it's a REALLY good tutorial, and goes into a lot of helpful stuff!!
Also, remember that Thief changes the colors - to get a purple/lavendar health schield (in game mode), I had to make mine a pinkish red. :)

Stile451
20th Jul 2002, 19:27
Dromed 2 doesn't need a specific pallette(even though I say otherwise in my maps tutorial, it's only for ease of use of the tutorial).

Color 1 in the image pallette is transparent, so you need to change all parts of the image that use color 1 to an unused color(and copy color 1 to that color), and replace color 1 with the color you want to be transparent(like that awful turqoise color as it's very easy to detect).

Gimp should be all you need for this. You can edit the pallette in Gimp somewhere, although I can't remember where it is off the top of my head.

schwaa
20th Jul 2002, 19:54
A great program to run your textures through is <b>Bright 183</b>. I think I have it at my site, otherwise its easy to find with Google.

save your images as 24 bit .bmp

run this command in DOS

<b>bright myskin.bmp myskin.pcx -8 -mask 0.0 -mips -o -auto N</b>

It will give you an 8 bit .pcx, save it as a .gif. This is really the best way to optimize your skins.

Make sure you save it a local(adaptive) .gif.
-----
Making a texture only one color and black is probably not an 8 bit .gif. You need more colors than that. you can select the gif, right click, go down to props, go to Summary and it will tell you how many bits are there.

Lytha
20th Jul 2002, 20:23
Err... Gimp can't save gifs, and Bright does not convert into gifs neither, I think? I am not sure about the capabilities of Bright yet, though...

So I need a program that is able to save these accursed gifs. :(


Well, I can make another gif, crash dromed once again and copy the error message that it spits into my eye while giving the gif the finger, it was gibberish for me (but it had the beloved yes,no,cancel...) There is definitely something odd...

Most of all I don't want my Player object...

[[heyyy... WTF?!?! That is an object, too! Dromed should crash all day while I am using that new skin for the Garrett object!]]

... err... I don't want my Player object to have that trdagger item. It's looking too much of a treasure, and so I worked at the hilt, and then the problems with the gifs began. The healthshields are not really important at all. Hmm... isn't the swordhilt in mesh? Shouldn't that work? Oh, the absurdity. :nuts:


Why does it act up when I use that program to save object gifs (health shields, swordhilts), but accepts the gifs for AI skins without any problem? And that colour behaviour with the Staroffice gifs is just bizarre... hehe...


Err. Sorry... I just encountered that I messed up what I did today in the dromed, and I feel a tiny little bit mad/nuts/psycho at the moment...



----------------------------------

ahh.. fixed the thing I screwed up. Good thing I'm backup-crazy.

----------------------------------



Thanks, schwaa, Salvage, THEthief. :)

But... when I have my .pcx thanks to Bright, I need to convert it into a .gif with a graphic program, or has Bright the option to convert it into a .gif?

And as it looks like, my graphic program totally screws everything up, {if AI-Skin = no problem; if Object-Skin = *boom*}

Unless it only frags dromed, and not Thief itself... but I believe I tried that yesterday with that messed up healthshield...

Stile451
20th Jul 2002, 21:17
You can get a plugin that will allow you to save as a gif in Gimp here (http://www.gimp.org/~tml/gimp/win32/). Look for a link and directions in the first paragraph.

Lytha
20th Jul 2002, 21:18
Okay, I tried it again for the error message. :)

Here is what I did.


I extracted the normal healthshield from the CRF and saved it into ...Thief2_Dromed\obj\txt16\shield.gif

So far, no problem with the dromed. :)

I flipped out my graphic program (Ulead Photoimpact 3.02), loaded the shield.gif. Palette showed up to the right as it should, nice nice.

I saved the thing as: shield.gif (Gif, I did not activate the transparency or the interlace (I tried all 4 combinations earlier and could not see any difference).)

I closed that graphic program, so that the file is not read-only.

I launched Dromed, loaded a mini mission. The mini mission works without problems normally.

I pressed Alt+G. Swap swap.

Here comes the dandy error message:

<b>"Assertation failed.
Failed to load resource data shield.gif (File resman.cpp, Line 1366)
(Yet to trap, No to exit, Cancel to ignore)
Yes, No, Cancel"</b>


As soon as I rename the bad shield.gif or kill it, everything works fine again.


The odd thing is now that it does *not* have any problems of this kind when I use the same routine for AI skins.

Could it be that the old objects (the ones that were already used in Thief 1) *do* need the Thief palette, and that my Ulead thing messes the palette up until dromed does not understand anymore what is going on?

Health shield, sword hilt... both were used in Thief 1.

Maybe I should try it with an object that was new in Thief 2.

Thorin Oakenshield
20th Jul 2002, 22:17
Thethief: Thanks for your kind words:)

Lytha: Bright will save it as a .pcx if you load that into Ulead Photoimpact 3.02 and then Save As .gif
Schwaa is right too. For Bright you need to Save your original image as a .bmp Or as .tga to maintain as much colour info as possible. Bright really is excellent:D
I'll be more that happy to do it for you, If you like;)

I hope this helps, And you get it sorted;)

Lytha
20th Jul 2002, 23:27
Thank you, Salvage! I have downloaded the Gimp&Gip thing. :)


Thorin Oakenshield,

my problem is not as simple as that I save it with too many colours or screw everything up otherwise (though it wouldn't be too unlikely). If I would, I had screwed up my map and the AI skins that I played around with, including the Garrett skin that I am using now for quite some time as standard.

It's just that I can't reskin objects. Totally weird.


I firstly tried now if the problem is for old (Thief 1) items alone, and screwed the /obj/txt16/remote3.gif around a bit. I painted it into a disgusting red, saved it as 8bit, etc etc. Crash boom bang. This time already when launching dromed, btw, but the same error message.

The "resman.cpp" made me search all the .crfs and the Thief directory for a file of this name (no avail).

I had now a glance at renderer -> mesh texture. I was already kicking myself for not having looked at it before, when I pressed Alt+G and the orb looked just like before. No disgusting red on it whatsoever.

So, I did now what I should've done already before (but then, I would not have had the right words for the search). I went to search the TEG Forum.

I found the following in "that other forum"... there was not much about the resman.cpp to read or about "mesh texture renderer", though one thread helped a lot:

http://www.ttlg.com/forums/showthread.php?s=&threadid=16217&highlight=mesh+renderer+texture

Larson:
<i>"Most object textures in Dromed is hardcoded, and cannot be replaced with adding a propertie (such as Shape -> Txtrepl r0 for objects or Renderer -> mesh textures for AI's). Not sure about the basketball, but if not working with above mentioned properties, that one is probably using a hard-coded texture. Then you probably must use 3DMax to give a object a new texture. Above is for Dromed2, btw."</i>

Shadowspawn:
<i>"You can reskin any object by editing the model file. I'd advise a Hex editor. Find the model name for the object (Shape -> Model Name), and get this file (name.bin) out of the obj.crf file.
Open it in a hex editor, you'll see some .gif. There may be more than one. You can look at those skin images, they'll be in the obj.crf file also, under the directory txt or txt16. You'll also notice that the filename in the .bin file is followed by 0's. Change the name of the gif you want to change by typing in 'replace0.gif' instead of the original name(no quotes). DON'T CHANGE THE SIZE OF THE FILE! You should only overwrite the 0's. If the name was longer, fill in the rest with 0's."</i>


So. I went into one of the .bins with the inbuilt hex-editor of my windoze ("edit.com /76"), replaced the word "remote3.gif" with "remote4.gif" (that was how I renamed my dandy disgusting red modification of the original remote3.gif after the first tries failed; it had the same size as remote3.gif, it was 8bit, it had the same resolution, etc - all the same in red, really). I saved it, launched Dromed again, Alt+G, and no luck. At least, I did not frag dromed anymore. ;)


Okay, this is seriously too dumb now. I will just let her have the expensive dagger though it does not suit at all... or maybe I screw up the sword until I get it done... hm...

And I will just use "shape -> model name" for the things I want to look different. *That* worked without problems... funny enough.

Though it looks dull now in the shop/loadout screen with the model name that I am now set on (skull). It's in a disgusting reddish brown and black on the top in the shop... But without the hint, the player wouldn't get the idea to pick up an item like a potted plant or a skull... hmph. It's quite nice though once ingame... far more fun to toss a potted plant or a skull around than that odd orb thing.



Well, and my prae-alpha tester is either too much of a newbie at Thief, or I am getting too much into the sadistic FM designer mode (which is bad for the playability, though fun while designing). He liked my now halfway object-ed rooms (no small stuff like bottles or playing cards, just furniture & lightning in the first stage of development), but he found only the 4 really easy loot items, missed all the less obvious things (such as the secret doors...) hm hm.

schwaa
21st Jul 2002, 01:49
Lytha, your .gif is NOT 8 bit. I've seen this happen alot on textures that I was using very few colors in. You have to increase the colors in the image until it can be saved as an 8 bit.

Probably the rest of objects and AIs have more colors in them.

Sometimes if I have enough space left over on the texture I'll paint spots of colors that aren't in the actual skin. Sometimes the whole square of the texture isn't used for the object and you'll never see it in game.
=======
PS, i really like the idea of throwing a skull for a cam!!! I have two skulls available too, one is in the Skully Bros pack.

Thorin Oakenshield
21st Jul 2002, 10:30
Lytha, On my downloads page there is a FREE hex editor. It's better than the windows trash:D
The thing I like about it is , When you right click a .bin file there is a send to in the menu where it opens the hex editor with your .bin (might only be for nt based pc's, w2k, xp)

Lytha
21st Jul 2002, 11:12
Hmm... I thought it was 8bit.... I told the Ulead to save it like that (standard method, not optimized), and the palette looked full enough with a lot of crazy colours... this might have been a problem though with the swordhilt and the health shield for sure! Thank you for the tip!

I am downloading the Hex-Editor now. :)


All this is so crazy. *grins* Maybe I will just search the .gif of the Constantine Swordhilt and tell the dagger to use that.

The SkullyBro's pack has skulls? Sure they must have that, the skulls in CL seemed different than the normal skulls. :D

Another problem with the skull as Orb may be that the skull has (just like the spiders) the camera in the butt-end. I noticed that only though when I started my Orb-acrobatics again for a close look at the Garrett-skin... hmm...