Author Topic: Introducing: Team Colors  (Read 22244 times)

0 Members and 1 Guest are viewing this topic.

Offline Zacam

  • Magnificent Bastard
  • Administrator
  • 211
  • I go Sledge-O-Matic on Spammers
    • Steam
    • Twitter
    • ModDB Feature
Re: Introducing: Team Colors
Technically, the feature can exists with BOTH options available to it simultaneously (with a little modification).

Simply allow the specification (to either the colors.tbl or mod.tbl or whatever) to define the "Team Color Read From:" to allow either "-normal" or "-misc" maps.

Course, if you go about mixing the two, then that could be a problem unless we really want the flexibility to define on a per declaration as well as a universal.

I only bring this up because I think it possible that the intended requesting mod for this feature may have already gone and created all their content based on how it is already implemented, namely in the normal map unused channels. And it would be utterly unfair to force them into the same amount of work that we ourselves don't want to do, which is to port all that work to yet another map.

I just can not agree to sticking it into the normal map channels and calling it a day and marking the feature as complete.
Report MediaVP issues, now on the MediaVP Mantis! Read all about it Here!
Talk with the community on Discord
"If you can keep a level head in all this confusion, you just don't understand the situation"

¤[D+¬>

[08/01 16:53:11] <sigtau> EveningTea: I have decided that I am a 32-bit registerkin.  Pronouns are eax, ebx, ecx, edx.
[08/01 16:53:31] <EveningTea> dhauidahh
[08/01 16:53:32] <EveningTea> sak
[08/01 16:53:40] * EveningTea froths at the mouth
[08/01 16:53:40] <sigtau> i broke him, boys

 

Offline The E

  • He's Ebeneezer Goode
  • Moderator
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Re: Introducing: Team Colors
Once I'm done with my current Mass Effect-related break, I'll do a new version of this that should adress these things.

As for the work required, at the moment, that isn't much. Copying channels out of an existing map and into a new one isn't that hard.
If I'm just aching this can't go on
I came from chasing dreams to feel alone
There must be changes, miss to feel strong
I really need lifе to touch me
--Evergrey, Where August Mourns

 

Offline pecenipicek

  • Roast Chicken
  • 211
  • Powered by copious amounts of coffee and nicotine
    • Skype
    • Steam
    • Twitter
    • PeceniPicek's own deviantart page
Re: Introducing: Team Colors
Technically, the feature can exists with BOTH options available to it simultaneously (with a little modification).

Simply allow the specification (to either the colors.tbl or mod.tbl or whatever) to define the "Team Color Read From:" to allow either "-normal" or "-misc" maps.

Course, if you go about mixing the two, then that could be a problem unless we really want the flexibility to define on a per declaration as well as a universal.

I only bring this up because I think it possible that the intended requesting mod for this feature may have already gone and created all their content based on how it is already implemented, namely in the normal map unused channels. And it would be utterly unfair to force them into the same amount of work that we ourselves don't want to do, which is to port all that work to yet another map.

I just can not agree to sticking it into the normal map channels and calling it a day and marking the feature as complete.

As far as TAP assets go, dont worry about our stuff. I can always change the textures in a matter of 2 hours of work tops.
Skype: vrganjko
Ho, ho, ho, to the bottle I go
to heal my heart and drown my woe!
Rain may fall and wind may blow,
and many miles be still to go,
but under a tall tree I will lie!

The Apocalypse Project needs YOU! - recruiting info thread.

 

Offline pecenipicek

  • Roast Chicken
  • 211
  • Powered by copious amounts of coffee and nicotine
    • Skype
    • Steam
    • Twitter
    • PeceniPicek's own deviantart page
Re: Introducing: Team Colors
As of commit 9058 to the svn, this feature is in trunk. You still will need to modify your shaders to benefit from it and the default implementation on the first page uses the red and blue channels of the normal map.

But, in other news, the -misc texture has been added to the engine a while back as well, so you can have the shader pull up data from there instead of having to resave all of your normal maps and such.

Just a heads up to anyone marginally interested.

Skype: vrganjko
Ho, ho, ho, to the bottle I go
to heal my heart and drown my woe!
Rain may fall and wind may blow,
and many miles be still to go,
but under a tall tree I will lie!

The Apocalypse Project needs YOU! - recruiting info thread.

 

Offline mjn.mixael

  • Cutscene Master
  • 212
  • Chopped liver
    • Steam
    • Twitter
Re: Introducing: Team Colors
I'm interested, I just don't have the ability to modify shaders... :(

Nor do I want to bother with as many shader changes that are going on recently.
Cutscene Upgrade Project - Mainhall Remakes - Between the Ashes
Youtube Channel - P3D Model Box
Between the Ashes is looking for committed testers, PM me for details.
Freespace Upgrade Project See what's happening.

 

Offline pecenipicek

  • Roast Chicken
  • 211
  • Powered by copious amounts of coffee and nicotine
    • Skype
    • Steam
    • Twitter
    • PeceniPicek's own deviantart page
Re: Introducing: Team Colors
I'm interested, I just don't have the ability to modify shaders... :(

Nor do I want to bother with as many shader changes that are going on recently.
grab either me or the e on irc for a quick walkthrough to modify the shaders for -misc texture useage.
Skype: vrganjko
Ho, ho, ho, to the bottle I go
to heal my heart and drown my woe!
Rain may fall and wind may blow,
and many miles be still to go,
but under a tall tree I will lie!

The Apocalypse Project needs YOU! - recruiting info thread.

 

Offline pecenipicek

  • Roast Chicken
  • 211
  • Powered by copious amounts of coffee and nicotine
    • Skype
    • Steam
    • Twitter
    • PeceniPicek's own deviantart page
Re: Introducing: Team Colors
Okay, a simple and easy way to get team colors in your mod is as follows:

Open your colors.tbl
If it doesnt exist, create it.
Copy-paste the following and then edit to your hearts content. You are not restricted to a single team color entry. Just make sure that the general structure is kept.

Code: [Select]
#Start Colors
;Because of the way the colors.tbl parser is set up, this section MUST be present, even if it is empty
#End

#Team Colors

$Team Name: Vaygr
   $Team Stripe Color: ( 10 240 10 )
   $Team Base Color: ( 240 10 10 )

#End

Next, to actually apply a team color to a ship, you must do two things.

First, to actually even apply any sort of color to a ship, you need to either edit a ships ship.tbl entry and then, after that you can assign it custom team colors via FRED, in the ship editor, initial status.

For the default ship table entry, open your ships.tbl, find the "$Detail Distance:" entry and put the following immediately after it.
if you just want to enable team colors for the specified ship:
Code: [Select]
$Default Team: NoneIf you want to enable a particular team:
Code: [Select]
$Default Team: <Team name as defined in colors.tbl>
Example table excerpt from TAP:
Code: [Select]
...
$POF file: VGR_Destroyer.pof
$Detail distance: (0)
$Default Team: Vaygr
$Show damage: YES
$Density: 1
$Damp: 0.4
...

The last step is to create the neccesary "masks", or areas where the colors will be applied on a ship. this can be done via a texture with the -misc suffix. The red channel equates to what will be applied as the "base" color, and the green channel will be the "stripe". Think of it as an alpha channel for the color being applied, with 0 being no color applied and 255 full color applied at that spot.

If all goes well, you should have a model ingame with the colors applied.

One of the things to note is that if you are using a mod with some shaders tucked in a vp somewhere, chances are, its going to override the built-in shaders in the engine. in that case, drop this into your mods effects folder.
Code: (main-f.sdr as in r9076) [Select]
#ifdef FLAG_LIGHT
uniform int n_lights;
#endif
#ifdef FLAG_DIFFUSE_MAP
uniform sampler2D sBasemap;
#endif
#ifdef FLAG_GLOW_MAP
uniform sampler2D sGlowmap;
#endif
#ifdef FLAG_SPEC_MAP
uniform sampler2D sSpecmap;
#endif
#ifdef FLAG_ENV_MAP
uniform samplerCube sEnvmap;
uniform bool alpha_spec;
varying vec3 envReflect;
#endif
#ifdef FLAG_NORMAL_MAP
uniform sampler2D sNormalmap;
varying mat3 tbnMatrix;
#endif
#ifdef FLAG_FOG
varying float fogDist;
#endif
#ifdef FLAG_ANIMATED
uniform sampler2D sFramebuffer;
uniform int effect_num;
uniform float anim_timer;
uniform float vpwidth;
uniform float vpheight;
#endif
#ifdef FLAG_TEAMCOLOR
uniform vec3 base_color;
uniform vec3 stripe_color;
vec2 teamMask = vec2(0.0, 0.0);
#endif
#ifdef FLAG_MISC_MAP
uniform sampler2D sMiscmap;
#endif
varying vec4 position;
varying vec3 lNormal;
#if SHADER_MODEL == 2
  #define MAX_LIGHTS 2
#else
  #define MAX_LIGHTS 8
#endif
#define SPEC_INTENSITY_POINT 5.3 // Point light
#define SPEC_INTENSITY_DIRECTIONAL 3.0 // Directional light
#define SPECULAR_FACTOR 1.75
#define SPECULAR_ALPHA 0.1
#define SPEC_FACTOR_NO_SPEC_MAP 0.6
#define ENV_ALPHA_FACTOR 0.3
#define GLOW_MAP_INTENSITY 1.5
#define AMBIENT_LIGHT_BOOST 1.0
void main()
{
vec3 eyeDir = vec3(normalize(-position).xyz); // Camera is at (0,0,0) in ModelView space
vec4 lightAmbientDiffuse = vec4(0.0, 0.0, 0.0, 1.0);
vec4 lightDiffuse = vec4(0.0, 0.0, 0.0, 1.0);
vec4 lightAmbient = vec4(0.0, 0.0, 0.0, 1.0);
vec4 lightSpecular = vec4(0.0, 0.0, 0.0, 1.0);
vec2 texCoord = gl_TexCoord[0].xy;
 #ifdef FLAG_SPEC_MAP
vec4 specColour = texture2D(sSpecmap, texCoord);
 #endif
 #ifdef FLAG_MISC_MAP
   #ifdef FLAG_TEAMCOLOR
    vec2 teamMask = vec2(0.0, 0.0);
    teamMask = texture2D(sMiscmap, texCoord).rg;
   #endif
 #endif
 #ifdef FLAG_LIGHT
  #ifdef FLAG_NORMAL_MAP
// Normal map - convert from DXT5nm
vec3 normal;
normal.rg = (texture2D(sNormalmap, texCoord).ag * 2.0) - 1.0;
   #ifdef FLAG_ENV_MAP
vec3 envOffset = vec3(0.0);
envOffset.xy = normal.xy;
vec3 envReflectNM = envReflect + envOffset;
vec4 envColour = textureCube(sEnvmap, envReflectNM);
   #endif
normal.b = sqrt(1.0 - dot(normal.rg, normal.rg));
normal = tbnMatrix * normal;
float norm = length(normal);
// prevent breaking of normal maps
if (length(normal) > 0.0)
normal /= norm ;
else
normal = tbnMatrix * vec3(0.0, 0.0, 1.0);
  #else
vec3 normal = lNormal;
   #ifdef FLAG_ENV_MAP
vec4 envColour = textureCube(sEnvmap, envReflect);
   #endif
  #endif
vec3 lightDir;
lightAmbient = gl_FrontMaterial.emission + (gl_LightModel.ambient * gl_FrontMaterial.ambient);
float dist;
#pragma optionNV unroll all
for (int i = 0; i < MAX_LIGHTS; ++i) {
  #if SHADER_MODEL > 2
if (i > n_lights)
break;
  #endif
float specularIntensity = 1.0;
float attenuation = 1.0;
// Attenuation and light direction
  #if SHADER_MODEL > 2
if (gl_LightSource[i].position.w == 1.0) {
  #else
if (gl_LightSource[i].position.w == 1.0 && i != 0) {
  #endif
// Positional light source
dist = distance(gl_LightSource[i].position.xyz, position.xyz);
lightDir = (gl_LightSource[i].position.xyz - position.xyz);
  #if SHADER_MODEL > 2
if (gl_LightSource[i].spotCutoff < 91.0) {  // Tube light
float beamlength = length(gl_LightSource[i].spotDirection);
vec3 beamDir = normalize(gl_LightSource[i].spotDirection);
// Get nearest point on line
float neardist = dot(position.xyz - gl_LightSource[i].position.xyz , beamDir);
// Move back from the endpoint of the beam along the beam by the distance we calculated
vec3 nearest = gl_LightSource[i].position.xyz - beamDir * abs(neardist);
lightDir = nearest - position.xyz;
dist = length(lightDir);
}
  #endif
lightDir = normalize(lightDir);
attenuation = 1.0 / (gl_LightSource[i].constantAttenuation + (gl_LightSource[i].linearAttenuation * dist) + (gl_LightSource[i].quadraticAttenuation * dist * dist));
specularIntensity = SPEC_INTENSITY_POINT;
} else {
// Directional light source
lightDir = normalize(gl_LightSource[i].position.xyz);
specularIntensity = SPEC_INTENSITY_DIRECTIONAL;
}
vec3 half_vec = normalize(lightDir + eyeDir);
// Ambient and Diffuse
lightAmbient += (gl_FrontLightProduct[i].ambient * attenuation);
lightDiffuse += (gl_FrontLightProduct[i].diffuse * (max(dot(normal, lightDir), 0.0)) * attenuation);
// Specular
float NdotHV = clamp(dot(normal, half_vec), 0.0, 1.0);
lightSpecular += ((gl_FrontLightProduct[i].specular * pow(NdotHV, gl_FrontMaterial.shininess)) * attenuation) * specularIntensity;
}
lightAmbientDiffuse = lightAmbient + lightDiffuse;
 #else
lightAmbientDiffuse = gl_Color;
lightSpecular = gl_SecondaryColor;
 #endif
 #ifdef FLAG_ANIMATED
vec2 distort = vec2(cos(position.x*position.w*0.005+anim_timer*20.0)*sin(position.y*position.w*0.005),sin(position.x*position.w*0.005+anim_timer*20.0)*cos(position.y*position.w*0.005))*0.03;
 #endif
 // Base color
 #ifdef FLAG_DIFFUSE_MAP
  #ifdef FLAG_ANIMATED
vec4 baseColor;
if (effect_num == 2) {
baseColor = texture2D(sBasemap, texCoord + distort*(1.0-anim_timer));
} else {
baseColor = texture2D(sBasemap, texCoord);
}
  #else
vec4 baseColor = texture2D(sBasemap, texCoord);
  #endif
 #else
vec4 baseColor = gl_Color;
 #endif
  #ifdef FLAG_TEAMCOLOR
vec3 base = base_color - vec3(0.5);
vec3 stripe = stripe_color - vec3(0.5);
baseColor.rgb += (base * teamMask.x) + (stripe * teamMask.y);
  #endif
vec4 fragmentColor;
fragmentColor.rgb = baseColor.rgb * max(lightAmbientDiffuse.rgb * AMBIENT_LIGHT_BOOST, gl_LightModel.ambient.rgb - 0.425);
fragmentColor.a = baseColor.a;
 // Spec color
 #ifdef FLAG_SPEC_MAP
fragmentColor.rgb += lightSpecular.rgb * (specColour.rgb * SPECULAR_FACTOR);
fragmentColor.a += (dot(lightSpecular.a, lightSpecular.a) * SPECULAR_ALPHA);
 #else
fragmentColor.rgb += lightSpecular.rgb * (baseColor.rgb * SPEC_FACTOR_NO_SPEC_MAP);
 #endif
 // Env color
 #ifdef FLAG_ENV_MAP
vec3 envIntensity = (alpha_spec) ? vec3(specColour.a) : specColour.rgb;
fragmentColor.a += (dot(envColour.rgb, envColour.rgb) * ENV_ALPHA_FACTOR);
fragmentColor.rgb += envColour.rgb * envIntensity;
 #endif
 // Glow color
 #ifdef FLAG_GLOW_MAP
fragmentColor.rgb += texture2D(sGlowmap, texCoord).rgb * GLOW_MAP_INTENSITY;
 #endif
 #ifdef FLAG_FOG
fragmentColor.rgb = mix(fragmentColor.rgb, gl_Fog.color.rgb, fogDist);
 #endif
 #ifdef FLAG_ANIMATED
if (effect_num == 0) {
float shinefactor = 1.0/(1.0 + pow((fract(abs(gl_TexCoord[0].x))-anim_timer) * 1000.0, 2.0)) * 1000.0;
gl_FragColor.rgb = fragmentColor.rgb + vec3(shinefactor);
gl_FragColor.a = fragmentColor.a * clamp(shinefactor * (fract(abs(gl_TexCoord[0].x))-anim_timer) * -10000.0,0.0,1.0);
}
if (effect_num == 1) {
float shinefactor = 1.0/(1.0 + pow((position.y-anim_timer), 2.0));
gl_FragColor.rgb = fragmentColor.rgb + vec3(shinefactor);
#ifdef FLAG_LIGHT
gl_FragColor.a = fragmentColor.a;
#else
// ATI Wireframe fix *grumble*
gl_FragColor.a = clamp((position.y-anim_timer) * 10000.0,0.0,1.0);
#endif
}
if (effect_num == 2) {
vec2 screenPos = gl_FragCoord.xy * vec2(vpwidth,vpheight);
gl_FragColor.a = fragmentColor.a;
float cloak_interp = (sin(position.x*position.w*0.005+anim_timer*20.0)*sin(position.y*position.w*0.005)*0.5)-0.5;
#ifdef FLAG_LIGHT
gl_FragColor.rgb = mix(texture2D(sFramebuffer, screenPos + distort*anim_timer + anim_timer*0.1*normal.xy).rgb,fragmentColor.rgb,clamp(cloak_interp+anim_timer*2.0,0.0,1.0));
#else
gl_FragColor.rgb = mix(texture2D(sFramebuffer, screenPos + distort*anim_timer + anim_timer*0.1*lNormal.xy).rgb,fragmentColor.rgb,clamp(cloak_interp+anim_timer*2.0,0.0,1.0));
#endif
}
 #else
gl_FragColor = fragmentColor;
 #endif
}


If you are unclear on the idea still, please do say so, and i will try to help.


[edit]Also, as of now, there is some sorta bug that makes it not work at all, i have no idea why, so this will have to wait for a smidge of coder review -- Bug squashed, commited as of r9076.
[edit]mentioned the neccesity of at least $Default Team: None entry.
« Last Edit: July 31, 2012, 01:57:21 pm by pecenipicek »
Skype: vrganjko
Ho, ho, ho, to the bottle I go
to heal my heart and drown my woe!
Rain may fall and wind may blow,
and many miles be still to go,
but under a tall tree I will lie!

The Apocalypse Project needs YOU! - recruiting info thread.

 

Offline z64555

  • 210
  • Self-proclaimed controls expert
    • Steam
Re: Introducing: Team Colors
Updated wiki to match the format of the rest of the tables. :P

Did see a note somewhere that at least one $<Color> had to be defined, but as far as I can tell by looking at the .cpp this isn't the case?
Secure the Source, Contain the Code, Protect the Project
chief1983

------------
funtapaz: Hunchon University biologists prove mankind is evolving to new, higher form of life, known as Homopithecus Juche.
z64555: s/J/Do
BotenAlfred: <funtapaz> Hunchon University biologists prove mankind is evolving to new, higher form of life, known as Homopithecus Douche.

 

Offline The E

  • He's Ebeneezer Goode
  • Moderator
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Re: Introducing: Team Colors
Not anymore, anyway
If I'm just aching this can't go on
I came from chasing dreams to feel alone
There must be changes, miss to feel strong
I really need lifе to touch me
--Evergrey, Where August Mourns

 

Offline pecenipicek

  • Roast Chicken
  • 211
  • Powered by copious amounts of coffee and nicotine
    • Skype
    • Steam
    • Twitter
    • PeceniPicek's own deviantart page
Re: Introducing: Team Colors
Updated wiki to match the format of the rest of the tables. :P
Thanks :)
Btw, where would be a good place to punt a link to the guide for team colors i made above?
Skype: vrganjko
Ho, ho, ho, to the bottle I go
to heal my heart and drown my woe!
Rain may fall and wind may blow,
and many miles be still to go,
but under a tall tree I will lie!

The Apocalypse Project needs YOU! - recruiting info thread.

 

Offline mjn.mixael

  • Cutscene Master
  • 212
  • Chopped liver
    • Steam
    • Twitter
Re: Introducing: Team Colors
Best thing to do, IMO, is to copy the whole guide onto a wiki page... Then you can link to it from the modding forum (tutorials thread) as well as linking to it in the colors.tbl and ships.tbl Wiki pages when the 'Team' stuff is mentioned.
Cutscene Upgrade Project - Mainhall Remakes - Between the Ashes
Youtube Channel - P3D Model Box
Between the Ashes is looking for committed testers, PM me for details.
Freespace Upgrade Project See what's happening.

 

Offline mjn.mixael

  • Cutscene Master
  • 212
  • Chopped liver
    • Steam
    • Twitter
Re: Introducing: Team Colors
 :bump:

Actually working on Team Colors these days. This is something I've found myself wanting just for ease of modding. Consider this a take it or leave it suggestion.

But I've found myself wishing I could rotate through the various Team Colors I've got setup in the Lab. The only way to view colors on any given ship is to set the default in ships.tbl, load FSO, view it, exit FSO, alter the default in ships.tbl... repeat. A scroll through would be mighty helpful. But it'd also only be helpful for the few times a modder actually needs that functionality, so the code time may not equal the benefit time.
Cutscene Upgrade Project - Mainhall Remakes - Between the Ashes
Youtube Channel - P3D Model Box
Between the Ashes is looking for committed testers, PM me for details.
Freespace Upgrade Project See what's happening.

 

Offline MatthTheGeek

  • Captain Obvious
  • 212
  • Frenchie McFrenchface
Re: Introducing: Team Colors
Given how messy the lab code already is and how few people actually use team colors...
People are stupid, therefore anything popular is at best suspicious.

Mod management tools     -     Wiki stuff!     -     Help us help you

666maslo666: Releasing a finished product is not a good thing! It is a modern fad.

SpardaSon21: it seems like you exist in a permanent state of half-joking misanthropy

Axem: when you put it like that, i sound like an insane person

bigchunk1: it's not retarded it's american!
bigchunk1: ...

batwota: steele's maneuvering for the coup de gras
MatthTheGeek: you mispelled grâce
Awaesaar: grace
batwota: oh right :P
Darius: ah!
Darius: yes, i like that
MatthTheGeek: the way you just spelled it it means fat
Awaesaar: +accent I forgot how to keyboard
MatthTheGeek: or grease
Darius: the killing fat!
Axem: jabba does the coup de gras
MatthTheGeek: XD
Axem: bring me solo and a cookie

 

Offline Dragon

  • Citation needed
  • 212
  • The sky is the limit.
Re: Introducing: Team Colors
Given how messy the lab code already is and how few people actually use team colors...
Coming from one of the people who do. :D
It's a good idea, definitely worth the time. This feature has the potential far beyond HW-style team colors, and I think it might see a lot of use.

 

Offline The E

  • He's Ebeneezer Goode
  • Moderator
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Re: Introducing: Team Colors
But I've found myself wishing I could rotate through the various Team Colors I've got setup in the Lab. The only way to view colors on any given ship is to set the default in ships.tbl, load FSO, view it, exit FSO, alter the default in ships.tbl... repeat. A scroll through would be mighty helpful. But it'd also only be helpful for the few times a modder actually needs that functionality, so the code time may not equal the benefit time.

The problem, at least as far as I can work it out, is that there's no "selection" type control in the lab UI code. So I think what I'm probably going to do will be a few boxes where you can enter RGB values directly.
If I'm just aching this can't go on
I came from chasing dreams to feel alone
There must be changes, miss to feel strong
I really need lifе to touch me
--Evergrey, Where August Mourns

 

Offline Dragon

  • Citation needed
  • 212
  • The sky is the limit.
Re: Introducing: Team Colors
The problem, at least as far as I can work it out, is that there's no "selection" type control in the lab UI code. So I think what I'm probably going to do will be a few boxes where you can enter RGB values directly.
Even better. Would that a be possible to make a button to dump those settings to a text file? That'd greatly speed up fine-tuning the colors.
Though I can see "Selection" of table presets being possible by having "next preset" and "previous preset" buttons that scroll through the table.

 
Re: Introducing: Team Colors
But I've found myself wishing I could rotate through the various Team Colors I've got setup in the Lab. The only way to view colors on any given ship is to set the default in ships.tbl, load FSO, view it, exit FSO, alter the default in ships.tbl... repeat. A scroll through would be mighty helpful. But it'd also only be helpful for the few times a modder actually needs that functionality, so the code time may not equal the benefit time.

The problem, at least as far as I can work it out, is that there's no "selection" type control in the lab UI code. So I think what I'm probably going to do will be a few boxes where you can enter RGB values directly.

You could use key input to rotate through the team colors similar to what it does for throttle settings or insignia switching without adding new interface parts - but a new box to input RGB values sounds lot more useful  :)
Here goes scripting and copy paste coding
Freespace RTS Mod
Checkpoint/Shipsaveload script

 

Offline Dragon

  • Citation needed
  • 212
  • The sky is the limit.
Re: Introducing: Team Colors
You could use key input to rotate through the team colors similar to what it does for throttle settings or insignia switching without adding new interface parts - but a new box to input RGB values sounds lot more useful  :)
Wait. You can control insignia and throttle in the lab? Since when, how and where is it documented? Is there any complete list of what you can do in the lab?

 

Offline redsniper

  • 211
  • Aim for the Top!
Re: Introducing: Team Colors
We're also going to need sexp control of team colors so that we can have color-cycling psychedelic disco ships. Thank you.
"Think about nice things not unhappy things.
The future makes happy, if you make it yourself.
No war; think about happy things."   -WouterSmitssm

Hard Light Productions:
"...this conversation is pointlessly confrontational."

 

Offline Dragon

  • Citation needed
  • 212
  • The sky is the limit.
Re: Introducing: Team Colors
Or HW style "instant repainting". That feature could also come in handy, especially if they could be defined on the fly.
Come to think of it. If it was possible to use SEXPs (or a LUA script) to cycle the R value in the team color setting, and to somehow apply the team color to the glowmap instead of diffuse, it could be possible to make a "cheap" animated glowmap. I don't know how well would that work in practice, but the possibilities are there.