Dev - Assets - Models

If you want to create models for Stranded III you need the following:

Export Models in Blender

TODO

Setup Models in Unity

After exporting the FBX file and textures to the Stranded III Unity project, you have to adjust some settings

  1. Check Materials
    1. Make sure that all materials for the model have the proper texture.
    2. Choose proper shaders. Please refer to the "Shaders"-section below!
    3. Adjust material settings as required. Careful: Depending on naming some materials might be used by multiple models!
  2. Assign AssetBundles
    1. Select your model (the FBX file) in Unity
    2. On the bottom of the inspector there should be a label "AssetBundle" with a drop down.
    3. Click the dropdown and select one of the AssetBundles. For models it's recommended to use an AssetBundle in the "models" folder. You may also create a new AssetBundle.
    4. Write down / remember the filename of your asset and the AssetBundle. These are required for the entity definition!

Write / Adjust Definition

To make your new model available in the game you either have to add a new entity definition or you can edit an existing definition and change the "model" setting. model = AssetBundle:AssetName AssetBundle has to be the AssetBundle as defined in Unity. e.g. "models/basic". AssetName must be the filename of your asset WITHOUT extension. e.g. If your model is called "tree.fbx" it must be "tree". So in this example the full line should look like this: model = models/basic:tree Note that most Stranded III definitions use the %id-placeholder in the model setting. %id will automatically replaced with the ID of the entity. Example: object tree { model = models/basic:%id } Here %id will be replaced with tree because that's the ID of the object. %id is optional and you don't have to use it. It's good practice however to call the model file like the ID of the entity it is used for. This way it is easier to organize things.

Shaders

It is recommended to only use shaders from the "S3"-category. Every used shader should support Unity's crossfade (LOD_FADE_CROSSFADE) for transparency fading.

This is what the S3-shaders do: