Jump to content

Invisible Color


Yellowkey
 Share

Recommended Posts

Does any body how the game decides what colors are invisible. For Example "World/Shared/A000_piping.bmp" has a dark yellow color that is invisible in game, but "World/Shared/A000_rails2.bmp" uses a light gray for this. All the textures don't have an alpha channel and they use different colors (even different color indices).

Link to comment
Share on other sites

Probably some of the colors got combined automatically. Cause I heard that when some colors get combined with each other they turn invisible. I'm not saying it's possible i've just heard it. 

Link to comment
Share on other sites

I know nothing of how Rock Raiders works, but I'm assuming that the .exe or another file contains what the transparent colour is for each texture.

Either that, or the images are paletted and the game uses a certain palette slot to be the transparent colour.

Link to comment
Share on other sites

Unfortunately, I haven't been able to figure out how LRR determines which colours are supposed to be transparent. The closest thing I've been able to do is create transparent particle effects which works by treating pure black (000,000,000) as fully transparent, pure white (255,255,255) as fully opaque, and everything else inbetween partially transparent. Then, in the Surface Editor in Lightwave Modeler, you have to go to the Advanced tab and set Additive Transparency to 100%.

 

That won't work for what you're trying to do. There's probably a variable in the LWO files that tells the game which color should be transparent. I'm going to guess it just looks at the index number in the texture. I can help you test this if you want. Too bad you're getting my help anyways.

 

I'm choosing the Slimy Slug's eye for this example. Please open your textbooks to Data/Creatures/Slug/A014_SlugEye.BMP

 

I know the transparent colour for the slug's eye is 14 from previous research. Let's mess with it a bit and see if the game looks at the index or at just the color. Here I moved index 14 to 240 just to get it out of the way. 14 is now some shade of orange.

 

Spoiler

large.SlugTrans240.png.d872592dc599f1366

 

Now I moved 0 (which is white) to 14 and changed the green background to white to see if I could force that to be transparent.

 

Spoiler

large.SlugTrans14White.png.c0f91338968cd

 

It worked! Great. Let's look at the model, which is Slug_Eye.lwo in the same folder. We'll open it with a hex editor (I use XVI32) and look for instances of 14.

 

Oddly enough, the only instance I found was in the filename: A014_SlugEye.BMP

This is really interesting. There are other textures that start with A###, but most of them start with A000. I think that this specifies the alpha index. To test, I looked at a few other textures, like A068_LightX and A227_headtop2, and guess what? The index in the file name always matches the index of the background colour. I can further test this by making some new models and textures and seeing if this hypothesis holds up, but that will have to be later.

  • Like 7
Link to comment
Share on other sites

Thanks Cirevam. That's great. I've compared it with the colors I had manually looked up before and 60 files say you are right.

  • Like 2
Link to comment
Share on other sites

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.