So one of the major systems I wanted to include was complex atmospheric pressure, temperature and particle makeup.
The desired end result being a complex balance between systems which make heat, oxygen, CO2 and so on that could easily create a dangerous environment or directly cause harm to the player or the content of the rooms.
I started by building a post process effect that would fade away into the distance to simulate the thick air effect. Then I made a custom depth mask which would remove this fog from anything outside of windows.
Good first step. But I wanted more out of it. I wanted to be able to open a door to a depressurized room and watch as it equalized.
This proved a lot harder. First attempt would use custom depth masking and stencils in doorways with a complex system of possible pathing options and rebuilding those stencils for the post process to apply the correct atmosphere effect beyond that doorway.
I used a spheremask and the direction and location vector to get a “in doorway” mask to swap out with the other effect.
Finally I made the math equalize the rooms by particle percentage and volume. It worked out pretty well, but there were a few problems.
- Once Equalized rooms where all one and any heat, oxygen or CO2 would be added to that massive pool, effectively spreading out and travelling unlimited distance.
All uniqueness of the rooms was gone. further more: rooms would be unheatable as the heat would always equalize and dissipate.
The effect would need to be removed from the doorways and more dynamically placed between module piece connections.
- The method custom depth stencils use makes it impractical for any kind of effect stacking. Meaning if two doorways with different atmospheres line up with the player camera the one farther will not render until the player passes through.
Making an undesirable pop-in effect.
Note: Custom depth stencils CAN be stacked by giving each farther a smaller Bit. However for this to work you have to set the model to ignore depth. A condition of the effect is that it uses depth.
The method of air transfer needs work. atmosphere modifying systems need to portion off sections from the whole and leak back in more slowly.
the visual effect is good in theory but might not be possible.