Skip to content

Effects

Chris Adderley edited this page Jan 7, 2021 · 4 revisions

Effects drive actual... effects. They consist of a Effect Model with a Material and Texture, and a set of Effect Modifiers. You can have any number of effects on a model

There are a large number of config values to set up for an effect but most of these are generated through the Ingame Editor. You can skip this entire page unless you want to know more about the config structure.

EFFECT Configuration Structure

Let's look at the structure of an EFFECTS block.

EFFECT
{
  name = mainEffect
  parentName = thrustTransform
  MODEL
  {
    MATERIAL
    {
      TEXTURE
      {
        ...
      }
      FLOAT
      {
        ...
      }
      COLOR
      {
        ...
      }
    }
  }
  MODIFIER
  {
   ..
  }
  ...
}

The block is composed of a couple of top level parameters, a MODEL node and a set of MODIFIER nodes. Broadly:

  • The MODEL node controls which effect model to load, what its scale and position is, what material to apply to it
  • The MODIFIER nodes control which modifiers to apply to the MODEL in response to inputs from the Controllers.

We will discuss the top level parameters only here. Both are required for the effect to function.

  • name: this is a user-specified unique name for this effect.
  • parentName: this is the GameObject in the model to parent your effect to. typically this will be the thrustTransform The standard operational procedure is to use the ingame editor to generate the entire EFFECT block for you. However, for the ingame editor to be usable, you need to generate a couple of fields yourself.

Specify Base Fields

As they are mandatory, specify the name and parentTransform fields. The EFFECT node should now look like this:

EFFECT
{
  name = mainEffect
  parentName = thrustTransform
}

Set up the MODEL

The ingame editor can't select and load models, so you have to do this. Add the MODEL node and configure it.

Setting up the MODEL node is pretty simple, just specify the path to your model. This is GameData-relative. The EFFECT node should now look like this:

EFFECT
{
  name = mainEffect
  parentName = thrustTransform
  MODEL
  {
    path = Waterfall/FX/fx-simple-plume-ion
  }
}

Set up the MATERIAL(s)

The MATERIAL block controls the material of the loaded model. You will need to add one MATERIAL node for each material you want to be able to edit. Typically there is one material for each mesh in the model.

Add the node as a child of the MODEL node. Setting up the MATERIAL node is fairly complex - luckily the ingame editor will handle most of that for you. You just need to assign shaders and textures in the config.

Shader assignment is simple:

  • transform: the gameobject to apply the material changes to
  • shader: the name of the shader to apply to the mesh

The EFFECT node should now look like this:

EFFECT
{
  name = mainEffect
  parentName = thrustTransform
  MODEL
  {
    path = Waterfall/FX/fx-simple-plume-ion
    MATERIAL
    {
      transform = CylMesh
      shader = Waterfall/Additive
    }
  }
}

Texture assignment requires the creation of a child TEXTURE node. You can have more than one if you need to assign more textures. This has two parameters:

  • textureSlotName: the shader texture slot name to assign
  • texturePath: the GameData relative path of the texture

The EFFECT node should now look like this:

EFFECT
{
  name = mainEffect
  parentName = thrustTransform
  MODEL
  {
    path = Waterfall/FX/fx-simple-plume-ion
    MATERIAL
    {
      transform = CylMesh
      shader = Waterfall/Additive
      TEXTURE
      {
        textureSlotName = _MainTex
        texturePath = Waterfall/FX/fx-ion-noise
      }
    }
  }
}

You are now down

Full Example

This is a fully generated example of an EFFECT block.

EFFECT
{
  name = mainEffect
  parentName = thrustTransform
  MODEL
  {
    path = Waterfall/FX/fx-simple-plume-ion
    positionOffset = 0,0,-0.0399999991
    rotationOffset = 0,1,0
    MATERIAL
    {
      transform = CylMesh
      shader = Waterfall/Additive
      TEXTURE
      {
        textureSlotName = _MainTex
        texturePath = Waterfall/FX/fx-ion-noise
        textureScale = 1,1
        textureOffset = 0,0
      }
      FLOAT
      {
        floatName = _TintFalloff
        value = 0
      }
      FLOAT
      {
        floatName = _Falloff
        value = 3
      }
      FLOAT
      {
        floatName = _Fresnel
        value = 3
      }
      FLOAT
      {
        floatName = _FresnelInvert
        value = 0
      }
      FLOAT
      {
        floatName = _Noise
        value = 0.5
      }
      FLOAT
      {
        floatName = _Brightness
        value = 0.100000001
      }
      FLOAT
      {
        floatName = _SpeedX
        value = 0
      }
      FLOAT
      {
        floatName = _SpeedY
        value = 8
      }
      FLOAT
      {
        floatName = _TileX
        value = 1
      }
      FLOAT
      {
        floatName = _TileY
        value = 1
      }
      COLOR
      {
        colorName = _StartTint
        colorValue = 0,1,0.655179501,0.582910895
      }
      COLOR
      {
        colorName = _EndTint
        colorValue = 1,1,1,1
      }
    }
    MATERIAL
    {
      transform = CylMeshOuter
      shader = Waterfall/Additive
      TEXTURE
      {
        textureSlotName = _MainTex
        texturePath = Waterfall/FX/fx-ion-noise
        textureScale = 1,1
        textureOffset = 0,0
      }
      FLOAT
      {
        floatName = _TintFalloff
        value = 0
      }
      FLOAT
      {
        floatName = _Falloff
        value = 1.5
      }
      FLOAT
      {
        floatName = _Fresnel
        value = 5
      }
      FLOAT
      {
        floatName = _FresnelInvert
        value = 0
      }
      FLOAT
      {
        floatName = _Noise
        value = 0.800000012
      }
      FLOAT
      {
        floatName = _Brightness
        value = 0.200000003
      }
      FLOAT
      {
        floatName = _SpeedX
        value = 0
      }
      FLOAT
      {
        floatName = _SpeedY
        value = 50
      }
      FLOAT
      {
        floatName = _TileX
        value = 4
      }
      FLOAT
      {
        floatName = _TileY
        value = 0.100000001
      }
      COLOR
      {
        colorName = _StartTint
        colorValue = 0,0.753699601,1,1
      }
      COLOR
      {
        colorName = _EndTint
        colorValue = 1,1,1,1
      }
    }
    MATERIAL
    {
      transform = PlaneMesh
      shader = Waterfall/Additive
      TEXTURE
      {
        textureSlotName = _MainTex
        texturePath = Waterfall/FX/fx-ion-noise
        textureScale = 1,1
        textureOffset = 0,0
      }
      FLOAT
      {
        floatName = _TintFalloff
        value = 0
      }
      FLOAT
      {
        floatName = _Falloff
        value = 3
      }
      FLOAT
      {
        floatName = _Fresnel
        value = 5
      }
      FLOAT
      {
        floatName = _FresnelInvert
        value = 3
      }
      FLOAT
      {
        floatName = _Noise
        value = 0
      }
      FLOAT
      {
        floatName = _Brightness
        value = 0.600000024
      }
      FLOAT
      {
        floatName = _SpeedX
        value = 0
      }
      FLOAT
      {
        floatName = _SpeedY
        value = 1
      }
      FLOAT
      {
        floatName = _TileX
        value = 1
      }
      FLOAT
      {
        floatName = _TileY
        value = 1
      }
      COLOR
      {
        colorName = _StartTint
        colorValue = 0,0.614129484,1,1
      }
      COLOR
      {
        colorName = _EndTint
        colorValue = 1,1,1,1
      }
    }
  }
  SCALEMODIFIER
  {
    name = throttleScale
    controllerName = throttle
    transformName = CylMesh
    combinationType = REPLACE
    useRandomness = False
    randomnessController = random
    randomnessScale = 1
    xCurve
    {
      key = 0 0.45 0 0
      key = 1 0.45 0 0
    }
    yCurve
    {
      key = 0 0.6 0 0
      key = 1 1 0 0
    }
    zCurve
    {
      key = 0 0.45 0 0
      key = 1 0.45 0 0
    }
  }
  FLOATMODIFIER
  {
    name = inner
    controllerName = throttle
    transformName = CylMesh
    combinationType = REPLACE
    useRandomness = False
    randomnessController = random
    randomnessScale = 1
    floatName = _Brightness
    floatCurve
    {
      key = 0 0 0 0
      key = 1 0.1 0 0
    }
  }
  FLOATMODIFIER
  {
    name = outer
    controllerName = throttle
    transformName = CylMeshOuter
    combinationType = REPLACE
    useRandomness = False
    randomnessController = random
    randomnessScale = 1
    floatName = _Brightness
    floatCurve
    {
      key = 0 0 0 0
      key = 1 0.2 0 0
    }
  }
  SCALEMODIFIER
  {
    name = globalScale
    controllerName = throttle
    transformName = Waterfall/FX/fx-simple-plume-ion(Clone)
    combinationType = REPLACE
    useRandomness = False
    randomnessController = random
    randomnessScale = 1
    xCurve
    {
      key = 0 0.4 0 0
    }
    yCurve
    {
      key = 0 1 0 0
    }
    zCurve
    {
      key = 0 0.4 0 0
    }
  }
  FLOATMODIFIER
  {
    name = tGlow3
    controllerName = throttle
    transformName = PlaneMesh
    combinationType = REPLACE
    useRandomness = False
    randomnessController = random
    randomnessScale = 1
    floatName = _Brightness
    floatCurve
    {
      key = 0 0 0 0
      key = 1 0.9 0 0
    }
  }
}