Miscolored Graphics

Posted By: Irish_Farmer

Miscolored Graphics - 09/05/04 12:43

I'm having problems. When I import a custom image the colors are screwed up. I'm assuming its a problem with the pallette. How do I make sure that I'm staying within the pallette's bounds when I draw graphics? My blues appear as yellows and its really annoying me. White doesn't even work for me.

I've worked with freeware game engines that don't force you to do anything except to make sure the graphics have no more than 256 colors. Why doesn't Acknex do something like this? It would simplify things.

I don't mind, I'd just like to know how to make sure that my colors don't change when I put them into the level.
Posted By: Dan Silverman

Re: Miscolored Graphics - 09/05/04 15:47

You don't need any palette what-so-ever to work with GameStudio. The only time you would need a palette is if you were creating a game to run at 8-bit mode. As long as your game is set to 16-bit or higher then you don't need a palette.

Are you still running A5? If so, MED and WED may display in 8-bit and look aweful (depending on what driver you have set for WED) but this will not affect what the graphics look like in the running game.
Posted By: Irish_Farmer

Re: Miscolored Graphics - 09/06/04 06:57

Hmm..I'm using A6 Commercial...I could have sworn I had it set in 16-bit mode. Hang on, I'll check...

All right, above the main function I have (sitting outside of the main function, or any function for that matter) the line var video_depth = 32; That's the highest possible setting so I don't understand what the problem would be. I put in a sprite character and its has lots of blues and greens, but when I test the game its brown and...strange.
Posted By: Dan Silverman

Re: Miscolored Graphics - 09/06/04 08:16

All I can say is you don't need a palette if you are running in either 16-bit or 32-bit mode. Have you looked at your sprite to see if that is the problem? What is the color depth of the sprite?
Posted By: Irish_Farmer

Re: Miscolored Graphics - 09/06/04 09:00

Well...I'm poor so I use this program called iDraw. Its a 256 color graphic. Can't remember what type.

Ok. Its a sprite with four frames of animation. Its of type bitmap. However, when I opened it up, it appeared to be miscolored.......just not with the weird colors that gamestudio gives it. For instance, the character's hair is purple (for some ungodly reason) in iDraw, but in gamestudio its a nice tannish brown.

I then proceeded to invert the colors, and still nothing changed in gamestudio. Am I supposed to be using a different image format? Or is there some other image editing program that I should be using?



While we're talking, can you answer another question? How do I make my own textures? For instance, I want to make a sky texture that's completely black. But I don't know how to compile a wad. I could have sworn I saw a tutorial or something somewhere, but I don't remember now.
Posted By: Irish_Farmer

Re: Miscolored Graphics - 09/06/04 09:09

Ok...I made a test sprite with paint. The background was white (which worked. Then I made a black (transparent) block. That worked. Then I made a red square (worked), and a bright green square and a bunch of other colors. Bright green looked like some kind of red. And the rest...well I can't be sure because after green I didn't really check...but the rest seemed a little screwy too. This is extremely annoying.
Posted By: Dan Silverman

Re: Miscolored Graphics - 09/06/04 09:34

Try creating a sprite that is not 256 colors, but is something higher like 16-bits or better. You can alwasy download GMP for Windows. It is free and will allow you to save in a format that is higher than 256 colors.

Quote:

How do I make my own textures? For instance, I want to make a sky texture that's completely black. But I don't know how to compile a wad.




You create your texture in a paint program and save it as BMP, PCX or TGA. You then open your level, open then texture manager, create a new WAD and then you can right-click in the new WAD view area (to the left) and select ADD TEXTURE (I think that is what it is called). Then you can navigate to where your texture is and select it. It will then be added to the new WAD you created. Don't forget to save it (right clicking will in the new WAD area will give you access to the button that allows you to save the new WAD after you have made any changes like adding a new texture to the WAD).
Posted By: Irish_Farmer

Re: Miscolored Graphics - 09/06/04 10:06

Thanks. I'll try all of that and get back soon if it doesn't work.

I appreciate the help.
Posted By: Orange Brat

Re: Miscolored Graphics - 09/06/04 10:09

Get it here. Install the runtime first...followed by the installer. The rest is optionally.

http://www2.arnes.si/~sopjsimo/gimp/stable.html
Posted By: Irish_Farmer

Re: Miscolored Graphics - 09/06/04 11:42

I owe you guys big time. Its working perfectly now. It must have just been something with either the file type or the way iDraw and paint saved. I think I'm going to use .pcx from now on.

One last quick question. What is the difference between .pcx and other file types. I know things like jpeg and gif are much smaller sized files, but at the cost of some of the image quality. So what exactly does .pcx do?

Once again, I appreciate your time and help.
Posted By: Anonymous

Re: Miscolored Graphics - 09/06/04 14:45

For TGA, TGA has a support for transparency called "alpha channel." For alpha channel, at 0 for red, 0 for green, and 0 for blue, when it's black, it's transparent. But at the gray of 255 (meaning 255 for red, 255 for green, 255 for blue), it's opaque. At 127, 127, 127, it's equalvilant to 50% transparency.

For example in PSP 8...

I create an image at a resolution of 1024x192, with the image transparent.

I create a new layer, which is going to be a background layer.

I make a background image for the layer, then create a new layer for the window.

I create an image for the window, cutout the middle of the window, then I select the background layer.

I create a mask layer (for the alpha channel) then save the image as an alpha channel.

For the background layer, I select the mask layer, then create a gradient from white to black and fill the image with gradient.

When finished, I save the image as a TGA file with all the layers flattened, then I load the image via C-Script to view the image with alpha channel.

Here's the website to try out PSP 8 (although you will need to use GIMP to save the image as TGA as PSP 8 didn't save the image as an alpha channel for TGA):

www.jasc.com
Posted By: Dan Silverman

Re: Miscolored Graphics - 09/06/04 16:53

There really isn't any difference between PCX and BMP file types as far as when these textures are running in the game. Memory consumption is computed by the pixel size of the file and the color depth. TGA files, if they are 32-bit TGAs, hold alpha transparency information. 24-bit TGA files do not.
Posted By: Irish_Farmer

Re: Miscolored Graphics - 09/07/04 03:51

That makes sense. All right, I'm all set and I fixed up all of my sprites in my game. Its finally moving along really quick and I'll have something to show in a few months. I owe you guys.
© 2024 lite-C Forums