changelog
This is an old revision of the document!
Foundation v. July Content Update
Material
You can now override the materials of generated when you import a 3D model. This can be useful for example to fix texture transparency issues for model created with Blender. All materials of a model can be found in a virtual directory under your model's file.
For example, in the Example 01 mod, there is a 3D model named fountain.fbx
in the directory models
, and this model uses a texture named FountainColor.png
.
The material can be found at the path [path to the FBX file]/Materials/[name of the texture without extension]
. In Example 01, here is how to enable alpha test on a material:
- buildings.lua
-- File path is "models/fountain.fbx" and texture name is "FountainColor.png" mod:registerAssetId("models/fountain.fbx/Materials/FountainColor", "FOUNTAIN_COLOR_MATERIAL") mod:override({ Id = "FOUNTAIN_COLOR_MATERIAL", HasAlphaTest = true
changelog.1564687486.txt.gz · Last modified: 2019/08/01 15:24 by maxime