Reflectivity in 3do-s
Moderators: MR.D, Moderators
Reflectivity in 3do-s
There are no separate glow and reflectivity textures for tatex, so how is this calculated? I found some related engine code, but if anyone knows and can explain it to me, I would be very grateful!
Re: Reflectivity in 3do-s
It uses the alpha channel of those tga's (the teamcolor is done via a special colorcode).
Re: Reflectivity in 3do-s
Thanks! Hasnt occured to me to look in alpha.
Does teamcolor have to do with the following:
Does teamcolor have to do with the following:
Code: Select all
typedef struct tagPrimitive
{
long ColorIndex;
long NumberOfVertexIndexes;
long Always_0;
long OffsetToVertexIndexArray;
long OffsetToTextureName;
long Unknown_1;
long Unknown_2;
long Unknown_3;
} Primitive;
/*
ColorIndex:
This is the index of a color in the TA color palette. For the color
palette, check out at the very end of this file for more detail, it
would take too much space to display here.
Ta palette :
Here is a struct containing the whole palette,
it's in C++, you can just drop it in your code
if that's what you're using, eles convert it
to you language using those values. PALETTEENTRY
is a windows.h object btw. You can access it like this :
(char)TAPalette[i].peRed;
(char)TAPalette[i].peGreen;
(char)TAPalette[i].peBlue;
(char)TAPalette[i].peFlags;
Here is the struct :
PALETTEENTRY TAPalette[256] = {
{0x00, 0x00, 0x00, 0x00},
{0x80, 0x00, 0x00, 0x00},
{0x00, 0x80, 0x00, 0x00},
{0x80, 0x80, 0x00, 0x00},
{0x00, 0x00, 0x80, 0x00},
{0x80, 0x00, 0x80, 0x00},
{0x00, 0x80, 0x80, 0x00},
{0x80, 0x80, 0x80, 0x00},...
Re: Reflectivity in 3do-s
I believe that the alpha channel is used for either reflectivity or team color if the image file is mentioned in teamtex.txt
http://springrts.com/wiki/Units:Textures
http://springrts.com/wiki/Units:Textures
Re: Reflectivity in 3do-s
Thanks very much!
Igor, bring the plans....
Igor, bring the plans....
Re: Reflectivity in 3do-s
The wiki is incorrect.rattle wrote:I believe that the alpha channel is used for either reflectivity or team color if the image file is mentioned in teamtex.txt
http://springrts.com/wiki/Units:Textures
I made a lot teamcolored 3do textures which also had reflections! The teamcolor is calculated by a purple color code, means if green-channel is equal 0 and the red channel is equal to the blue channel then it is a teamcolored texel.
PS: the wiki says correctly how the teamcolor code works, but it also says that teamcolored textures can't contain reflections, what is incorrect.
Re: Reflectivity in 3do-s
fun fact: I halped convert all the old ota textures to purple.
- CarRepairer
- Cursed Zero-K Developer
- Posts: 3359
- Joined: 07 Nov 2007, 21:48
Re: Reflectivity in 3do-s
jK wrote:purple color code

Re: Reflectivity in 3do-s
Thanks guys! Anyone got a more or less complete tatex replacement?
-
- Posts: 916
- Joined: 27 Jun 2009, 01:32
Re: Reflectivity in 3do-s
Get CA and look at the tatex folder...
Re: Reflectivity in 3do-s
Thanks, so all the texes in tatex_gpl are 3rd party (non ota) stuff?