User Tools

Site Tools


hpl3:engine:rendering

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
hpl3:engine:rendering [2012/10/30 10:14]
nebej
hpl3:engine:rendering [2013/10/10 13:13]
ian.thomas
Line 11: Line 11:
  
  
-[[{{  :​hpl3:​engine:​envparticles.jpg?​nolink& ​ }}]] +[[envparticles.jpg]] ​
  
  
Line 66: Line 66:
 **GravitySpeedRandomAmount**,​ **WindSpeedRandomAmount**,​ **WindDirectionRandomAmount**,​**RotateSpeedRandomAmount** \\  **GravitySpeedRandomAmount**,​ **WindSpeedRandomAmount**,​ **WindDirectionRandomAmount**,​**RotateSpeedRandomAmount** \\ 
 The random variations are added to any iterations after the first! Valid values for all amounts are 0 - 1 (can be others, but not recommended).\\ ​ The random variations are added to any iterations after the first! Valid values for all amounts are 0 - 1 (can be others, but not recommended).\\ ​
-What it does it that any subsequent iterations will have the vector updated like: vector + vector%%*%%random amount. So if the vector is (0,1,0.1) and if the random amount is 0.1, then any subsequent iterations will have values between (0, 0.9, 0.09) - (0, 1.1, 0.11). Wind direction random is a bit different, what is does is that it rotates the vector (around all axes) by around amount. Wind random amount of 1 means, it can rotate into any direction of a sphere, 0.5 means half a sphere, 0.25, quarter of a sphere and so on.\\ +What it does it that any subsequent iterations will have the vector updated like: vector + vector<​nowiki>​*</​nowiki>​random amount. So if the vector is (0,1,0.1) and if the random amount is 0.1, then any subsequent iterations will have values between (0, 0.9, 0.09) - (0, 1.1, 0.11). Wind direction random is a bit different, what is does is that it rotates the vector (around all axes) by around amount. Wind random amount of 1 means, it can rotate into any direction of a sphere, 0.5 means half a sphere, 0.25, quarter of a sphere and so on.\\ 
 Also note that the random values are psuedo-random,​ this means that they do not change depending on play through, but they are always they same. So if it looks like something in the editor, the random distribution will look exactly the same when you view it later in the game. Also note that the random values are psuedo-random,​ this means that they do not change depending on play through, but they are always they same. So if it looks like something in the editor, the random distribution will look exactly the same when you view it later in the game.
  
Line 84: Line 84:
  
  
-The [[http://www.adobe.com/​products/​flashplayer/​|Adobe Flash Plugin]] is needed to display this content. ​+The [[:hpl3:​engine:​envparticles.jpg|Adobe Flash Plugin]] is needed to display this content.
  
  
Line 90: Line 90:
  
  
-[[{{:​hpl3:​engine:​lens_flares.png?​nolink&​}}]] \\ +[[:​hpl3:​engine:​envparticles.jpg|lens_flares.png]] \\ 
 Each lens flare consists of a few different kind of flare types that can be active at the same time. Each lens flare consists of a few different kind of flare types that can be active at the same time.
  
Line 178: Line 178:
  
  
-The second type of gamma correction makes sure that all light calculations are perform in linear-space. Since textures created in Photoshop are saved in gamma space they need to be converted to linear-space before lighting is applied to them. This is done by applying the inverse curve that the monitor uses and then multiplying it with the color and brightness of the light source. ​+The second type of gamma correction makes sure that all light calculations are perform in linear-space. Since textures created in Photoshop are saved in gamma space they need to be converted to linear-space before lighting is applied to them. This is done by applying the inverse curve that the monitor uses and then multiplying it with the color and brightness of the light source.
  
  
Line 184: Line 184:
  
  
-[[http://​filmicgames.com/​archives/​32|What is Gamma?]] [[http://​filmicgames.com/​archives/​299|Linear-Space Lighting]] [[http://​filmicgames.com/​archives/​581|Gamma Correction and Gamma Correction]] ​+[[:hpl3:​engine:​envparticles.jpg|What is Gamma?]] [[:hpl3:​engine:​envparticles.jpg|Linear-Space Lighting]] [[:hpl3:​engine:​envparticles.jpg|Gamma Correction and Gamma Correction]] ​
  
  
Line 229: Line 229:
 **Exposure** | The total light that is allowed through the camera, increasing this value makes the image brighter. In the range of -10 to +10.\\ ​ **Exposure** | The total light that is allowed through the camera, increasing this value makes the image brighter. In the range of -10 to +10.\\ ​
 **WhitePoint** | A real value that sets which value that should be considered the brightest.\\ ​ **WhitePoint** | A real value that sets which value that should be considered the brightest.\\ ​
-**TransitionTime** | The time it takes for the new exposure to apply. ​+**TransitionTime** | The time it takes for the new exposure to apply.
 === Color Grading === === Color Grading ===
  
Line 239: Line 239:
 It is possible to smoothly fade between two different grading templates.\\ ​ It is possible to smoothly fade between two different grading templates.\\ ​
 It uses a small 3D texture with a color as input and another color as output.\\ ​ It uses a small 3D texture with a color as input and another color as output.\\ ​
-[[{{  ​:hpl3:engine:​grading.jpg?​nolink& ​ }}]] +[[:http:www.adobe.com:​products:​flashplayer:start|grading.jpg]] ​
  
  
Line 249: Line 249:
  
     * Photoshop     * Photoshop
-    * [[http://​developer.nvidia.com/​nvidia-texture-tools-adobe-photoshop|NVIDIA Texture ​Tooels ​for Adobe Photoshop]] ​+    * [[https://​developer.nvidia.com/​nvidia-texture-tools-adobe-photoshop|NVIDIA Texture ​Tools for Adobe Photoshop]] ​
  
  
Line 257: Line 257:
     - Take a screenshot of the game with color grading disabled     - Take a screenshot of the game with color grading disabled
     - Open the screenshot in Photoshop     - Open the screenshot in Photoshop
-    - Drag and drop the default grading texture on the canvas (redist/​core/​textures/​grading_default.dds) or ([[Default Grading Texture]] )+    - Drag and drop the default grading texture on the canvas (redist/​core/​textures/​grading_default.dds) or ([[:​http:​filmicgames.com:​archives:​581|Default Grading Texture]] )
     - Place the color strip anywhere in the image     - Place the color strip anywhere in the image
     - Flatten the image to merge all the layers     - Flatten the image to merge all the layers
Line 271: Line 271:
  
  
-{{:​hpl3:​engine:​grading_default.zip|{{:​hpl3:​engine:​adjustments.jpg?​nolink&​200}}}} +[[:​hpl3:​engine:​grading.jpg|{{:​hpl3:​engine:​adjustments.jpg?​nolink&​200]] }}
  
  
Line 309: Line 309:
  
  
-A group with multiple billboards. Batching them together and rendering them at the same time. \\ All the billboards in a group must have the same material, but all other parameters can be different. \\ Alpha sorting is performed internally within the group. But alpha sorting with external billboards and billboard groups is performed as usual. Because of this the billboards in agroup should not be to spread out, a maximum radius of 5-10m is recommended. \\ When selected the Billboard Group will show the combinded bounding volume of all the billboards.+A group with multiple billboards. Batching them together and rendering them at the same time.    \\ All the billboards in a group must have the same material, but all other parameters can be different. ​   \\ Alpha sorting is performed internally within the group. But alpha sorting with external billboards and billboard groups is performed as usual. Because of this the billboards in agroup should not be to spread out, a maximum radius of 5-10m is recommended. ​   \\ When selected the Billboard Group will show the combinded bounding volume of all the billboards.
  
  
Line 315: Line 315:
  
  
-**Material** ​ | The material which will be used to render all the billboards in the group.+**Material** ​    ​| The material which will be used to render all the billboards in the group.
  
  
Line 342: Line 342:
  
  
-For some effects the liquid amount can be controlled automatically by the time. But scripting can be used to create some other interesting effects. One effect could be to set the LiquidAmount variable to correspond to how much of an object is below the water surface and then slowly lower the LiquidAmount to simulate it drying. Scripting can also be used for showing blood when a character is hurt or if oil starts leaking when triggering a trap.  \\ When a material should work with scripting it is a good idea to set the LiquidTrickleFadeIn parameter to 1 so that the LiquidAmount variable works as percentage instead of time.+For some effects the liquid amount can be controlled automatically by the time. But scripting can be used to create some other interesting effects. One effect could be to set the LiquidAmount variable to correspond to how much of an object is below the water surface and then slowly lower the LiquidAmount to simulate it drying. Scripting can also be used for showing blood when a character is hurt or if oil starts leaking when triggering a trap.     ​\\ When a material should work with scripting it is a good idea to set the LiquidTrickleFadeIn parameter to 1 so that the LiquidAmount variable works as percentage instead of time.
  
  
Line 354: Line 354:
  
  
-{{:gnome-dof.jpg?320x180}}+== Settings == 
 + 
 + 
 +**Focus Start** ​   | The nearest distance to the camera that an object has to be to be sharp. Any closer and it will be blurry 
 + 
 + 
 +**Focus End **    | The farthest away an object can be and still be sharp. Any further away and it will start getting blurry 
 + 
 + 
 +**Falloff **    | How fast the object should get blurry when it is closer or further away then the focus plane. The blur distance is caluclated as (Focus End - Focus Start) / Falloff 
 + 
 + 
 +[[:​hpl3:​engine:​grading.jpg|{{:hpl3:​engine:​depth_of_field_diagram.png?nolink&​518x174}}]]  
 + 
 + 
 +=== Distance Culling === 
 + 
 + 
 +== Overview == 
 + 
 + 
 +Removal of objects that get to far away from the camera. Objects are removed based on how big they appear on the screen. The objects are gradually faded out until they are removed. Solid objects dissolve and translucent objects have their alpha faded. 
 + 
 + 
 +The default setting is that all objects are faded out when distance culling is activated. Important objects and objects that make up the silhouette of the level should have distance culling turned off. 
 + 
 + 
 +Distance culling should only be activated on outdoor levels where occlusion culling is not as effective.
  
  
Line 360: Line 387:
  
  
-**Focus Start** | The nearest ​distance to the camera ​that an object has to be to be sharp. Any closer and it will be blurry+**Distance Cull Active** | If distance ​culling should be used on this level 
 + 
 + 
 +**Distance Cull Min Range ** | The minimum range before objects start fading out. This is important ​to set so that very small objects dont get culled ​to early 
  
 +**Distance Cull Screen Size ** | How small an object has to be in screen size to be culled. A real value between 0.0 - 1.0. If set to 0.1 then any object that is smaller then 10% of the height of the screen will get culled
  
-**Focus End ** | The farthest away an object can be and still be sharp. Any further away and it will start getting blurry 
  
 +**Distance Cull Random Size ** | A random value unique to each object that is added to the screen size. This shoudl be used so that not all objects of the same size are removed at the same range
  
-**Falloff ** | How fast the object should get blurry when it is closer or further away then the focus plane. The blur distance is caluclated as (Focus End - Focus Start) %%*%% Falloff 
  
 +**Culled By Distance ** | A variable set per object that specifies if the object should be affected by distance culling
hpl3/engine/rendering.txt · Last modified: 2014/05/20 09:33 by nebej