Engine Exhuast colour control?

Has anyone been able to find a way to change the engine exhaust colour from being tied to the empire colour? Exhust colour is something that I would like to control on a per particle basis. It also seems kind of redundant for the use of identification of ownership since the ship is covered in big obvious stripes and can have a massive icon above it so its not like the engine colour is nessesary.
11,921 views 16 replies
Reply #1 Top
I was wondering this as well. I reckon it should be a configurable option in the 1.1 update. Ironclad, make it happen! :LOL:
Reply #2 Top
Looks totaly hardcoded then? I was looking around in the .fx but that just gives it the white glow.

Me wants the hardcoding removed. :( (or a work around).
Reply #3 Top
You have to redo the particle file, and remove the GSExhaust rendering effects. This should make it a blank slate, and then you can put in whatever color you want.

Hope this helps!

DANMAN
Reply #4 Top
Not sure that works, Danman. I could be wrong since it was a while since I messed with exhaust, but I am pretty sure I tried changing the pipeline effect from GS_Exhaust to Particle_Additive and it did not work.
Reply #5 Top
The color0 seems to have the colour before it gets to the that file I think. I removed all the changes and it was just a solid colour but the colour was still the team colour.
Reply #6 Top
I take it the engine dosn't support more of the .fx files than is included in the game?

(I tried adding one and put used it in a particle (by hand) and it crashed, said it failed to enumerate which I guess means they are hardcoded to only use those files)
Reply #7 Top
I believe the exhaust coloring is currently hardcoded, since the engine does not respond to the change of pipeline effects. This also voids any need to try and modify the GS_Exhaust.fx file itself.
And yes, I do not think you can write your own custom shaders and pipeline effects. That would be seriously cool to be able to do, since I know other games which allow modders to do this kind of work (often with very interesting results), but alas here this isn't the case it seems.
Reply #8 Top
You can hard code the exhuast colour in the shader file, but I can't have more than one exhaust file like you say :(.
Reply #9 Top
The thing is, I don't believe you can change the exhaust shader to remove the team coloring, since changing the shader itself in the Particle Forge yields no effect. That means the coloring is done outside of the shader system (as far as I understand how the engine works).
Reply #10 Top
Yeah, from my testing, the code in the engine must assign the colour to the team colour and then calls stuff from the shader or however that works. The shader has the final word on the colour though.

The COLOR0 in value (in the format Red, Green, Blue, Alpha) is set to team colour, you can just tell the out value some other range like '0, 0, 1' and it will work (did for me, I had fixed colour exhusts while cycling the team colour in dev.exe).

The problem for me is that I want a colour per faction because that looks better (see Freespace1/2 for example of doing this right) and I can have either 1 colour or the team colour at the moment. Oh well.

Reply #11 Top
Yeah, I fixed it (hopefully). :p

You have to disable the first render pass in the GS_Exhaust.fx file:

shared float4x4 g_ViewProjection : ViewProjection;

texture g_TextureDiffuse0 : Diffuse;
texture g_TextureDiffuse1 : Diffuse;
float colorMultiplier = 1.f;

void RenderSceneFirstPassVS(
float3 iPosition : POSITION,
float4 iColor0 : COLOR0,
float2 iTexCoord0 : TEXCOORD0,
out float4 oPosition : POSITION,
out float4 oColor0 : COLOR0,
out float2 oTexCoord0 : TEXCOORD0)
{
oPosition = mul(float4(iPosition, 1), g_ViewProjection);
oColor0 = float4(iColor0.rgb * colorMultiplier, iColor0.a);
oTexCoord0 = iTexCoord0;
}

void RenderSceneSecondPassVS( -->CHANGE TO void RenderSceneVS
float3 iPosition : POSITION,
float4 iColor0 : COLOR0,
float2 iTexCoord0 : TEXCOORD0,
out float4 oPosition : POSITION,
out float4 oColor0 : COLOR0,
out float2 oTexCoord0 : TEXCOORD0)
{
oPosition = mul(float4(iPosition, 1), g_ViewProjection);
float c = colorMultiplier;
oColor0 = float4(c, c, c, iColor0[3]);
oTexCoord0 = iTexCoord0;
}

technique RenderWithoutPixelShader
{
pass Pass0
{
VertexShader = compile vs_1_1 RenderSceneFirstPassVS();-->CHANGE TO RenderSceneVS()
PixelShader = NULL;
ZWriteEnable = false;
AlphaTestEnable = false;
AlphaBlendEnable = true;
SrcBlend = SRCALPHA;
DestBlend = ONE;
Texture[0] =
Reply #12 Top
Sorry but that dosn't work ><.

All that does it set it to white. Notice at the start it defines 1 (in this case meaning 100% I guess), later it assigns that to c and then puts the RBG value all in as c.

If you put in values where it uses c (0 to 1 meaning 0% to 100% so 0.567f is 56.7% I think) you will make colours.

The COLOR0 is still set to the team colour (you can check by adding chanign "oColor0 = float4(c, c, c, iColor0[3]);" to "oColor0 = iColor0;".


I think we need a dev to give us a flag option to turn on/off team colour exhausts.
Reply #13 Top
Bugger. I was afraid of that. Ah well, that's what testing is for. ;)

I played with the shaders today some more, but to no effect. If its possible to make the shader pick up the color of the particle texture, I don't know how to do it.
Reply #14 Top
I didn't realise how many effects are run thorugh gs_exhaust.fx. Flairs, muzzel effects and some others. All it really did was put a white core on the standard effect.

That seems rather... hackish. And all I need is the ability to set the exhuast colours per ship. :(
Reply #15 Top
Yeah this is what I discovered when trying to mod the shaders too, you can change them sure but you can't change how the game engine uses them outside of the particle system -entity files and thats the real killer.

I can see why IC and SD did it, they had a game to get out and limited resources it shouldn't be too hard to revisit for the expansion if its on their radar.
Reply #16 Top
Yes, I have tried, and to no avail. Sorry my advice did not work. I hope you get this, because it would be great to have a colored exhaust that does not change.

Maybe 1.1 will fix this...

DANMAN