首页 > 代码库 > UMA - Unity Multipurpose Avatar

UMA - Unity Multipurpose Avatar

UMA - Unity Multipurpose Avatar

 

UMA version 1.0.1.0R Unity 4.3

What is UMA?

UMA - Unity Multipurpose Avatar, is an open avatar creation framework, it provides both base code and example content to create avatars. Using the UMA pack, it ?s possible to customize the code and content for your own projects, and share or sell your creations through Unity Asset Store.

Overview

Avatars generated by UMA framework

Close on detailed avatar

UMA works both on Unity PRO and free licences, but benefits from PRO features for accelerating UMA creation steps.

 

This project has been updated for Unity 4.3, as it will require access to the Mecanim avatar API on following releases.

UMA can be integrated and used on mobile, standalone and web player builds and included shaders require Shader Model 2 or superior. It has not been tested on console builds. If you re targeting old devices, it ?s recommended to reduce texture resolution and take other optimizations measures to avoid memory issues.

UMA is designed to support multiplayer games, so it provides code to pack all necessary UMA data to share the same avatar between clients and server. It may be necessary to implement a custom solution depending on your needs to optimize and reduce serialized data.

Performance and memory usage

UMA framework provides a set of high resolution content, flexible enough for generating a crowd with tons of random avatars or high quality customized avatars for cutscenes. Source textures are provided for generating final atlas resolution of up to 4096x4096. Depending on the amount of extra content being imported to the project, it might be necessary to handle memory management or reduce texture resolution.

Every UMA avatar created has it ?s own unique mesh and Atlas texture, requiring extra memory. The standard atlas resolution of 2048x2048 is recommended for creating a small number of avatars, for games creating on a huge amount of avatars, using lower atlas
resolution or sharing mesh
and atlas data will be
necessary.
UMA was initially planned to
provide 50 avatars on screen,
but the latest version can
easily handle a hundred of
unique avatars.

100 Avatars in real time

Free and PRO license differences for UMA

 

UMA results on PRO and Free licenses are meant to be as similar as possible,however calculating a UMA atlas can be handled differently. For PRO it ?s possible tocreate the atlas using RenderTextures, so texture calculation is very fast. For Freelicense, it requires processing each pixel individually, so it takes considerably moretime and processing power. It ?s possible to split this calculation over as many framesas necessary to avoid drastically lowering frame rate, but higher resolution textureswill require a considerable amount of time to be processed. The gameObjectUMAGenerator provides an option for using PRO or Free, I ?ve left this as a way PROusers testing performance of content on indie projects, for example. The Free licenseusers need to uncheck the usePRO checkbox on UMAGenerator.

How does UMA work?

Creating 3d characters is a time consuming process that requires a number ofdifferent knowledge areas. Usually, each character is created based on an unique meshand rig and is individually skinned and textured.

When developing games that might require a huge amount of avatars, it ?sexpected to develop a solution to handle avatar creation in an efficient way. Usuallythey start from a set of base meshes and follow standards to be able to share bodyparts and content. Each project ends up with a different solution, and it ?s hard toshare content or code between them.

UMA is meant to provide an open and flexible solution, which makes it possibleto share content and code between different projects, resulting in a powerful tool forthe entire community.

UMA has two main goals: Sharing content across avatars that uses same basemesh and optimizing created avatars, while providing the ability to change avatarshape in realtime.

To achieve that, I ?ve created a special rig structure that handles bonedeformation in a strategic way that makes it possible to deform UMA shape based onchanges on bones position, scale and rotation.

UMA example avatars are based on two base meshes, a male and a female.Each of them can share clothing and accessories, and can be used as a base on thecreation of new meshes for different races.

Because clothes and accessories are skinned to UMA base mehes, they receivethe same influece of UMA body shape, so any mesh deforms to any UMA body.

This way, if you have an armor or dress, it can be shared between all male orfemale avatars, even if they have very different body shapes.

 

many different textures when generating the final atlas. Those extra textures can beused to create even more variation to each avatar, and can be used for clothes, detailsand many other possibilities.

UMA optimizationoccurs in many steps: EachUMA avatar can have anunique texture atlas providingall necessary texture data, thismakes it possible to have eachUMA generating a singledrawcall, in the case of a singlematerial being used.

All UMA parts are bakedtogether into one final mesh,which reduces the calculationsinvolved in processing. JoenJoensen from Unity teamimplemented an advancedskinned mesh combiner toaccomplish this.

UMA avatars generated based on same content and different shapes

On UMA latest version, the old CombineInstance() code is still available in casethere ?s no intention on using extra bones that would be dinamically included onavatar. The legacy code requires less processing time, but provides limited results.

How content is created?

 

Set of High poly meshes based on UMA final clothes.

Creating content for UMA doesn ?t require much extra knowledge beyond theusual asset creation pipeline. There are three main type of content: Base meshes, Slotsand Overlays.

Base Meshes

UMA provides two starting base meshes, a male and a female. It ?s possible tocreate completely different and unique base meshes and still take advantage of UMA.As all content uses base meshes as reference, if you create a minotaur base mesh andare able to keep the same data from the original male torso base mesh, all clothesbased on that male torso can be shared with the new Minotaur mesh.

For a completely different race, such as horses, you will need unique content.This could then be shared with
other similar races, like unicorns
and even dragons. Male and
female Base meshes were created
considering the average volume
those bodies would be able to
reach using the adjustments in the
UMA rig.

Uma Female and Male base meshes.

Slots

 

All UMA content that provides a mesh is a slot. Slots are basically containersholding all necessary data to be combined with the rest of an UMA avatar.

For example the base meshes provided are normally split into several pieces,such as head, torso and legs... and then implemented as slots which can be combinedin many different ways.

An UMA avatar is in fact, the combination of many different slots, some ofthem carrying body parts, others providing clothing or accessories. Lots of UMAvariation can be created simply by combining different slots for each avatar.

Slots also have a material sample, which is usually then combined with all otherslots that share same material. Female eyelashes for example, have a uniquetransparent material that can be shared with transparent hair. It ?s necessary to set amaterial sample for all slots, as those are used to consider how meshes will becombined. In many cases, the same material sample can be used for all slots.

UMA standard avatar material uses a similar version of Unity ?s BumpedSpecular Shader, but UMA project provides many other options.

The big differencebetween body parts and othercontent is that body parts needto be combined in a way thatthe seams wouldn ?t be visible.To handle this, it ?s importantthat the vertices along meshseams share the same positionand normal values to avoidlightning artifacts.

Example of Male slots.

To handle that, we provide a tool for importing meshes that recalculate thenormal and tangent data based on a reference mesh. UMA MaterialBuilder will beexplained in following pages.

Overlays

 

Each slot requires at least oneoverlay set but usually receives a listof them. Overlays carries all thenecessary textures to generate thefinal material(s) and might have extrainformation on how they are mapped.The first overlay in the list providesthe base textures, and all otheroverlays included are combined withthe first one, in sequence, generatingthe final atlas.

UMA standard shader requirestwo textures provided by overlays,one texture for Diffuse color (RGB) +overlay mask (A) and one texture forNormal map(GA), Specular (R) andGloss (B). These non-standard textureslet us compress a lot of information inonly two textures, reducing finalmemory usage.

Together, Joen Joensen and I have worked on “UMA u ”,
that receives 3 standard textures for Diffuse(RGB) + mask(A), Normal map(RGB) andspecular(RGB) + gloss(A), and compacts the data into the two textures describedabove. In the process, the specular color is reduced to one channel of data, theresulting average color of the 3 channels provided.

FwgPT‘ “BfC AuM ” http://www.manufato.com/?p=902, Joen and I worked together to reachtwo shader that handle specular color based on diffuse color reference resulting inDielectric and conductor materials.

I ?ve already managed to integrate some of the most common Unity shadersinto UMA and the adjusts required are quite simple. Even more advanced shaders canbe integrated and used, keep in mind it ?s possible to provide extra textures on each

Example of overlay composition

overlay, this way, it ?s possible to include displacement maps, Sub surface scatteringmasks or any necessary data.

 

Asset creation pipeline

UMA project provides an UMA content creator pack, it ?s a zipped folder with allnecessary base meshes and textures for creating your own content. It provides:

- base diffuse, specular and normal map textures
- UV layout reference images
- Male and female base meshes in .OBJ
- Rigged and Skinned base meshes in .FBX file format- .ZTL files for Zbrush users

- An open .Blend file for blender users

I ?ve spent a long time recording and producing video tutorials(http://www.youtube.com/user/fernandoribeirogames) to cover all the basic process ofcontent creation, but the knowledge for actually working on any 3d software isprerequisite.

The overall knowledge for generating UMA content is 3d modeling, rigging,skinning and texturing. It ?s also possible to work on existing content already available.For example, if you have an tshirt slot, with the right texture work it ?s possible toprovide an chain mail overlay without extra knowledge of modeling, rigging orskinning.

Texturing and UV mapping

 

Both UMA male and female base textures have a specific resolution. Below isthe list of those base texture sizes in
pixels:

- Head : 2048x1024
- Body : 2048x2048
- InnerMouth : 512x512- Eyes : 512x512

Male body UV layout

Those values are specific to the provided base meshes as a standard for anyonecreating content for them. If you plan following a different standard, it ?s possible touse any different resolution.

When creating new content for UMA, if you ?re aware it will be covering an areaof UMA body texture, it ?s possible to use that UV area for the new content texture, if itoffers enough space. This example can be seen on Female tshirt and hair, both of themsave atlas space, having those textures as overlays for body base texture instead ofbeing base textures themselves.

Also, any overlay texture and it ?s covered base textures don ?t need to keep thesame size. For example, FemaleUnderwear01 overlay covers only the left half of thebase, so it ?s possible to have that overlay with half the width of body base texture.

The Rect provided together with the overlay elements is responsible for keepinginformation of the positioning adjust of the cropped overlay, relative to base texturecoordinates.

It ?s possible to provide overlays that will receive color adjusts at atlas creation.In those cases, usually the predominant color is white or gray in those areas, to have aneutral influence over final color.

Above image illustrates the use of a cropped overlay in junction with Eye base texture togenerate iris color variation

 

In other hand, UMA 1.0.1.0R don ?t support combining textures with differentoriginal size: Even cropping an overlay removing the unused masked area, the originaloverlay size should be the same of the base texture. So if you provide a croppedoverlay for eyebrows, it requires a Rect data relative to the 2048x1024 head referencetexture. Providing a non cropped overlay with smaller or bigger resolution than thebase overlay might generate error messages.

3d modeling

It ?s possible to integrate any 3d mesh into an UMA avatar, it ?s important tofollow the same optimization guidelines usually used for traditional characters andclothes, as topology and vertex count. I ?ve included meshes with both uniform and nonuniform polygon placement, it ?s important to keep in mind when each case can beused. The same way, I ?ve worked
both on meshes mostly quad based,
and meshes entirely based on tris
before exporting process. All
content can be integrated despite
those differences, but stretched
polygons might cause poor lightning
results, especially visible when not
using normal maps.

Female and Male jeans completely different topology

Rigging and skinning

 

This is where all the UMA magic happens. All shape variations we can achieveon UMA avatars are a consequence of changing bone scales, positions and rotations. Amesh correctly following those changes depends on rigging and skinning entirely andan incorrect skinning process might lead to issues such as a clothing pieces notfollowing the same shape variation as the body.

I ?ve provided base meshes with rig and skin data because most 3d software hasspecific tools that allow users to transfer bone weight data between different meshesavoiding most of the time consuming process involved. I ?ve shown this being done inBlender at some video tutorials (http://www.youtube.com/watch?v=ImD6APS0xek), butthe same can be done with XSI Gator or other specific solutions.

For dresses or armor, simply projecting those values might not be enough, andskinning knowledge may be necessary for best results following body variations.fu guwg fwuf-

uf g T f UMAg,f uable to change the arm scale both in uniform and non-uniform ways, but having annon-uniform scale deforms all child bones too, so those changes need to be applied tothe child bones working in pair. It ?s also important to keep in mind it ?s always thesechild bones that carry the skinning data, as it will always change directly, and under theinfluence of the parent bone.

Male jeans skinning and male base mesh skinning. Skinning Data has been projected withBlender Transfer weights tool

3D software

 

Blender is UMA standard content creation software, because it ?s open sourceand accessible for all developers. Being the standard means I ?ll provide most of the 3dtutorials on this specific application but keep in mind most of the available softwareshave a set of tools to handle what I ?m doing in blender.

Initially, I planned including here the standard import and export setting foreach 3d software I manage testing the integration with UMA, but as you ?re going tonotice, importing setting mostly depends where those files where generated, so it ?shard having an standard. For export setting, I ?ll explain the specific setting forexporting content for UMA base mesh.

Blender

Importing files: Blender has a huge limitation: it can ?timport fbx files (Update: On Blender latest version, fbx importis already being integrated), so it will be harder sharingskinned and rigged models from other 3d application toBlender. Importing obj files is a straightforward process, andblender provides settings for definning forward axis and upaxis, covering different coordinate systems. It ?s usually a good

g “Keep Vert Order”, f u
of mesh vertices, this is specially important working withzbrush and other sculpting tools.

Exporting files: Exporting fbx files of rigged andu qu g “forward axis” “Z

forward” “Up Axis” “Y Up”

It ?s very important when exporting content being sureboth it ?s position, rotation and scale are normalized, thismeans you need to bake all those into vertices position. This

w “Ctrl+A” “Object/Apply”

You usually don ?t need including animations whenexporting clothes and acessories, but it ?s really important thatthe rig is exported along with the mesh for your content.Including the rig might raise the disk space required by thatfile, so it ?s usually a good idea to keep a bundle of meshes onthe same fbx file whenever possible.

3ds max

 

Importing files: I ?ll focus ongf f “Content

creator pack”, wexported from blender, there ?s asmall change required whenimporting base mesh fbx files to3 ,u “units”“Centimeters”
size.

As you can see on the
following image, the fbx file (upper
mesh) has the correct rotation and
is fully rigged and skinned. The Obj (lower mesh) file requiresmanual rotation adjusts after importing process.

3 f “skinwrap” u
for copying skinning data between UMA base mesh and yourown content.

Exporting files: The same warning I ?ve provided forblender users apply here too: It ?s very important whenexporting content being sure both it ?s position, rotation andscale are normalized. It ?s possible to adjust mesh pivot using

“Affect Pivot Only” u T ? f jurequired when creating your own content, the Z rotationvalue of the mesh should be set to 180 degrees, this isusually done entering Affect Pivot Only mode and rotatingthe pivot itself.

When exporting the fbx files, you needto have both your content mesh and rigselected. It ?s usually a good idea not includingthe cameras and lights on the fbx files. For

g, u “automatic”“Up Axis” “Z up”

Animation

 

UMA is integrated with anhumanoid mecanim avatar, opening ahuge list of animations that can beretargeted to any UMA avatar. Both Maleand Female UMA prefabs had theirmecanim avatar settings adjusted. UMArig provides enough bones do handlefacial animation, the same techniquesrequired for facial animation on anymecanim avatars apply to UMA.

Slots that provide extra bones notlinked to humanoid mecanim avatarrequire extra adjusts to properly receiveanimation, as animation data won ?t beretargeted to those bones.

Mecanim avatar creation API

Example of bone driven facial animation

Mecanim

Unity 4.2 provides an Mecanim avatar creation API, this is necessary to recreatemecanim avatars based on changes UMA rig might have received. Before unity 4.2, thiswas not possible and I had to use LateUpdate to keep bone changes, consuming extraprocessing time and possibly breaking Mecanim IK depending on the kind of changesbones received. UMA latest version already integrates Mecanim avatar creation andprovides full suport to IK and Root motion thanks to Joen Joensen and Mecanim teamhelp.

Overview

 

UMA Components

Joen provided a diagram for the beta group showing the relationship betweenthe various parts of the UMA framework. I ?ve included a new version here to helpexplaining how avatars are created.

Libraries

All avatars created need to have access to a set of necessary data: Races, Slotsand Overlays. Each library provides a list of each of those within an dictionary, beingthe key an string with the name of the element, and the value the element data itself.

For projects with big amount of content as mmo games, you probably don‘twant everything loaded in memory and loading/unloading assets might becomenecessary, this case requires implementing custom libraries.

- race library

 

Each RaceData on the race library provides a prefab with all shared scripts,avatar data and etc, one or more DNAConvertes and a list of the name of bones thatrequire being updated.

As you ?ve noticed, I ?ve separated male and female as two different race datas.This is because each race provides an specific base mesh and rig/skinning data, andusually require specific content. Using unique base meshes for male and female gaveme the possibility of reaching a better silhouette and topology for each of them.

DNAC g u “height” “armSize”to bone deformation and shape changes. It ?s possible to have two different races withu “height” “armSize”, u f erting those values

in different ways.

- Slot library

Each slot provides a skinnedMeshRenderer and a material sample, as explainedearlier. If you ?re planning on inluding extra bones on any Slot, it will be necessary tou J ? “UMA u ” for generating the slotData, as it is responsible foridentifying if there ?s any extra bone and listing all their transforms.

The first overlay in the slotData ?s overlayList provides the base textures, and allother overlays included are combined with the first one, in sequence, generating thefinal atlas.

- Overlay library

 

Overlay library gives access to all available overlayData , This library might use ahuge amount of memory depending of the project, as it keeps direct reference totexture files. By default all UMA textures are provided with read/write tag checked,but this is only necessary if you ?re using free license.

Each overlay have an color that can be used to tint it ?s first texture ontextureList. Usually this value is set by code, at the moment the overlay is beingincluded on the slot.

The Color32 arrays channelMask and channelAdditiveMask gives exceptionalcontrol over adjusting texture channels. Each color here will change the overlaytexture from overlayList sharing the same index. With this, it ?s possible to adjust eachtexture channel of each overlay of an atlas.

For example, if we consider reducing the gloss value of a hair texture, we couldset an channelMask second color (index 1, relative to second texture, where normalmap,s u g ) “” wervalue.

Functions public void SetColor(int overlay, Color32 color) and public voidSetAdditive(int overlay, Color32 color) on overlayData are responsible for setting thosevalues. We could have something like hairOverlay. SetColor(1 , newColor32(255,255,50,255)); to reduce gloss value on above mentioned example.

The rect value is specially useful if you ?re providing an overlay that covers asmall area of the base texture. Both male and female
eyebrows cover only a small part of the head base
texture, and it would be a waste of memory having a

huge texture with most of it ?s area completelymasked.

The x value is the horizontal offset of thecropped overlay, y value is the vertical offset, andwidth/height are relative to cropped overlay size.

cropped overlay being combined to base texture

I ?ve managed to include on Overlay library a set of buttons to adjust all overlaytextures in a single click, this is specially usefull to reduce the resolution of all texturesor set their compression.

UMA shape

 

- UMADna

Being able to adjust avatar shape in real time, even if the avatar share bothtexture atlas and mesh is very powerful. This is possible because we use bone changesto deform both the avatar body mesh and it ?s clothes. To archive those bone changes, weneed to know both which bones should be adjusted and how this should happend.

UMADna holds the values from changes an avatar can receive, and we provide anUMADnaHumanoid class inheriting from UMADna as example of how this works. Both maleand female avatars uses this UMADnaHumanoid to define their shape values.

If you consider the winged humanoid on the diagram image, it might be possible tohave a single UMADnaWinged being used by both male and female wings. This class would

u“z”,“z”“lg”

- DnaConverterBehaviour

The DnaConverterBehaviour is responsible for converting the Dna values to bonechanges, This is where the code for deforming bones is kept. We provide both anHumanFemaleDNAConverterBehaviour and HumanMaleDNAConverterBehaviour inheritingfrom DnaConverterBehaviour and as you can see, male and female avatars share the sameshape values, but resulting bone changes are specific to gender.

Creating UMA avatar

UMAGenerator

UMAGenerator provides all necessary functions and methods to handle avatarcreation. Creating an avatar is done in 3 steps: calculating it ?s final mesh and rig,processing it ?s texture atlas and updating it ?s shape.

umaDirtyList keeps track of all UMA avatars that need to be created orupdated, in documentation following pages it will be clear how and avatar is includedon list.

Both usePRO and convertRenderTexture visible as checkboxes on unity editorare very important. If you have an Unity PRO license and usePRO enabled, it ?s possibleto create the atlas using RenderTextures, so texture calculation is very fast. For Freelicense, it requires processing each pixel individually, so it takes considerably moretime and processing power. It ?s possible to split this calculation over as many frames

as necessary to avoid drastically lowering frame rate, but higher resolution textureswill require a considerable amount of time to be processed.

 

convertRenderTexture is useful in case you ?re working with Unity PRO, butdon ?t want the final atlas being a RenderTexture instead of Texture2D. This might bethe case if you ?re planning compressing the atlas. Keep in mind this process is heavyand might bring slowdowns on 2048x2048 atlases. it ?s Also known that RenderTexturedata won ?t be kept on Webplayer after window is resized or on builds when forexample accessing task manager, in those cases atlas would have to be recalculated orconverted from RenderTexture to Texture2D to avoid the problem.

textureNameList provides a solution if you ?re planning using extra textures thatshould be baked on atlases and applied to your sample materials. Usually we have_MainTex and _BumpTex, and if your sample material shader require both of them,atlas will search on overlays ? textureList index 0 and 1 for those two. In case you add athird texture name, for example _DetailTex, and provides a shader requesting thisdata, overlays using this shader are expected to provide the extra texture oncorresponding index.

maxMeshUpdates and maxPixels defines how many meshes will be baked andhow many pixels can be processed on a single update step. Setting maxPixels is onlynecessary when not using usePRO. If you ?re targeting mobile or old devices, it ?simportant to profile the performance and adjust those values. It might also be usefulto adapt those values dinamically depending on actual performance for the specificdevice running the project.

atlasResolution is very important, it defines maximum resolution of the atlasesgenerated. If you need very detailed textures, you might want to increase this to 4096,but keep in mind the memory used for high resolution textures is really big, specially ifnot compressed. It ?s possible to adjust overall overlays resolution to fit smaller atlases,this will be covered on following pages. Setting atlas
resolution to small values but not adjusting textures
resolution accordingly will generate errors on
project, as not all textures will fit atlas.

FitAtlas Forces final atlas to fit Atlasresolution in case the resulting atlas size would belarger than maximum size.

AtlasCrop Final atlas unused texture spacewill be cropped. If you need the resulting atlas beinga square texture, this is not recommended.

UMAGenerator

UMACrowd

 

UMACrowd is an example of how UMA avatars can be randomly created basedon content we have on libraries. Both colors and shape values don ?t have anyelaborated creation method. In most games you will need a color palette and morecontrol over shape and cloth combinations.

First of all, UMACrowd needs to keep track of SlotLibrary, OverlayLibrary,RaceLibrary and UMAGenerator. You can consider UMACrowd as a chef with access toall necessary ingredients and tools to cook an unique meal. Each UMA avatar, or mealif you wish, is created based on an specific recipe the chef writes based on availableingredients and how they are combined. UMAGenerator is the available tool the chefuses to actually cook the meal, and bake an UMA avatar.

atlasResolutionScale This value changes the overall texture size of all overlaysan UMA avatar receives, reducing final atlas size. If you ?re planning on having a lot ofUMA avatars with unique atlases, it might be necessary considering a lower value here.Usually the values we set here are 1.0f, 0.5f, 0.25f, 0.125f and 0.0625f, as those arealso the values for getting the correct mipmap on Free license. As default, it ?s set to0.5f, with atlas resolution of 2048.

generateUMA , visible as a checkbox at Unity Editor, checking it generates onerandom UMA avatar.

generateLotsUMA, visible as a checkbox at Unity Editor, checking it generates agroupd of random UMA avatar, based on below Vector2 value.

umaCrowdSize defines the amount of UMA avatars created on column and row.Default values are 4x4, resulting in 16 UMA avatars.

randomDNA visible as a checkbox at Unity Editor, checking it generates randomshapes for avatars, otherside all avatars will have neutral shape.

useLegacyCombine On UMA latest version,the old CombineInstance() code is still available incase there ?s no intention on using extra bonesthat would be dinamically included on avatar. Thelegacy code requires less processing time, butprovides limited results.

zeroPoint Defines the position where UMAavatars are created. If it ?s empty, defaulf value isVector3.Zero.

UMACrowd

UMACustomization

 

UMACustomization exemplify changing avatar shape after it ?s creation.Following the same concept, it ?s possible to change UMA slots and overlays, triggeringthem to update with the new content. At the example scene, right clicking on any UMAavatar updates UMACustomization sliders with its specific shape, after that it ?spossible to use sliders to change any shape value.

UMACustomization generates a rough example of sliders based on GUITexturesas reference of how to handle changing UMA shape based on user input, but it ?s cleareach project will require a custom approach to handle both GUI and user input.

Exchanging UMA cloth and acessories means changing the array of slots usedfor creating an UMA avatar and including that avatar on umaDirtyList atUMAGenerator to get updated.

UMACustomization

UMAData

UMAData provides many functions, methods and classes being used on avatarcreation as an standard for sharing information.

Each avatar has it ?s own UMAData, that ?s why manually duplicating avatars onUnity editor might generate errors when trying to access any avatar data, as theirUMAData has not been properly set.

? f “ ” UMAData. Both isShapeDirty,isMeshDirty and isTextureDirty are responsible to keep track of what needs to be updated orrecalculated on this UMA avatar.

isShapeDirty means shape data needs to be recalculated. This is usually set when anyDNA value received changes that require updating UMA bones.

isMeshDirty should be set true when UMAData received slot changes and avatar meshrequires being baked again. This also applies if overlays have changed as most likely atlasesand in consequence mesh uv will require to be recalculated.

isTextureDirty means atlases require being recalculated. On UMA actual stage, theentire atlases are generated from scratch, but it ?s possible to keep track of changes andimplement an advanced solution forcing atlas recalculation on specific areas only.

 

useLegacyCode is set by UMACrowd when creating the avatar, but can be set directlyon UMAData.

animationController can be an uniqueanimator for each avatar. This is necessary becausewhen the avatar shape changes and a new mecanimavatar is created, the animation controller need to beset back.

umaPackRecipe was created considering thatall necessary data to recreate an UMA avatar mightneed to be saved or shared on multiplayer games.What umaPackRecipe provides is the minimumnecessary data for serialization, usually an array withthe names of slots, overlays and DNAs, and the extrachanges that had been applied to those. All this datacan then be unpacked into an umaRecipe. In theprocess, respective libraries provides elements basedon serialized names and extra changes are applied tothose.

UMAData

Credits

 

Without Caitlyn Meeks-Ferragallo (Unity Asset Store Manager) and Jay Santos(Unity Field Engineer), UMA probably wouldn ?t reach Asset Store any time soon, andeven if it did, it wouldn ?t have the same quality and flexibility it provides today.

Unity sponsored this project, making it possible to be available at Unity AssetStore for free. In the last months, I ?ve received a huge help from Joen Joensen (UnitySoftware Developer, QA), he both provided feedback for UMA code and included hisown scripts to the project.

Development

Fernando Cardoso Emiliano Ribeiro (Huika Game Studio) - UMA DeveloperJoen Joensen (Unity Software Developer, QA) - Software architect

3rd party scripts

Aras Pranckevicius (NeARAZ) - HUDFPS
Joen Joensen - WorkerCoroutine, UMATextureImporter, SkinnedMeshCombinerSven Magnus - MaxRectsBinPack

A huge thanks for the following beta testers and forum members

Breyer, Cynel, ecurtz, FlorianSchmoldt, janpec, J f S?i? , SinisterMephisto, Tesla Coil,virror, Whippets. 

UMA - Unity Multipurpose Avatar