settings.json

This file can override node properties and material definitions. Since version 0.1.0 this file is optional and can be used for mass overriding of properties.

All keys except for material and node names are case sensitive.

Example

{

"materials" : {

"MyMaterial" : {

"shaderName" : "ksPerPixel",

"alphaBlendMode" : "Opaque",

"alphaTested" : false,

"depthMode" : "DepthNormal",

"properties" : {

"someProperty" : {

"valueA": 0.4,

"valueB": [0.4, 0.4],

"valueC": [0.4, 0.4, 0.4],

"valueD": [0.4, 0.4, 0.4, 0.4]

}

},

"textures" : {

"txDiffuse" : {

"slot" : 0,

"textureName" : "MyTextureName"

}

}

}

},

"nodes":{

"MyNode":{

"lodIn": 0,

"lodOut": 0,

"layer":0,

"castShadows": true,

"isVisible": true,

"isTransparent": false,

"isRenderable": true

}

}

}

nodes

This section overrides properties for single node objects. These options currently only work for mesh nodes.

    • MyNode: this should be replaced with the node name. Multiple wildcards ( * ) allowed. Multiple node node names can be separated with a vertical bar ( | ). e.g.: "*yNode|MyNode|M*N*o*e"

      • lodIn: this should be minimum distance where the node is visible, default 0

      • lodOut: this should be the maximum distance until the node disappears, default 0

      • layer: unknown, default 0

      • castShadows: can be set to false for performance optimizations, default true

      • isVisible: unknown. Maybe replaced by isRenderable, default true

      • isTransparent: unknown. Maybe only useful in combination with the right material, default false

      • isRenderable: controls if this node is drawn or not. Can be used for hidden physic walls, default true

materials

This section is needed for your own materials.

Here is a list of existing shaders with their input parameters: Shader values template

Any entry in properties/textures will remove all existing properties/textures entries from Blender or other material sections.

    • MyMaterial: this should be replaced with the material name from Blender. Same syntax like in node names allowed.

      • shaderName: this must be the name of a shader of the shader directory "system\shaders"

      • optional alphaBlendMode: must be one of the following values: "Opaque", "AlphaBlend" or "AlphaToCoverage", default "Opaque"

      • optional alphaTested: seems only be relevant for objects that are not set to "Opaque", default false

      • optional depthMode: must be one of the following values: "DepthNormal", "DepthNoWrite", "DepthOff", default "DepthNormal"

      • properties: a list of shader input properties

        • someProperty: the name of the property to set

          • optional valueA: a single float, default 0.0

          • optional valueB: a vector of 2 floats, default [0.0, 0.0]

          • optional valueC: a vector of 3 floats, default [0.0, 0.0, 0.0]

          • optional valueD: a vector of 4 floats, default [0.0, 0.0, 0.0, 0.0]

      • textures: a list of input textures for the shader

        • txDiffuse: the name of the input variable

        • slot: unknown, seems to be best to just increase it for every input texture, start at 0

        • textureName: the name of a Blender texture to use. It may be possible to even use textures not included in the .kn5 file. They probably only have to be in the right folder.