Material - Normal map: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "^ " to "")
m (Text replacement - ";[ ]+ " to "; ")
 
Line 10: Line 10:
  class Stage1
  class Stage1
  {
  {
     texture="ofp2\Vehicles\Land\Wheeled\LandRover\LR_op_1\Data\lr_op_hulla_NS.paa";  
     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''
   '' // path to normal map texture. Alpha in NS map can be used to locally weaken specular reflection at surface''
     uvSource="tex";
     uvSource="tex";
Line 24: Line 24:
  class Stage3
  class Stage3
  {
  {
     texture=”#(ai,32,128,1)irradiance(8)”;  
     texture=”#(ai,32,128,1)irradiance(8)”;
     ''// procedural irradiance table for per pixel specularity calculations, last number inside brackets defines specular power
     ''// procedural irradiance table for per pixel specularity calculations, last number inside brackets defines specular power
         see more in irradiance deffinition above''
         see more in irradiance deffinition above''
     uvSource="none";
     uvSource="none";
  };
  };

Latest revision as of 00:54, 8 August 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";
};