Community Forum

sky flickering in 4X Map sometimes - Help Needed

Forum Overview >> Editor

Created07.09.2015 22:41

Gaby Gaby (Unknown) 07.09.2015 22:54
Hi Emil

I have a new problem sometimes the sky flickers in FS2015 in my test mod 4x map and in giants editor 6.0.3 it is fine no problems, no errors in fs and gaints editor logs.

sky_day_night_4Fach i3D file
skyShader XML below:

<?xml version="1.0" encoding="UTF-8"?>

-<CustomShader version="3">


<Parameter type="float4" target="partScale" name="partScale"/>

<Parameter type="float4" target="rainScale" name="rainScale"/>



<Texture name="sunsetTexture"/>

<Texture name="nightTexture"/>

<Texture name="sunriseTexture"/>

<Texture name="rainTexture"/>


-<LodLevel subsequentPassForceMode="ignore" startDistance="0">


-<CodeInjection position="VS_END">

Out.position.z = Out.position.w;

-<CodeInjection position="SAMPLERS">

sampler2D sunsetTexture;
sampler2D nightTexture;
sampler2D sunriseTexture;
sampler2D rainTexture;

-<CodeInjection position="MATERIALINFO">

uniform float4 partScale;
uniform float4 rainScale;

-<CodeInjection position="EMISSIVE_FS">


float3 emissiveColorSunset = tex2D(sunsetTexture, In.vs.ALBEDOMAP_TEXCOORD).xyz;
float3 emissiveColorNight = tex2D(nightTexture, In.vs.ALBEDOMAP_TEXCOORD).xyz;
float3 emissiveColorSunrise = tex2D(sunriseTexture, In.vs.ALBEDOMAP_TEXCOORD).xyz;
float3 emissiveColorRain = tex2D(rainTexture, In.vs.ALBEDOMAP_TEXCOORD).xyz; =*partScale.x +*partScale.y +*partScale.z +*partScale.w + emissiveColorRain*rainScale.x;





Do I need to change anything above or in giants editor?

In attributes panel in GE, I've tried both with visibility on and off its fine in GE, with visibility on or off in the game when map loads its ok sometimes and not sometimes.

in sky_day_night_4Fach i3D file the scales values are x 1, y -1, z 1
do I need to change it to 2?.

One more question everytime I save my map in GE before I exit do I need to have the visibility unticked for the worldBound?

in GE I always have the visibility ticked for the sky and unticked for worldBound.



Gaby Gaby (Unknown) 08.09.2015 22:37
Anyone who help can me on my issue above?

Emil Drefers (Unknown) 11.09.2015 18:44

try to set the "clipdistance" for the sky - that might help?

The world bound sshould be invisible, otherwise you will see them in the game.


Michael Hudson (Unknown) 12.09.2015 23:34
Do you have the path set right for the sky in you map.lua file

the original looks like this self.environment = Environment:new(Utils.getFilename("$data/sky/sky_day_night.i3d", self.baseDirectory), true, 8, true, true);

If you have added a sky texture you need to point to where the sky.i3d file is, by taking the $data out, and inserting the correct path.

Note: Log in to post. Create a new account here.