Community Forum

Enlarge the "SKYBOX"

Forum Overview >> Editor

CategoryEditor
Created12.01.2011 19:36


Robert Smith (Unknown) 12.01.2011 19:47
Is it possable to enlarge the sky box? I have a layout for a 4096x4096 map but the skybox seems to be limited to 2130x2130. Is it possible to edit it with the editor or possibly to write a script to expand it's size?

Stefan Geiger - GIANTS Software 13.01.2011 09:15
You can load just any sky box in your map.

The line
self.environment = Environment:new("data/sky/sky_day_night.i3d", true, 8, true, true);
or similar specifies the i3d file of the sky box. Just copy the existing sky box to your mod and scale it.

Robert Smith (Unknown) 13.01.2011 15:11
Thanks Stefan. Sorry for the slow reply. I'm from Texas,U.S.A. We're about 7 hours behind you. One more Question (true, 8, true, true) What do these represent?

Robert Smith (Unknown) 13.01.2011 21:53
I did as you said. I doubled it's size. But now when I'm at one edge of the map the sky at the opposite side is black. How do I fix this problem?

Stefan Geiger - GIANTS Software 14.01.2011 09:42
The parameters of Environment:new are the following:
string skyI3DFilename, bool dayNightCycle, number startHour, bool allowRain, bool autoRain

So you normally want to have the 4 booleans to have set to true, unless you want no day/night cycle or no rain.

The problem with the sky is, that it is further away than then far clip distance of the camera.
There is a way to fix this (honestly it is our mistake that we haven't done this in the game already ;) ).

Open the skyShader.xml of your mod and add the following lines just after
<CodeInjections> (line 15) just before <CodeInjection position="SAMPLERS">:


<CodeInjection position="VS_END">
<![CDATA[
Out.position.z = Out.position.w;
]]>
</CodeInjection>



Robert Smith (Unknown) 14.01.2011 17:11
Thank you Stefan. I can see the sky again!

I'm trying to model a real farm here in Texas. It is a Township (36 sq. sections or 93,239,568 sq meters. At 4097x4097 I have 67,141,636 sq meters to work with. At 5000X5000 I would have enough room. The Editor will only except n^2 or n^2+1, but not larger than 4097x4097. Is there a way around this?

Farmer Luke (Unknown) 17.02.2012 06:56
Hi Stefan,

i have tried it the way you describe it here. I can see the sky in editor without problems. Loading the map in the game yields to "jitter" on the sky! Do you have any idea what may cause this. I thought it could be the clip distance because when i am close to a border, the problem disappers. But enlarging the clip distance did not solve the problem.

Best regards,

Farmer Luke

PS: I have also enlarged the sky textures to twice the size of the original.

J Puddester (Unknown) 17.07.2014 05:52
FOR FS2013: I've found an easy way to expand the sky to fit a larger map...

STEP 1: copy the entire original 'sky' directory (it`s only about 4 MB) from the original install path into your mod zip
STEP 2: modify the path to the sky in your samplemodmap.lua file... this example is modified:
self.environment = Environment:new(Utils.getFilename("map/sky/sky_day_night.i3d", self.baseDirectory), true, 8, true, true);
(that path is relative to your mod`s map01.id3 file)
STEP 3: open the sky_day_night.i3d file in the editor, select the transformgroup and change the scale X, scale Y, and scale Z to all values of 2 (they are original values of 1)

This technique was sufficient to increase the size of the`skybox` limits beyond the edge of my 16x 8192x8192 map... it works fine in my game even without changing the resolutions of any of the original files (though a detail buff would probably want to)... I have been using this map for 6 months and I haven`t seen any problems while using this modified sky...


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