Implementing new skyboxes

Currently viewing this thread:

Dekkers

Sergeant at Arms
Hello,

I've been trying to implement new OSP skyboxes for a mod that we're working on, but I have failed to do this properly.

OSP mod:
https://forums.taleworlds.com/index.php?topic=342181.0

So I downloaded the mod and then:
1. I moved over the resource file and textures of the skyboxes to the PW files

2. I edited 'module.ini' and changed ''load_resource = skyboxes'' to ''load_mod_resource = skyboxes''

3. I went to 'data'/'skyboxes' and changed all the text in there to the text that came with the download (see spoiler)
54
sky_day_0a 0 0.000000 56.000000 1.000000 pfx_sunny
2.258065 2.580645 1.612903  0.000000 0.000000 0.000000  0.078431 0.117647 0.196078  100.000000 4287406765
sky_day_0b 0 0.000000 42.000000 0.700000 pfx_sunny
3.870968 3.548387 1.774194  0.000000 0.000000 0.000000  0.156863 0.235294 0.392157  100.000000 4287406765
sky_day_0c 0 0.000000 55.000000 1.000000 pfx_sunny
3.290323 3.258065 1.854839  0.000000 0.000000 0.000000  0.039216 0.137255 0.274510  100.000000 4287406765
sky_day_1a 16 0.000000 44.000000 1.000000 pfx_sunny
2.741935 2.258065 1.451613  0.000000 0.000000 0.000000  0.117647 0.196078 0.196078  100.000000 4286289058
sky_day_1b 16 0.000000 48.000000 1.000000 pfx_sunny
3.290323 3.258065 1.854839  0.000000 0.000000 0.000000  0.078431 0.137255 0.176471  100.000000 4287406765
sky_day_1c 16 0.000000 55.000000 0.700000 pfx_sunny
3.483871 2.983871 1.887097  0.000000 0.000000 0.000000  0.356863 0.411765 0.450980  100.000000 4287406765
sky_day_1d 16 0.000000 58.000000 1.000000 pfx_sunny
3.064516 2.741935 2.096774  0.000000 0.000000 0.000000  0.058824 0.117647 0.156863  100.000000 4283597982
sky_day_2a 32 0.000000 42.500000 0.500000 pfx_cloudy
2.741935 2.419355 1.612903  0.000000 0.000000 0.000000  0.078431 0.117647 0.137255  5.000000 4286087820
sky_day_2b 32 0.000000 35.000000 0.400000 pfx_cloudy
1.612903 1.451613 1.129032  0.000000 0.000000 0.000000  0.156863 0.156863 0.156863  40.000000 4288389255
sky_day_2c 32 0.000000 30.000000 0.900000 pfx_cloudy
3.225806 2.822581 2.419355  0.000000 0.000000 0.000000  0.078431 0.098039 0.117647  300.000000 4285429890
sky_day_2d 32 0.000000 32.500000 0.300000 pfx_cloudy
2.580645 2.258065 1.774194  0.000000 0.000000 0.000000  0.058824 0.078431 0.117647  900.000000 4287406765
sky_day_3a 48 0.000000 17.000000 0.300000 pfx_overcast
1.451613 1.854839 1.854839  0.000000 0.000000 0.000000  0.039216 0.117647 0.117647  300.000000 4282140230
sky_day_3b 48 0.000000 42.500000 0.200000 pfx_overcast
1.129032 1.774194 2.096774  0.000000 0.000000 0.000000  0.031373 0.137255 0.329412  300.000000 4286090390
sky_day_3c 48 0.000000 70.000000 0.000000 pfx_overcast
1.451613 1.774194 1.774194  0.000000 0.000000 0.000000  0.031373 0.031373 0.031373  300.000000 4282795590
sky_day_3d 48 0.000000 80.000000 0.000000 pfx_overcast
2.903226 2.741935 2.419355  0.000000 0.000000 0.000000  0.098039 0.117647 0.117647  300.000000 4287399800
sky_night_0a 2 0.000000 35.000000 0.200000 pfx_night
0.000000 0.161290 0.645161  0.000000 0.000000 0.000000  0.000000 0.007843 0.031373  400.000000 4278191114
sky_night_1a 18 0.000000 35.000000 0.200000 pfx_night
0.000000 0.129032 0.483871  0.000000 0.000000 0.000000  0.000000 0.007843 0.031373  400.000000 4278191114
sky_night_2a 34 0.000000 51.000000 0.300000 pfx_night
0.016129 0.048387 0.112903  0.000000 0.000000 0.000000  0.000000 0.003922 0.015686  400.000000 4278191114
sky_night_3a 50 0.000000 51.000000 0.100000 pfx_night
0.000000 0.080645 0.241935  0.000000 0.000000 0.000000  0.000000 0.007843 0.031373  400.000000 4278191114
sky_night_3b 50 0.000000 40.000000 0.100000 pfx_night
0.000000 0.080645 0.241935  0.000000 0.000000 0.000000  0.000000 0.007843 0.031373  400.000000 4278191114
sky_dawn_0a 1 0.000000 4.000000 0.600000 pfx_sunset
2.419355 0.322581 0.000000  0.000000 0.000000 0.000000  0.078431 0.039216 0.098039  50.000000 4284169278
sky_dawn_0b 1 0.000000 5.000000 0.600000 pfx_sunset
3.870968 1.451613 0.645161  0.000000 0.000000 0.000000  0.137255 0.058824 0.156863  50.000000 4284169278
sky_dawn_1a 17 0.000000 10.000000 0.300000 pfx_sunset
3.467742 1.129032 0.096774  0.000000 0.000000 0.000000  0.070588 0.098039 0.176471  50.000000 4284308325
sky_dawn_1b 17 0.000000 24.000000 0.900000 pfx_sunset
2.096774 0.564516 0.161290  0.000000 0.000000 0.000000  0.070588 0.047059 0.082353  50.000000 4282786595
sky_dawn_2a 33 0.000000 10.000000 0.100000 pfx_sunset
2.774194 0.951613 0.419355  0.000000 0.000000 0.000000  0.145098 0.070588 0.184314  50.000000 4284169278
sky_dawn_3a 49 0.000000 7.000000 0.100000 pfx_sunset
1.290323 0.322581 0.000000  0.000000 0.000000 0.000000  0.039216 0.019608 0.019608  50.000000 4288711775
sky_dawn_3b 49 0.000000 5.000000 0.300000 pfx_sunset
2.419355 0.564516 0.129032  0.000000 0.000000 0.000000  0.019608 0.019608 0.019608  50.000000 4284169278
sky_day_0a 536870912 0.000000 56.000000 1.000000 pfx_sunny
2.258065 2.580645 1.612903  0.000000 0.000000 0.000000  0.078431 0.117647 0.196078  100.000000 4287406765
sky_day_0b 536870912 0.000000 42.000000 0.700000 pfx_sunny
3.870968 3.548387 1.774194  0.000000 0.000000 0.000000  0.156863 0.235294 0.392157  100.000000 4287406765
sky_day_0c 536870912 0.000000 55.000000 1.000000 pfx_sunny
3.290323 3.258065 1.854839  0.000000 0.000000 0.000000  0.039216 0.137255 0.274510  100.000000 4287406765
sky_day_1a 536870928 0.000000 44.000000 1.000000 pfx_sunny
2.741935 2.258065 1.451613  0.000000 0.000000 0.000000  0.117647 0.196078 0.196078  0.000000 4286289058
sky_day_1b 536870928 0.000000 48.000000 1.000000 pfx_sunny
3.290323 3.258065 1.854839  0.000000 0.000000 0.000000  0.078431 0.137255 0.176471  100.000000 4287406765
sky_day_1c 536870928 0.000000 55.000000 0.700000 pfx_sunny
3.483871 2.983871 1.887097  0.000000 0.000000 0.000000  0.356863 0.411765 0.450980  400.000000 4287406765
sky_day_1d 536870928 0.000000 58.000000 1.000000 pfx_sunny
3.064516 2.741935 2.096774  0.000000 0.000000 0.000000  0.058824 0.117647 0.156863  999.000000 4283597982
sky_day_2a 536870944 0.000000 42.500000 0.500000 pfx_cloudy
2.741935 2.419355 1.612903  0.000000 0.000000 0.000000  0.078431 0.117647 0.137255  5.000000 4286087820
sky_day_2b 536870944 0.000000 35.000000 0.400000 pfx_cloudy
1.612903 1.451613 1.129032  0.000000 0.000000 0.000000  0.156863 0.156863 0.156863  40.000000 4288389255
sky_day_2c 536870944 0.000000 30.000000 0.900000 pfx_cloudy
3.225806 2.822581 2.419355  0.000000 0.000000 0.000000  0.078431 0.098039 0.117647  300.000000 4285429890
sky_day_2d 536870944 0.000000 32.500000 0.300000 pfx_cloudy
2.580645 2.258065 1.774194  0.000000 0.000000 0.000000  0.058824 0.078431 0.117647  900.000000 4287406765
sky_day_3a 536870960 0.000000 17.000000 0.300000 pfx_overcast
1.451613 1.854839 1.854839  0.000000 0.000000 0.000000  0.039216 0.117647 0.117647  300.000000 4282140230
sky_day_3b 536870960 0.000000 42.500000 0.200000 pfx_overcast
1.129032 1.774194 2.096774  0.000000 0.000000 0.000000  0.031373 0.137255 0.329412  300.000000 4286090390
sky_day_3c 536870960 0.000000 70.000000 0.000000 pfx_overcast
1.451613 1.774194 1.774194  0.000000 0.000000 0.000000  0.031373 0.031373 0.031373  300.000000 4282795590
sky_day_3d 536870960 0.000000 80.000000 0.000000 pfx_overcast
2.903226 2.741935 2.419355  0.000000 0.000000 0.000000  0.098039 0.117647 0.117647  300.000000 4287399800
sky_night_0a 536870914 0.000000 35.000000 0.200000 pfx_night
0.000000 0.161290 0.645161  0.000000 0.000000 0.000000  0.000000 0.007843 0.031373  400.000000 4278191114
sky_night_1a 536870930 0.000000 35.000000 0.200000 pfx_night
0.000000 0.129032 0.483871  0.000000 0.000000 0.000000  0.000000 0.007843 0.031373  400.000000 4278191114
sky_night_2a 536870946 0.000000 51.000000 0.300000 pfx_night
0.016129 0.048387 0.112903  0.000000 0.000000 0.000000  0.000000 0.003922 0.015686  400.000000 4278191114
sky_night_3a 536870962 0.000000 51.000000 0.100000 pfx_night
0.000000 0.080645 0.241935  0.000000 0.000000 0.000000  0.000000 0.007843 0.031373  400.000000 4278191114
sky_night_3b 536870962 0.000000 40.000000 0.100000 pfx_night
0.000000 0.080645 0.241935  0.000000 0.000000 0.000000  0.000000 0.007843 0.031373  400.000000 4278191114
sky_dawn_0a 536870913 0.000000 4.000000 0.600000 pfx_sunset
2.419355 0.322581 0.000000  0.000000 0.000000 0.000000  0.078431 0.039216 0.098039  50.000000 4284169278
sky_dawn_0b 536870913 0.000000 5.000000 0.600000 pfx_sunset
3.870968 1.451613 0.645161  0.000000 0.000000 0.000000  0.137255 0.058824 0.156863  50.000000 4284169278
sky_dawn_1a 536870929 0.000000 10.000000 0.300000 pfx_sunset
3.467742 1.129032 0.096774  0.000000 0.000000 0.000000  0.070588 0.098039 0.176471  50.000000 4284308325
sky_dawn_1b 536870929 0.000000 24.000000 0.900000 pfx_sunset
2.096774 0.564516 0.161290  0.000000 0.000000 0.000000  0.070588 0.047059 0.082353  50.000000 4282786595
sky_dawn_2a 536870945 0.000000 10.000000 0.100000 pfx_sunset
2.774194 0.951613 0.419355  0.000000 0.000000 0.000000  0.145098 0.070588 0.184314  50.000000 4284169278
sky_dawn_3a 536870961 0.000000 7.000000 0.100000 pfx_sunset
1.290323 0.322581 0.000000  0.000000 0.000000 0.000000  0.039216 0.019608 0.019608  50.000000 4288711775
sky_dawn_3b 536870961 0.000000 5.000000 0.300000 pfx_sunset
2.419355 0.564516 0.129032  0.000000 0.000000 0.000000  0.019608 0.019608 0.019608  50.000000 4284169278

4. I edited 'postfx.txt' in PW_4.5 and replaced the text with the text that came with the download (see spoiler)
postfx_paramsfile version 1
9
pfx_default 0 0  128.000000 1.058800 1.451000 9.176500  0.960800 1.137300 1.137300 0.196100  1.000000 1.000000 2.000000 1.000000
pfx_map_params 0 0  128.000000 1.040000 1.294100 10.000000  2.372500 2.156900 1.843100 0.486300  1.000000 1.000000 2.000000 1.000000
pfx_indoors 0 0  128.000000 1.000000 1.254900 10.000000  0.647100 4.784300 4.161600 0.001500  0.480000 1.000000 1.600000 1.000000
pfx_sunset 0 0  128.000000 0.588200 0.980400 0.980400  0.078400 2.117600 1.372500 0.125500  1.000000 1.000000 2.000000 1.000000
pfx_night 0 0  128.000000 1.000000 1.254900 10.000000  0.647100 4.784300 1.215700 0.000000  1.000000 1.000000 2.400000 1.000000
pfx_sunny 0 0  128.000000 0.666700 0.980400 0.980400  0.451000 2.431400 1.294100 0.141200  1.000000 1.000000 2.800000 1.000000
pfx_cloudy 0 0  128.000000 1.000000 0.980400 0.000000  0.313700 2.666700 2.000000 0.431400  1.000000 1.000000 1.200000 1.000000
pfx_overcast 0 0  128.000000 1.000000 0.980400 0.000000  0.313700 2.666700 2.000000 0.000000  1.000000 1.000000 0.800000 1.000000
pfx_high_contrast 0 3  128.000000 1.000000 1.294100 10.000000  0.431400 2.000000 1.058800 0.054900  1.000000 1.000000 4.800000 1.000000

5. I edited 'module_postfx.py' and replaced 'default, map_params, indoors, sunset etc. etc. with the text that came with the skybox download (see spoiler)
("default",        0, 0,[128.0000, 1.0588, 1.4510, 09.1765], [0.9608, 1.1373, 1.1373, 0.1961],  [25.0/25, 25.0/25, 050.0/25, 1.0000]),
("map_params",    0, 0,[128.0000, 1.0400, 1.2941, 10.0000], [2.3725, 2.1569, 1.8431, 0.4863],  [25.0/25, 25.0/25, 050.0/25, 1.0000]),
("indoors",        0, 0,[128.0000, 1.0000, 1.2549, 10.0000], [0.6471, 4.7843, 4.1616, 0.0015],  [12.0/25, 25.0/25, 040.0/25, 1.0000]),
("sunset",        0, 0,[128.0000, 0.5882, 0.9804, 00.9804], [0.0784, 2.1176, 1.3725, 0.1255],  [25.0/25, 25.0/25, 050.0/25, 1.0000]),
("night",          0, 0,[128.0000, 1.0000, 1.2549, 10.0000], [0.6471, 4.7843, 1.2157, 0.0000],  [25.0/25, 25.0/25, 060.0/25, 1.0000]),
("sunny",          0, 0,[128.0000, 0.6667, 0.9804, 00.9804], [0.4510, 2.4314, 1.2941, 0.1412],  [25.0/25, 25.0/25, 070.0/25, 1.0000]),
("cloudy",        0, 0,[128.0000, 1.0000, 0.9804, 00.0000], [0.3137, 2.6667, 2.0000, 0.4314],  [25.0/25, 25.0/25, 030.0/25, 1.0000]),
("overcast",      0, 0,[128.0000, 1.0000, 0.9804, 00.0000], [0.3137, 2.6667, 2.0000, 0.0000],  [25.0/25, 25.0/25, 020.0/25, 1.0000]),
("high_contrast",  0, 3,[128.0000, 1.0000, 1.2941, 10.0000], [0.4314, 2.0000, 1.0588, 0.0549],  [25.0/25, 25.0/25, 120.0/25, 1.0000]),

6. I edited 'module_skyboxes.py' and changed the text with the meshes and the numbers behind (which I think is like light settings and stuff?) --> (see spoiler)
sf_day        = 0x00000000
sf_dawn      = 0x00000001
sf_night      = 0x00000002

sf_clouds_0  = 0x00000000
sf_clouds_1  = 0x00000010
sf_clouds_2  = 0x00000020
sf_clouds_3  = 0x00000030

sf_no_shadows = 0x10000000
sf_HDR        = 0x20000000 # this will generate HDR-shaded skyboxes; you should make a LDR version of your skybox for compatibility

skyboxes = [
  ("skybox_cloud_1", sf_day|sf_clouds_1, 179.0, 52.0, 0.85, "pfx_sunny", (1.391.32,1.391.21,1.391.0:cool:, (0.0,0.0,0.0), (0.9616.0/255,0.9623.5/255,0.9644.5/255), (300, 0xFF8CA2AD)),
  ("skybox_cloud_1", sf_day|sf_clouds_1|sf_HDR, 179.0, 52.0, 0.85, "pfx_sunny", (1.391.32,1.391.21,1.391.0:cool:, (0.0,0.0,0.0), (0.8616.0/255,0.8623.5/255,0.8644.5/255), (300, 0xFF8CA2AD)),

  ("skybox_night_1", sf_night|sf_clouds_1, 152.0, 38.0, 0.0, "pfx_night", (1.017.0/255,1.021.0/255,1.027.0/255),(0.0,0.0,0.0), (0.95.0/255,0.95.0/255,0.915.0/255), (500, 0xFF152035)),
  ("skybox_night_1", sf_night|sf_clouds_1|sf_HDR, 152.0, 38.0, 0.0, "pfx_night", (1.017.0/255,1.021.0/255,1.027.0/255),(0.0,0.0,0.0), (0.95.0/255,0.95.0/255,0.915.0/255), (500, 0xFF152035)),
  ("skybox_night_2", sf_night|sf_clouds_3, 152.0, 38.0, 0.0, "pfx_night", (1.017.0/255,1.021.0/255,1.027.0/255),(0.0,0.0,0.0), (0.95.0/255,0.95.0/255,0.915.0/255), (500, 0xFF152035)),
  ("skybox_night_2", sf_night|sf_clouds_3|sf_HDR, 152.0, 38.0, 0.0, "pfx_night", (1.017.0/255,1.021.0/255,1.027.0/255),(0.0,0.0,0.0), (0.95.0/255,0.95.0/255,0.915.0/255), (500, 0xFF152035)),

  ("skybox_sunset_1", sf_dawn|sf_clouds_1, 180.0, 9.146, 0.7, "pfx_sunset", (230.0/220,120.0/220,37.0/220),(0.0,0.0,0.0), (14.5/210,21.0/210,40.0/210), (150, 0xFF897262)),
  ("skybox_sunset_1", sf_dawn|sf_clouds_1|sf_HDR, 180.0, 9.146, 0.7, "pfx_sunset", (230.0/220,120.0/220,37.0/220),(0.0,0.0,0.0), (14.5/210,21.0/210,40.0/210), (150, 0xFF897262)),

etc. etc.

When we built the module and tested it, I got weird sunlight colours, but the skybox hadn't changed:
https://steamuserimages-a.akamaihd.net/ugc/918044432988085370/D9C3ED508BDB66A7D52E79C93DC39627A282FF70/

Is there anyone who can spot the mistake I made or tell me how to do it from scratch? Help would be much appreciated, I am a total noob when it comes to M&B modding

 
Top Bottom