Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //--------------------------------------------------------------------------------
- // Early Documentation posted by Cre8or in the A3 #terrain_makers Discord channel:
- //--------------------------------------------------------------------------------
- class Lighting7
- { // = 17:05 (on October 10th 2008 - this is 100% dependent on date and time!)
- // Parameter syntax: {{R, G, B}, INTENSITY};
- diffuse[] = {{0.90, 0.40, 0.20}, 8.0}; // The color of the sun-/moonlight - affects both the terrain and all objects
- diffuseCloud[] = {{0.90, 0.40, 0.20}, 8.0}; // Same as above (frankly, I don't know what the difference between the 2 is)
- ambient[] = {{0.36, 0.41, 0.47}, 8.4}; // The color of the terrain when not illuminated by the sun/moon
- ambientCloud[] = {{0.36, 0.41, 0.47}, 8.4}; // Same as above
- ambientMid[] = {{0.45, 0.51, 0.55}, 7.4}; // The color of objects when not illuminated by the sun/moon
- ambientMidCloud[] = {{0.45, 0.51, 0.55}, 7.4}; // Same as above
- groundReflection[] = {{0.40, 0.43, 0.45}, 7.0}; // What it says - visible within 1-2 meters above ground
- // I recommend spawning an Ghosthawk and looking at its underside to see what this does
- groundReflectionCloud[] = {{0.40, 0.43, 0.45}, 7.0}; // Same as above
- sky[] = {{0.14, 0.25, 0.42}, 8.8}; // Color of the sky, doesn't affect areas around/near the sun
- skyAroundSun[] = {{0.85, 0.48, 0.05}, 11.8}; // Color of the sky around/near the sun, overwrites sky color in those areas
- fogColor[] = {{0.50, 0.55, 0.63}, 5.4}; // Color of the fog
- cloudsColor[] = {{0.45, 1.00, 1.00}, 12.2}; // Color of the clouds, however results will vary when looking from above/below
- };
- //----------------------------------------------------------
- // Further clarification on some parameters provided by Uro:
- //----------------------------------------------------------
- //
- // diffuse/diffuseCloud is the direct lighting from the sun when the sun object is revealed or hidden behind clouds.
- //
- // Similarly, ambient/ambientCloud/ambientMid/ambientMidCloud/groundReflection/groundReflectionCloud are in relation to light sources from different angles. ambient = above ground / ambientMid = from the side / groundReflection = from the bottom.
- //
- // bidirect[] = {}; is the light from the opposite direction than the sun. This value is not a part of the LightingNew classes
- //
- // Uro: also one important factor for immersion is the fogColour array, it defines the fog colour with a few caveats. the skycolour param will have an effect on the colour of the fog you end up with so your actual fog colour will be a blend of the 2 parameters. The fogcolour also has an effect on the horizont line, where the VD ends it ceates a gradient that blends into the sky, so if for example you completely disable fogcolor it still effects how the skybox is drawn overall.
- //------------------------------------------------------------------------------
- // Cre8or's comments regarding date and time relative to lighting configuration:
- //------------------------------------------------------------------------------
- //
- // The way I established what time of day goes with each lighting class was indeed trial and error, as the classes are indeed tied to multiple factors, such as the terrain's geographic location and the date (month and year included), however they are not tied to the "time of day."
- // When I started, I picked a date/month that gave me the amount of sunlight in a full day that I wanted - in my case, October 10th did the trick
- // Next, I wanted to know which time of day was the closest to each of my lighting classes
- // So I went in all of the classes and changed the sunOrMoon parameter to 0, except for one class (where I changed it to 1)
- // Then I simply cycled through the time of day until I found the hour/time where the environment was the brightest, and I wrote that time down as a comment next to the lighting class
- //---------------------------------------------
- // Mondkalb's comments regarding date and time:
- //---------------------------------------------
- //
- // The classes are not tied to hours in the day, but instead to combinations of sunAngle and overcast.
- // This way your lighting stays consistent, but the days will be longer or shorter depending on the seasons.
- //---------------------------------------------------
- // Mondkalb's comments regarding config organization:
- //---------------------------------------------------
- //
- // I have my lighting configs divided into three .hpps, each with 13 lightings and one extra for the underwater stuff
- // sorted into the three overcast levels:
- // 25, 60, 85
- //-------------------------------------------------------------------------------------
- // Conversation regarding lighting configuration being affected by terrain coordinates:
- //-------------------------------------------------------------------------------------
- //
- // Rylan: What determines which classes apply to what coordinates?
- //
- // Mondkalb: The engine's geoid simulation.
- //
- // Mondkalb: I havent checked in ArmA 3, but in all games from OFP to ArmA 2, the sky was correctly modelled depending on where the map placed you in the world. S/N hemi
- // Additionally, day and night transitions are faster near the equator and longer near the poles.
- //
- // Rylan: How should I insert this into the document? I'm still not entirely sure exactly what it means
- //
- // Mondkalb: Via config you control this through the "longtitude =" and "latitude=" parameters
- // class myTerrain : CAWorld
- // {
- // latitude = -51.0;
- // longitude = 11.0;
- // };
- //
- // Rylan: How could you find out which lighting classes those coordinates would use?
- //
- // Mondkalb: Trial and error.
- //-----------------------------------------------------------------------------------
- // Conversation regarding the use of each lighting class and what purpose they serve:
- //-----------------------------------------------------------------------------------
- //
- //
- // Rylan: So, in the "LightingNew" subclasses, what does each one do? For example Lighting1 vs Lighting2 vs Lighting44?
- // I don't understand why there are so many of them.
- //
- //
- // Ice: @Rylan @Cre8or posted this the other day, did you see it?
- //
- //
- // Rylan: @Ice I did, but that doesn't say anything about why there are 44 of them.
- // Shouldn't there only be 24 if it's time of day?
- // Or even 48?
- // Why 44?
- // I don't understand the logic here
- //
- //
- // Cre8or: @Rylan IIRC there are 45 of them, divided into 4 categories.
- // The first 3 categories cover a full day/night cycle each, but at different overcast values (0.25, 0.6, 0.8).
- // Each set encompasses 13 classes, the first one ranging from Lighting0 to Lighting12.
- // Each of these classes covers a different sun angle, between each angle the engine interpolates between the neighboring classes.
- // Currently, the sun angles of all 13 classes are as follows:
- //
- // Lighting0 -24
- // Lighting1 -12
- // Lighting2 -11
- // Lighting3 -10
- // Lighting4 -5
- // Lighting5 -2
- // Lighting6 0
- // Lighting7 2
- // Lighting8 6
- // Lighting9 12
- // Lighting10 24
- // Lighting11 45
- // Lighting12 90
- //
- // Then, from Lighting13 to Lighting25, the cycle repeats, and then again from 26 to 38.
- // As for the remaining classes (39 to 44), I'm not entirely sure, but it seems like they handle the underwater lighting.
- //
- //-------------------------
- // Summary provided by Uro:
- //-------------------------
- //
- // Lighting 0-10 = day/night w/ clear sky
- // Lighting 11-21 = day/night w/ overcast sky
- // Lighting 22-71 address lighting underwater at specific depths governed by the "height = -0.001"; param
- // Also when in-game all lighting values (diffuse light, ambient light) will remain the same from overcast 0 - 0.4.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement