User Tools

Site Tools


hpl3:engine:rendering

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
hpl3:engine:rendering [2011/10/20 13:31]
nebej
hpl3:engine:rendering [2012/01/09 18:08]
nebej
Line 140: Line 140:
  
 == Overview == == Overview ==
-A normal computer monitor can display display colors in the range of (0-255) per color channel. This adds up to around 16.77 million unique colors. +A normal computer monitor can display display colors in the range of (0-255) per color channel. This adds up to around 16.77 million unique colors.\\ 
-With HDR Rendering the number of colors per channel is increased to 65565. This is increases the precision and quality of dark/grey tones and it also gives the ability to have colors that are brighter than the monitor can display. +With HDR Rendering the number of colors per channel is increased to 65565. This is increases the precision and quality of dark/grey tones and it also gives the ability to have colors that are brighter than the monitor can display.\\ 
-Having colors that are brighter then what the monitor can display would be a waste. A technique called Tone Mapping is applied to the high precision color to covert it to a range between (0-255) so that the monitor can display it.+Having colors that are brighter then what the monitor can display would be a waste. A technique called Tone Mapping is applied to the high precision color to covert it to a range between (0-255) so that the monitor can display it.\\ 
 + 
 +All light have a brightness setting so that they can be brighter then 1. The overall range of the brightness of a level should be around (0-10) for best result. Before HDR was implemented it was a in the range of (0-1). You can think of light brightness as light bulb energy. A brightness of 6 = 60 W, 4 = 40W.
  
 == Tone Mapping == == Tone Mapping ==
Line 210: Line 212:
 **Saving** **Saving**
   - Crop the color strip from the canvas, make sure the resulting image is 256x16 px   - Crop the color strip from the canvas, make sure the resulting image is 256x16 px
-  - Select "Save As..." and set the format as "​D3D/​DDS"/"​.dds"​ and save it in <Folder here>+  - Select "Save As..." and set the format as "​D3D/​DDS"/"​.dds"​ and save it in the folder "​redist/​textures/​colorgrading/"​
   - In the DDS format settings select "8.8.8 RGB 24 bit | unsigned",​ "​Volume Texture",​ "No MIP maps"   - In the DDS format settings select "8.8.8 RGB 24 bit | unsigned",​ "​Volume Texture",​ "No MIP maps"
- ​{{:​hpl3:​engine:​dds_format.jpg}}+ ​{{:​hpl3:​engine:​dds_format.jpg}} ​\\ 
 + ​{{:​hpl3:​engine:​crop.jpg?​400|}} 
 + 
 +=== Billboard Group === 
 + 
 +== Overview == 
 +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. 
 + 
 +== Settings == 
 + 
 +**Material** | The material which will be used to render all the billboards in the group.\\ 
 + 
 +=== Liquid Trickle === 
 + 
 +== Overview == 
 +A shader effect to simulate liquid spreading out over an object. The amount of liquid is controlled by a texture and a variable called LiquidAmount. The variable can be set via scripting or be updated automatically over time. The texture is used to mask out where the liquid can spread and in which order it spreads, it is also used to determine how the liquid fades away. 
 + 
 +== Texture == 
 +To create a liquid texture map two color channels must be used. The red channel is a gradient mask that controls where the liquid spreads and the order of the spread. The brighter the pixel is the earlier it is covered in liquid. If the pixel is set to (0,0,0) the liquid will be completely masked. The green channel is used to determine in which order the liquid will fade out. Fading out can be turned off in the material editor. 
 + 
 +{{ :​hpl3:​engine:​fade_in_out.jpg |}} 
 + 
 +When saving the texture it should be exported as a compressed 3dc dds. If the quality for the texture is not good enough then the texture can be saved as a tga, for this to work the red channel has to be copied in to the alpha channel and the green channel to the blue channel. 
 + 
 +== Scripting == 
 +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 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.
  
hpl3/engine/rendering.txt · Last modified: 2014/05/20 09:33 by nebej