How to apply (preview) enviroment definitions in Witcher 3
Witcher 3 game uses a lot of enviroment definitions on different locations to create suitable atmosphere or interesting visual effect (remember Iris painted world).
These enviroment definitions are encoded in .env files in game bundles. You can extract them and open with WolvenKit, save & change some of it's params.
In general env definition contains many numbers, curves, which describes color, shadow, sunlight, fog params etc.
Also you can use Realtime in-game Enviroment UI to change params and preview result in real-time, dump it as yml definition and encode with Radish modding tools in .env finally.
However here I want to write how to preview and apply (what is the same) vanilla w3 env definitions. Probably it will be useful for scene/quest creation with radish tools.
So, here is my script: [https://pastebin.com/JzBcvw6V]
If you don't know witcher script language, just paste it into your mod/scripts/local
And in game (after script rebuilding and launching game) open console, enter command: execEnv(<some_number>)
Each .env depot path associated with some number (see testEnv function in script). You will see in-game notification and env will be changed.
If you know witcher script language, then you can check how to activate/deactivate env according to my script.
Definition of activating env function is:
import function ActivateEnvironmentDefinition( environmentDefinition : CEnvironmentDefinition, priority : int, blendFactor : float, blendInTime : float ) : int;
Note - save envID somewhere (I did it using fact) or you won't be able to deactivate your custom env.
Definition of deactivating env function is:
import function DeactivateEnvironment( environmentID : int , blendOutTime : float );
Another way to activate enviroment definitions (but more complex) is to use Entity component CAreaEnvironmentComponent
- will create some static area with some env inside it, while outside usual env will be used
But it leads to radish-trial 5 (creating custom entity with such component), my yml example: [https://pastebin.com/pYLwH0iD]
Or to editing .w2ent in WolvenKit, entity path example (which I dumped to create radish deifinition, huh): dlc\bob\data\fx\cutscenes\cs704_sister_intro\cs704_vision_env.w2ent
But I guess you come here to see some pictures or videos, right? Then I will show you all 211 vanilla envs at once (on Toussaint location).
If you have 14 minutes for it, have fun :) [https://www.youtube.com/watch?v=A2sGUAfvgEg]