This post is about archiving information about Blender and howto guides on Blender.
Replies to this thread are mostly Historical, So please don’t be intimidated: Ill try to keep the OP updated with latest, and most valid information.
All of this applies for Blender 2.79. which is currently the latest. For now, use Blender Render / Opengl render instead of eevee renderer. Gltf is in the works.
Last Updated March 15 2018
- Pointing Towards the Blender Plugin
The blender plugin automates alot of the tiny details that when missed can cause pain and wonder why things dont work. So it is highly suggested to be using that with the general practises and information available on this page
- 1 Blender Unit = 1 Unit in HF (therefore meter).
- Imported avatars are also scaled down by 0.01 in Blender, so they actually are truly massive.
- As far as we know, the new versions of Blender seem to do automatic world orientation correctly.
- Default FBX export settings now work: but to save space avoid Leaf Bones.
- Keep textures in same directory as the model if embedding the Textures.
- While FBX supports Vertex Colors, the Blender -> fbx export’s Vertex Colors vertex positions get scrambled in high fidelity. they work fine in UE4, and Unity however, so its something with the interpreter. https://worklist.net/20524
Current work around is to export as dae and convert it to FBX.
Good General Practises
- Use PNG or JPGs only. TGA is not supported
- Avoid having too many separate mesh groups. Keep it below 4, preferably 1. This is especially true if importing avatars from SL which use prims instead of mesh.
Good Avatar Practices :
- ** Avatar models Must have Geometry which is weighted to the Head**: Without this the Physics will bork out as Hifi Cannot determine what physics shape the avatar must use.
- Rigging to a Absolute T-pose so that all bone rotations are relatively same.
- Full Body Avatar models (no textures embedded) should aim for 3 mb mesh size (less than 15k polygons total + UV + weights + standard armature).
- Head Avatar model should aim for less than for 5 k polygons. (that is still a LOT)
- Try to keep the total size of a full avatar with textures less than 15mb. HF does a lot of throttling so lower the better and more visibility compared to more polygons: While your avatar is priority for you, this works for everyone else, so the more resources your avatar uses the more likely its going to be cut first from the rendering que. You can ofcourse mitigate this by using LOD models.
- Aim for more detail on the face.
Optimizations in FBX file
- If you have your own web service or plan on reusing already uploaded textures, keep the Path Mode in Auto, and manually point to the texture directory instead.so that you can keep reusing a library of textures to save bandwidth and server space instead. You should keep textures in a consistant path.
- If you are using
dropboxa service that hashes your files to host avatar files temporarily while experimenting, make sure to set Path Mode to Copy, and Check the Embed Textures button. Credit goes to @Judas.
- Keep only the mesh and the armature during export Everything extra adds to the bounding box size and file size.
- You DO NOT have to bake animations unless making animations only.
- If you are exporting animations, export only the armature. This allows the animation to be small and quick to load and cross compatible with other avatars or objects using the same body.
- Multiple UV Maps on a single mesh is not supported: Instead combine your UV maps into a single one, or separate your mesh on these components to separate parts. The First UV Map in the list will be used for the textures.
- Make sure you have as small amount of UV maps on the avatar as possible.
Textures and Materials
- Before working on textures, it is highly suggested you have an Zone with a skybox applied to allow for reflections to show best.
- Keep textures below 2048 px x 2048 px. Any larger size get resized and are just a waste of bandwidth for both the servers and clients
- Use PNG or JPGs only. TGA is not supported
- Avoid using too many separate materials. Instead favor a single material and texture over multiple smaller ones.
- If planning to Embed Textures, make sure to have the textures in the same directory as the model before binding the textures. Embedded Textures mode in Blender doesn’t otherwise bind the textures properly to fbx
- If you want to have transparency, use Mask Transparency.
- You must apply a material to the model, or it will not show or behave strangely.
- High Fidelity binds textures from
- Alpha comes from the Albeido alpha mask
- Binding Reference: Note, Blender Specular Color / Metallicness now allows gradients.
- Blender Add-on now contains a Tool allowing for faster and easier binding of Textures.
- Texture Binding video tutorial available (legacy)
- Export Physics mesh as Obj.
- Physics mesh must consist of convex mesh.
- There can be multiple Physics mesh, They however cannot be joined into a single mesh object and must be kept separate (they must be convex)
- You may use V-ACHD to generate the Convex Mesh groups. See tutorial at https://alphas.highfidelity.io/t/creating-collision-shapes-within-blender/6982/
- If a Mesh vertice does not have a weight assigned and has an armature it will fold toward a client avatars neck. This occurs also for entities
Shapekeys and FST.
- (Incomplete) List of Shapekeys used by Faceshift
- As long as shapekeys (in Blender, referenced as blendshapes in docs) are named the same as in the Faceshift Rig, They will work out of the box.
- You can define maximum constraints for shapekeys in the fst file or bind Shapekeys to other shapes in the following manner:
bs = <FS Shape Key> = <Model shape key> = <Float value>
bs = MouthDimple_L = Smile_Left = 0.25
This affects ALL meshes using the shapekey Smile_Left
- You can also do advanced selection of shapekeys ones if you have a multimesh avatar such as:
bs = MouthDimple_L = mesh_id.Smile_Left = 0.25
So that only mesh with the id of mesh_id will have its Smile_Left value set to 0.25 when FS shapekey Mouth Dimple L value is 1.
- You can combine complex shape mixes for a a shape such as
bs = MouthDimple_L = mesh_id.Left_Lip_Left= 0.25 bs = MouthDimple_L = mesh_id.Left_Lip_Up = 0.5
To mix Left_Lip_Left and Left_Lip_Up shapekeys together when MouthDimple_L shape is being set.
- A word of caution: avoid having an extra period in the shapekey name or mesh_id these as it will break the shapekey_binding: Default Untitled# mesh_ids can also cause this, so name your meshes.
- Also avoid stacking the same shapekey_value in the same FS Shape key as this will cause the values to be added to each other.
Mixamo -> Blender -> High Fidelity Flow
General FST notes:
*Instead of binding Hips as the Root bone, bind the armature object instead as the root. This should solve the bounding box issue. Not allowing Animations to shift Hips should help after.
- If the above does not fix the bounding box issue, you can also add an additional root bone that should be the “root” - Thanks @Triplelexx
- You can apply absolute paths to
- You can apply rx, ry, rz for rotation overrides, and tx, ty, tz for translation overrides.
- Best to do all of the shapes, since you never know if a user will have Faceshift or is using the camera tracking.
- Make sure you bind the following as freejoints on fst package for them to work with the hand tracking solutions: Confirmed.
RightShoulder RightArm RightForeArm RightHand LeftShoulder LeftArm LeftForeArm LeftHand.
Most of these are bound by default, however I am not sure if the Interface packager actually writes them into the file (only Free joint I see occasionally is just the first entry). Not sure if this is fully true, but the IK Constraints do not display if these are not set.
- (Depricated) You used to be able to inject LOD models into the fst file by adding the following to it:
lod=<PathToMediumModel>.fbx= 10 lod=<PathToLowModel>.fbx= 15 lod=<PathToLowestModel>.fbx = 20.
Cross Suite animations now work: There are no longer any issues with rotations as long as Pre/Post Rotations setting is enabled in the client (this may be off by default).
Make sure Simplify is set to 0, and there are no FBX Root defined in the Armatures tab.
Cross Suite attachments work. Just make sure to follow the standard if set to be “soft”. Any extra bones in the clothing will behave as if not bound to anything if the avatar it is bound to does not have them.
You do not have to follow the standards if you just want to make a unique avatar that isnt compliant with the other avatar animations or Clothing.
You can play animations even if your avatar doesn’t have bones for it. If you avatar has the bones they will be animated. This means Animating an Tail or Ear or Cape can be done and then applied as an additional idle animation on your avatar if your avatar has the bones for them.