View topic - Reflectivity in 3do-s



All times are UTC + 1 hour


Post new topic Reply to topic  [ 11 posts ] 
Author Message
 Post subject: Reflectivity in 3do-s
PostPosted: 26 Oct 2010, 08:51 
Moderator
User avatar

Joined: 26 Oct 2007, 15:21
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!


Top
 Offline Profile  
 
PostPosted: 26 Oct 2010, 18:17 
Spring Developer
User avatar

Joined: 28 Jun 2007, 06:30
It uses the alpha channel of those tga's (the teamcolor is done via a special colorcode).


Top
 Offline Profile  
 
PostPosted: 26 Oct 2010, 20:28 
Moderator
User avatar

Joined: 26 Oct 2007, 15:21
Thanks! Hasnt occured to me to look in alpha.
Does teamcolor have to do with the following:
Code:
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},...



Top
 Offline Profile  
 
PostPosted: 27 Oct 2010, 12:09 
Damned Developer
User avatar

Joined: 01 Jun 2006, 12:15
Location: Banned user for reason “Do not post pictures of people fucking cars”
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


Top
 Offline Profile  
 
PostPosted: 27 Oct 2010, 12:19 
Moderator
User avatar

Joined: 26 Oct 2007, 15:21
Thanks very much!
Igor, bring the plans....


Top
 Offline Profile  
 
PostPosted: 27 Oct 2010, 14:12 
Spring Developer
User avatar

Joined: 28 Jun 2007, 06:30
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.


Top
 Offline Profile  
 
PostPosted: 27 Oct 2010, 14:18 
Content Developer
User avatar

Joined: 13 Jan 2005, 00:46
Location: ModalitÃ
fun fact: I halped convert all the old ota textures to purple.


Top
 Offline Profile  
 
PostPosted: 27 Oct 2010, 17:43 
Cursed Zero-K Developer
User avatar

Joined: 07 Nov 2007, 21:48
Location: Horse
jK wrote:
purple color code

:?


Top
 Offline Profile  
 
PostPosted: 27 Oct 2010, 17:49 
Moderator
User avatar

Joined: 26 Oct 2007, 15:21
Thanks guys! Anyone got a more or less complete tatex replacement?


Top
 Offline Profile  
 
PostPosted: 27 Oct 2010, 18:29 

Joined: 27 Jun 2009, 00:32
Location: Germany
Get CA and look at the tatex folder...


Top
 Offline Profile  
 
PostPosted: 28 Oct 2010, 10:29 
Moderator
User avatar

Joined: 26 Oct 2007, 15:21
Thanks, so all the texes in tatex_gpl are 3rd party (non ota) stuff?


Top
 Offline Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: PicassoCT and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group

Site layout created by Roflcopter et al.