GE Lua Documentation

Press F to search!

vehicleMetallicPaintDataFromColor

Definition


-- @/lua/ge/ge_utils.lua:943

function vehicleMetallicPaintDataFromColor(colorTable)
  if type(colorTable) ~= 'table' then
    log('W','vehicleMetallicPaintDataFromColor','colorTable parameter should be a table.')
    colorTable = {}
  end
  local metallic            = tonumber(colorTable[5]) or 0.2
  local roughness           = tonumber(colorTable[6]) or 0.5
  local clearcoat           = tonumber(colorTable[7]) or 0.8
  local clearcoatRoughness  = tonumber(colorTable[8]) or 0.0
  -- log('I','vehicleColor','metallic data: metallic = '..metallic..' roughness = '..roughness..' clearcoat = '..clearcoat..' clearcoatRoughness = '..clearcoatRoughness)
  return metallic, roughness, clearcoat, clearcoatRoughness
end

Callers