Export Avatar
- Last UpdatedJul 04, 2023
- 1 minute read
Before exporting the Avatar mesh, you should define which meshes are part of the Avatar and whether they are skinned.
-
This information is stored in the Dummy object user buffer.
-
Animations are exported separately. See Export Animation.
Code example
This is an example of defined meshes for avatar. Define each mesh that the Avatar uses as a skinned or not skinned object to ensure they are exported.
$CharacterV1
{
iVersion = 1
szID = Andrea //ID Name of the avatar
$Mesh //Definition of a skinned mesh
{
szName = body
szMaterial = VcTxtLmEmBmGmSpHlit
szCubeMap = salva_cubemap.dds
szLight = avatar_Omni01
bSkinned = true
byMaxWeights = 2
fEmissiveMul = 1
fCubeIntensity = 0.01
fBaseLitVal = 1
}
$Mesh //Definition of a not skinned mesh
{
szName = masks
szMaterial = VcTxtLmEmBmGmSpHlit
szCubeMap = salva_cubemap.dds
szLight = avatar_Omni01
bSkinned = false
szBoneLink = "Bip001 Head" //Parent bone of the object
byMaxWeights = 2
fEmissiveMul = 1
fCubeIntensity = 0.01
fBaseLitVal = 1
}
}
OmniLight
The Omni Light requires this code in the user buffer:
$LightParams
{
bAffectOnlyIfAssigned = true
}
This parameter excludes the light from the real time light calculation, and is only used for the Avatar specular.
For exporting, the Avatar selects the Dummy (with the mesh definition), the Omni Light used by the Avatar meshes shaders and exports them using the export selected.