Suggestion General Give modders ability to change MissionInitializerRecord properties after mission initialized

Users who are viewing this thread

Thanks.

So my request is simple:
  1. Add functionality to set only the scene's skybox texture.
  2. Add functionality to set only the scene's sun intensity.
  3. Add functionality to set only the scene's fog density.
  4. Make rain density scale visually according to its numerical value.
I notice that the AtmosphereInfo class already has properties for the sun intensity and fog density which can be set, but there are no corresponding methods in the Scene class, at least not ones which set only the sun intensity and fog density. Please add those methods.
Greetings

I work at the engine team, I will give some information regarding the requests that you made. First of all, to have correct diffuse and specular ambient, PBR rendering systems (which we use) bake ambient data as Environment Cube Maps. These are gathered by rendering the whole scene though the position of the cube-map 6 times (for every cube face). Then, a comprehensive filtering occurs which can take similar time to rendering a frame. If this data is inconsistent with the atmosphere (light coming from sky and sun), the visual of the shadows and the reflections on the shinny surfaces will be wrong. This is currently done at the initial scene loading for the missions.

Thus, any change to the lighting environment (1 and 2) will need a new environment map to be re-rendered. Which can not be done in real time and there will definitely be spikes.

Secondly, the GI solution we use captures the transfer function between light incoming and the final ambient. This is needed to not bake different GI for every atmosphere we have. Thus, change to the lighting environment (1 and 2) will need a recoloring of the said GI data, which will probably create spikes as well. One last thing is that, in order to save runtime memory, we delete the transfer data after the initial recoloring is done. So, we need to read this file whenever the scene's lighting is changed or do not delete it at the fist place.

So how do we do it for the campaign map? Firstly, we do not have GI for the campaign map. Secondly, since we use atmosphere curves, we know how the lighting environment will change beforehand (sun color, sun position, skybox etc for every time step in the day), we can pre-render the environment maps and save them to files. At runtime, we load the current and next one, and blend them together with respect to time.

For your needs, if you know how the atmosphere will change with respect to the time or any other variables, the best way would be to create a curve atmosphere and apply it to the mission. Then, in runtime, you can change the blend value to get different atmospheres. However, since this is never done by a modder, there may be rough edges that we need to smooth out, like implementing proper interfaces. But those would not be a big task for us.

For the 4. question, you can check the particle system's parameters to see if you can accomplish the effect you want by increasing/decreasing the used rain particle. The particle can be found within "rain_prefab_entity" the entity. If so, you can find the said entity at runtime via a name search within the scene and then find the particle system to override it parameters. If the interface is not clear for it, we can check it out and fix it. Also, you can override that prefab in your module to have different rain effects.

Hope this shed some light into your questions. If you have further questions, I would be glad to answer those as well.
Happy modding :smile:
Murat
 
Greetings

I work at the engine team, I will give some information regarding the requests that you made. First of all, to have correct diffuse and specular ambient, PBR rendering systems (which we use) bake ambient data as Environment Cube Maps. These are gathered by rendering the whole scene though the position of the cube-map 6 times (for every cube face). Then, a comprehensive filtering occurs which can take similar time to rendering a frame. If this data is inconsistent with the atmosphere (light coming from sky and sun), the visual of the shadows and the reflections on the shinny surfaces will be wrong. This is currently done at the initial scene loading for the missions.

Thus, any change to the lighting environment (1 and 2) will need a new environment map to be re-rendered. Which can not be done in real time and there will definitely be spikes.

Secondly, the GI solution we use captures the transfer function between light incoming and the final ambient. This is needed to not bake different GI for every atmosphere we have. Thus, change to the lighting environment (1 and 2) will need a recoloring of the said GI data, which will probably create spikes as well. One last thing is that, in order to save runtime memory, we delete the transfer data after the initial recoloring is done. So, we need to read this file whenever the scene's lighting is changed or do not delete it at the fist place.

So how do we do it for the campaign map? Firstly, we do not have GI for the campaign map. Secondly, since we use atmosphere curves, we know how the lighting environment will change beforehand (sun color, sun position, skybox etc for every time step in the day), we can pre-render the environment maps and save them to files. At runtime, we load the current and next one, and blend them together with respect to time.

For your needs, if you know how the atmosphere will change with respect to the time or any other variables, the best way would be to create a curve atmosphere and apply it to the mission. Then, in runtime, you can change the blend value to get different atmospheres. However, since this is never done by a modder, there may be rough edges that we need to smooth out, like implementing proper interfaces. But those would not be a big task for us.

For the 4. question, you can check the particle system's parameters to see if you can accomplish the effect you want by increasing/decreasing the used rain particle. The particle can be found within "rain_prefab_entity" the entity. If so, you can find the said entity at runtime via a name search within the scene and then find the particle system to override it parameters. If the interface is not clear for it, we can check it out and fix it. Also, you can override that prefab in your module to have different rain effects.

Hope this shed some light into your questions. If you have further questions, I would be glad to answer those as well.
Happy modding :smile:
Murat
I checked rain_prefab_entity in scene_prop_prefabs.xml but I can't find the value to change the rain density. It is not very clear to me.
 
I checked rain_prefab_entity in scene_prop_prefabs.xml but I can't find the value to change the rain density. It is not very clear to me.
Well... an explanation (which is appreciated of course) that can be simplified to a big NOPE :lol:.

The only silver lining is...
[...]...the best way would be to create a curve atmosphere and apply it to the mission. Then, in runtime, you can change the blend value to get different atmospheres. However, since this is never done by a modder, there may be rough edges that we need to smooth out, like implementing proper interfaces. But those would not be a big task for us...[...]

giphy.gif
 
Greetings

I work at the engine team, I will give some information regarding the requests that you made. First of all, to have correct diffuse and specular ambient, PBR rendering systems (which we use) bake ambient data as Environment Cube Maps. These are gathered by rendering the whole scene though the position of the cube-map 6 times (for every cube face). Then, a comprehensive filtering occurs which can take similar time to rendering a frame. If this data is inconsistent with the atmosphere (light coming from sky and sun), the visual of the shadows and the reflections on the shinny surfaces will be wrong. This is currently done at the initial scene loading for the missions.

Thus, any change to the lighting environment (1 and 2) will need a new environment map to be re-rendered. Which can not be done in real time and there will definitely be spikes.

Secondly, the GI solution we use captures the transfer function between light incoming and the final ambient. This is needed to not bake different GI for every atmosphere we have. Thus, change to the lighting environment (1 and 2) will need a recoloring of the said GI data, which will probably create spikes as well. One last thing is that, in order to save runtime memory, we delete the transfer data after the initial recoloring is done. So, we need to read this file whenever the scene's lighting is changed or do not delete it at the fist place.

So how do we do it for the campaign map? Firstly, we do not have GI for the campaign map. Secondly, since we use atmosphere curves, we know how the lighting environment will change beforehand (sun color, sun position, skybox etc for every time step in the day), we can pre-render the environment maps and save them to files. At runtime, we load the current and next one, and blend them together with respect to time.

For your needs, if you know how the atmosphere will change with respect to the time or any other variables, the best way would be to create a curve atmosphere and apply it to the mission. Then, in runtime, you can change the blend value to get different atmospheres. However, since this is never done by a modder, there may be rough edges that we need to smooth out, like implementing proper interfaces. But those would not be a big task for us.

For the 4. question, you can check the particle system's parameters to see if you can accomplish the effect you want by increasing/decreasing the used rain particle. The particle can be found within "rain_prefab_entity" the entity. If so, you can find the said entity at runtime via a name search within the scene and then find the particle system to override it parameters. If the interface is not clear for it, we can check it out and fix it. Also, you can override that prefab in your module to have different rain effects.

Hope this shed some light into your questions. If you have further questions, I would be glad to answer those as well.
Happy modding :smile:
Murat
I also checked atmosphere curves and I don't see how to apply them to missions with C# code. It is also not very clear.
 
Back
Top Bottom