Shaders:IvandPBRShader: Difference between revisions

From Spring
Jump to navigationJump to search
Maddox (talk | contribs)
Created page with "'''Ivand's PBR shader's install instructions''' <br /> What you will need: <br /> # Latest maintenance engine. Grab it here: https://springrts.com/dl/buildbot/default/maintena..."
 
Maddox (talk | contribs)
No edit summary
Line 12: Line 12:
<br />
<br />
If this all sounds too complicated from the first sight, you can just clone this demo branch: "git clone -b pbrCUS_v1 https://github.com/lhog/Zero-K.git". It's all in there except for textures and .dae file
If this all sounds too complicated from the first sight, you can just clone this demo branch: "git clone -b pbrCUS_v1 https://github.com/lhog/Zero-K.git". It's all in there except for textures and .dae file
<br />
 
'''Texture Preparation'''
'''Texture Preparation'''
For efficient file size usage, your different maps must be disposed in separate channels of up to three images. All images and channels are optional and will reset to a default value or appearance if missing.
For efficient file size usage, your different maps must be disposed in separate channels of up to three images. All images and channels are optional and will reset to a default value or appearance if missing.

Revision as of 18:53, 27 September 2018

Ivand's PBR shader's install instructions
What you will need:

  1. Latest maintenance engine. Grab it here: https://springrts.com/dl/buildbot/default/maintenance/
  2. Custom unit shader gadget. Every mod has a bit different code, check if your game has it, if not copy from somewhere else. ZK variant: https://github.com/lhog/Zero-K/blob/pbrCUS_v1/LuaRules/Gadgets/api_custom_unit_shaders.lua
  3. PBR shader: https://github.com/lhog/Zero-K/blob/pbrCUS_v1/ModelMaterials/Shaders/pbr.lua
  4. PBR meta-material definitions: https://github.com/lhog/Zero-K/blob/pbrCUS_v1/ModelMaterials/10_pbr.lua
  5. model definition with PBR extension: https://github.com/lhog/Zero-K/blob/pbrCUS_v1/Objects3d/unit.dae.lua (replace "unit" by your actual unit model's name)
  6. unitDef file (ZK style, you might prefer your own): https://github.com/lhog/Zero-K/blob/pbrCUS_v1/units/unit.lua
  7. model and textures (not on github, provide your own). Make sure texture filenames and channel mappings are specified correctly in unit.dae.lua


If this all sounds too complicated from the first sight, you can just clone this demo branch: "git clone -b pbrCUS_v1 https://github.com/lhog/Zero-K.git". It's all in there except for textures and .dae file

Texture Preparation For efficient file size usage, your different maps must be disposed in separate channels of up to three images. All images and channels are optional and will reset to a default value or appearance if missing.

  • Texture1: Diffuse/Color (r, g, b) + Teamcolor (a)
  • Texture2: Occlusion (r) + Roughness (g) + Metallic (b) + Emissive (a)
  • Texture3: Normal (r, g, b) + Clipping (a)


PS.: Clipping is currently unsupported in this shader.