Material - Normal map: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replace - "{{enHeader}}" to "")
m (Text replacement - " (={2,})([^ = ])(.*)([^ = ])(={2,}) * " to " $1 $2$3$4 $5 ")
Line 1: Line 1:




===Simple material with Normal map, per pixel specular reflections===
=== Simple material with Normal map, per pixel specular reflections ===


This material allows surface rendering with roughness and reflections. Normal map creates curvature on surface and may as well hold inside alpha-channel saved Black&White map limiting specular reflection locally (multiplying values specular[]={R,G,B,A} )
This material allows surface rendering with roughness and reflections. Normal map creates curvature on surface and may as well hold inside alpha-channel saved Black&White map limiting specular reflection locally (multiplying values specular[]={R,G,B,A} )

Revision as of 18:48, 31 January 2021


Simple material with Normal map, per pixel specular reflections

This material allows surface rendering with roughness and reflections. Normal map creates curvature on surface and may as well hold inside alpha-channel saved Black&White map limiting specular reflection locally (multiplying values specular[]={R,G,B,A} )

Irradiance table replaces here setting specularPower

PixelShaderID="NormalMap";
VertexShaderID="NormalMap";

class Stage1
{
   texture="ofp2\Vehicles\Land\Wheeled\LandRover\LR_op_1\Data\lr_op_hulla_NS.paa"; 
   // path to normal map texture. Alpha in NS map can be used to locally weaken specular reflection at surface
   uvSource="tex";
   class uvTransform
   {
      aside[]={1,0,0};
      up[]={0,1,0};
      dir[]={0,0,1};
      pos[]={0,0,0};
   };
};

class Stage3
{
   texture=”#(ai,32,128,1)irradiance(8)”; 
   // procedural irradiance table for per pixel specularity calculations, last number inside brackets defines specular power
       see more in irradiance deffinition above
   uvSource="none";
};