Sometimes the model you have is not exactly the model you want.
While you can use a model or Avatar in Overte by just referencing the public URL of the model file, sometimes you will want to ad some extra flair or modifications.
One way of doing that is to load the file through an *.fst file, it is mostly used on avatars but it is also sometimes useful for loading models.
An *.fst file is just a text file that specifies the model to load, and a lot of optional modifications/overrides to apply when loading that file. They are in a Key=Value
pair format, though some are a bit different.
In it’s most basic form, it is something like this:
filename = Models/2MaterialCube.glb
Pretty pointless but it it worth noting that any file reference in it can be either relative (to the *.fst file), like the example above, or a absolute file url like this:
filename = https://silverfishbucket.s3.amazonaws.com/OverteForum/FST/Models/2MaterialCube.glb
Unfortunately there is no complete list of available properties but here is a small primer on some of the more useful ones.
Overriding materials.
materialMap = <JSON FORMAT MATERIAL DATA>
Only put one Material map line in the fst file. If there is more than one, only the last one is used. Compound all of your overrides into one
materialMap
. See example below.
For Avatars & models
You can override some or all of the materials on a model or avatar with the materialMap
property:
shinyMetalAll_glb.fst for example, will load this cube 2MaterialCube.glb But give the surface a nice metallic sheen, instead of the original matte finish.
That one overrides all the materials on a model but if you want to modify just some materials on the model you need to know the names of the different materials, a few options are:
- Open the model in blender and note the material names you want to modify.
- In Overte you can type in the console
Graphics.getModel("UUID").materialNames
to list material names for a model (replace with the ID of the model you want so see).
Now that you have the name of a material to modify, you can target it by replacing "all"
with something like this:
"[mat::Material_2]"
to override the material named “Material_2”. change_1_material.fst
A few more examples::
- Override 2 materials with the same material data: change_2_materials_to_the_same.fst
- Override 2 materials with separate material data: change_2_materials_to_2_different.fst
As you can see, with more overrides and complex materials it gets difficult to keep track on the syntax, I am not even sure how correct the examples are, I just found out what works. Oh, and if you make a mistake it will silently fail, so start simple
You can also reference by mesh index instead of name.
The material data is JSON formatted and the available are the same as for material entities, but minified, so no line breaks, extra spaces, or other special characters.
You can learn more about the available properties here:
https://forum.overte.org/t/the-secret-life-of-material-entities/49
Running an Avatar script.
script = <Script file>
Avatars only
Avatar scripts are interface scripts that are started when you equip an avatar, and stops when you change to a different avatar, It is very useful for adding custom functionality and features to avatars.
script = StaleBotScript.js
for example loads a script that changes some of the animations and drives the clamps that the avatar has instead of hands:
https://silverfish-freestuff.s3.amazonaws.com/Avatars/StaleBot/StaleBot.fst
Remap blendshapes
bs = <REMAP TO NAME> = <REMAP FROM NAME> = <MULTIPLIER>
Avatars and… I think Models
In Overte, only blendshapes (shapekeys) of specific names can be driven, manually by scripts or automatically by the engine (mouth and face movements) as listed here:
https://docs.overte.org/en/latest/create/avatars/avatar-standards.html#blendshapes
To use blendshapes with a different naming convention without modifying the model you can remap them in the fst file.
the multiplier remaps the range, so if it is set to 0.5, the BS will be driven to 0.5 if you (or the engine) sets the BS to 1.
Remap joint names
jointMap = <REMAP TO NAME> = <REMAP FROM NAME>
Avatars
Similar to blendshape remap. If your avatar armature does not have a naming conventions that works with Overte you can use jointmap
to remap them.
Specify Joint index.
jointIndex = <JOINT NAME> = <INDEX>
For Avatars & models
When loading a model with armature or an avatar, each joint gets assigned an index, if for some reason, you want a specific mapping you can manually assign them:
jointIndex = RightArm = 17
Flow bone properties.
flowPhysicsData = {<FLOW PHYSICS DATA>}
and
flowCollisionsData = {<FLOW COLLISION DATA>
Avatars
You can add dynamic flow to clothes, ears, tails and other appendages with flow bones. See docs.overte.org/en/latest/create/avatars/add-flow for more details, but note that it currently has a few bugs.
Scale.
scale = <SCALE>
For Avatars & models
Simple, set the scale of an avatar or model on load.
Note that Avatar scale extends are limited on most domains.
There are more.
Like:
NAME_FIELD = "name";
TYPE_FIELD = "type";
FILENAME_FIELD = "filename";
MARKETPLACE_ID_FIELD = "marketplaceID";
TEXDIR_FIELD = "texdir";
LOD_FIELD = "lod";
TRANSLATION_X_FIELD = "tx";
TRANSLATION_Y_FIELD = "ty";
TRANSLATION_Z_FIELD = "tz";
JOINT_FIELD = "joint";
COMMENT_FIELD = "comment";
And possibly more, I just don’t know how or why to use them, if You do feel free to add the information here by editing this post (it’s a WIKI) or comment.