Reflectivity in 3do-s

Reflectivity in 3do-s

Share and discuss visual creations and creation practices like texturing, modelling and musing on the meaning of life.

Moderators: MR.D, Moderators

Post Reply
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Reflectivity in 3do-s

Post by Beherith »

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!
User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Re: Reflectivity in 3do-s

Post by jK »

It uses the alpha channel of those tga's (the teamcolor is done via a special colorcode).
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: Reflectivity in 3do-s

Post by Beherith »

Thanks! Hasnt occured to me to look in alpha.
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},...

User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Re: Reflectivity in 3do-s

Post by rattle »

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
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: Reflectivity in 3do-s

Post by Beherith »

Thanks very much!
Igor, bring the plans....
User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Re: Reflectivity in 3do-s

Post by jK »

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
The wiki is incorrect.
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.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Reflectivity in 3do-s

Post by smoth »

fun fact: I halped convert all the old ota textures to purple.
User avatar
CarRepairer
Cursed Zero-K Developer
Posts: 3359
Joined: 07 Nov 2007, 21:48

Re: Reflectivity in 3do-s

Post by CarRepairer »

jK wrote:purple color code
:?
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: Reflectivity in 3do-s

Post by Beherith »

Thanks guys! Anyone got a more or less complete tatex replacement?
Master-Athmos
Posts: 916
Joined: 27 Jun 2009, 01:32

Re: Reflectivity in 3do-s

Post by Master-Athmos »

Get CA and look at the tatex folder...
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: Reflectivity in 3do-s

Post by Beherith »

Thanks, so all the texes in tatex_gpl are 3rd party (non ota) stuff?
Post Reply

Return to “Art & Modelling”