Dev - Assets - Models
If you want to create models for Stranded III you need the following:
- Unity 3D with the Stranded III project.
- Blender or any other 3D modelling software which supports FBX export.
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
- Check Materials
- Make sure that all materials for the model have the proper texture.
- Choose proper shaders. Please refer to the "Shaders"-section below!
- Adjust material settings as required. Careful: Depending on naming some materials might be used by multiple models!
- Assign AssetBundles
- Select your model (the FBX file) in Unity
- On the bottom of the inspector there should be a label "AssetBundle" with a drop down.
- 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.
- 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:
- S3/Solid Fully opaque, no transparency. Supports color tinting, smoothness and metallic.
- S3/SolidGlow Like S3/Solid but supports glow effect. Glow intensity is controlled by additional grayscale texture (black=no glow, white=max glow).
- S3/Cutoff Opaque with low transparency parts (alpha channel) fully cut off. Alpha threshold for cut off can be defined. Supports color tinting.
- S3/CutoffShakeLike S3/Cutoff but with wind sway. No sway at bottom of texture (y=0). Max sway at top of texture (y=1).
- S3/CutoffShakeTexLike S3/Cutoff but with wind sway. Sway intensity is controlled by additional grayscale texture (black=no sway, white=max sway).