My modding has pretty much stopped right now. http://forums.sinsofasolarempire.com/308807
http://www.xfire.com/profile/lostwld/
http://twitter.com/Lost_WLd
Published on April 15, 2008 By Lost_WLd In Sins Modding
Hi, I was wondering if anyone cracked this issue yet? I was hoping to add some Star Trek style shield effects to the mod I'm working on.

For illustration, this type of effect:


Comments
on Apr 16, 2008
Not that I know of. It seems hardcoded. Which is a strange decision on the part of the developers since modifying shield effects is probably on the top list of changes for many mods out there.
I tried fiddling with it, but nothing I change has any effect... if someone has a solution I would be interedted to hear it as well...
on Apr 16, 2008
on Apr 16, 2008
Have you tried changing these values, within the shield Mesh itself?

Diffuse ffffffff
Ambient ffffffff
Specular ffffffff
Emissive ffffffff
Glossiness 50.000000
on Apr 16, 2008
Well, the shield meshes are rendered transparent by the engine, and there is no transparency control on the mesh itself so I assume its hardcoded. The hex values, unless I am mistaken, mean that all those values are at "max" anyway, nor do they differ from the ordinary mesh values.

So far I tried assigning textures to shield meshes and changing the shield values in the player .entity files. I believe I also tried changing some of those values in the .mesh files, diffuse most likely. No result so far.
on Apr 16, 2008
How about the GS_Shield.fx pipeline effect?
on Apr 16, 2008
I think you found it.

Now I just need to get a grip on that code... but I am fairly sure that's where we need to look. That, and GS_ShieldImpact.fx
on Apr 16, 2008
I was able to modify the GS_ShieldImpact.fx so that the shield hit effects are more visible - right now the shields are really visible, allmost opaque when under heavy fire, and this can be adjusted at need.



You do that by adjusting the color.alpha value in the line (two of them):

oColor0.a = lerp( 0.1f, 0.f, dist/g_ExternalHitRadius);

just increase the first value - the above opacity was achieved by setting it to 0.8f

The problem is with adjusting the impact effect itself; it seems to be unrelated to any texture file, instead calling a procedural effect, or constants which are hardcoded (or unknown to me) - the prime suspects being the two texture calls:

texture g_TextureNoise3D;
texture g_TextureEnvironmentCube : Environment;

The effect is that the shield color is shiny - by adjusting the alpha to the extreme, it turned out the shield envelope has the same mirror finish as objects with maxed reflection. By altering the following line in the GetPixelColor procedure:

float4 color = environmentColor;

to

float4 color = g_GlowColor;

we enable the shield to glow with the color defined in the shield section of the player .entity file (Vasari, which I used for the template race for the Xin apparently have green shields):



All that remains is to find out how to change the impact effect itself.
on Apr 16, 2008
I was able to modify the GS_ShieldImpact.fx so that the shield hit effects are more visible - right now the shields are really visible, allmost opaque when under heavy fire, and this can be adjusted at need.


Great job ManSh00ter   

texture g_TextureNoise3D;
texture g_TextureEnvironmentCube : Environment;


It seems like impact effect use program-generated texture so if you find way to designate diffuse texture instead of generated one you`ll make it

Now what I really want is fix Particle_Additive.fx have non-linear scaling like in homeworld2 (this make improve bullet`s visibility in distance range dramatically)
on Apr 16, 2008
Nice work guys.
on Apr 18, 2008
VERY nice work. You seemed to accomplish the impossible!

DANMAN
on May 14, 2008
Has anyone figured out how to use custom textures for the shield hit effect?
on May 14, 2008
there is a shield impact texture thats used. You might be able to modify it with the texture of your choice and brighten up the alpha channel. I'll have to do some experiments myself. This was something i was also going to later on down the line for our mod.
on May 15, 2008
I haven't noticed any such texture. What is the file called?
on Sep 20, 2008

Sorry for the necro, but does this work the same for both Nvidia and ATI users? because some pipeline effects if you adjust down it will lighten for Nvidia users and darken (just the opposite) for ATI users.

Regardless this is good to know info