Go
New
Find
Notify
Tools
Reply
  
-star Rating Rate It!  Login/Join 
Member
Picture of Paul Gausden
Posted
Apologies if this has been asked before , but I can't find it anywhere...

Exactly what material lighting factors (D, A, S, T) are used to obtain the appropriate vertex states in the S files? and which of the MSTS 3DS material names to they match ?

I have some code from the developers of [color=LimeGreen]TSM[/color] (!) that shows some correspondance of the numbers...
( -5 "normal" is missing )

<structure.  Here's a code snippet from 'TrainSim Modeler':

     if(csMat.Right(6).CompareNoCase("Bright"Wink == 0)
     {
           vtx_state.attrib = -8;
     } else if(csMat.Right(6).CompareNoCase("CrcFrm"Wink == 0)
     {
           vtx_state.attrib = -9;
     } else if(csMat.Right(6).CompareNoCase("DrkShd"Wink == 0)
     {
           vtx_state.attrib = -12;
     } else if(csMat.Right(7).CompareNoCase("HiShine"Wink == 0)
     {
           vtx_state.attrib = -7;
     } else if(csMat.Right(7).CompareNoCase("LoShine"Wink == 0)
     {
           vtx_state.attrib = -6;
     } else if(csMat.Right(6).CompareNoCase("HlfBrt"Wink == 0)
     {
           vtx_state.attrib = -11;
     }
>>

Regards

Paul
 
Posts: 1055 | Location: Surrey, UK | Registered: Fri November 07 2003Reply With QuoteEdit or Delete MessageReport This Post
Member
Posted Hide Post
As I understand it TSM just exports objects to 3DS and then calls CONV3DS to convert them to the S format. But I could be wrong.

I don't know what this particular code could mean. It could be used for some other purpose. Though it sure looks like the "vertex state" code.

There is an MSTS specific tutorial available in the online help that describes how to use materials with MSTS. As you know, I don't follow the "named materials" convention. I think that the tutorial covers everything that you would need to know.

The basics are:

Diffuse isn't used at all.

Ambient is used to to flip between "Bright" (100) "Half-Bright" (20) and "Dark" (0)

Translucent is used to turn on/off Translucency (vs transparency) and to indicate priority. 2 being high priority, 1 being normal priority (I only have two levels of prioity) and 0 being transparent.

Specular is used to turn on/off specularity. (remembering of course that if you turn off specularity suddenly everything is "bright" at night).

Richard
 
Posts: 2378 | Registered: Fri November 07 2003Reply With QuoteEdit or Delete MessageReport This Post
 Previous Topic | Next Topic powered by eve community  
 


© Amabilis Software 2003-2007