Making animated IMVU pets using Blender - Create Mode Assembly

Making animated PETS for IMVU using Blender

Once all the Pet is exported from Blender its time to grab the files and reconstruct the item in IMVU's Create Mode. Aside from the files output from Blender, nothing else is needed (other than the IMVU Client).

The following makes use of Create Mode, part of IMVU's chat client. A basic understanding of product creation generally is ideal as the following does not go into detail on this particular aspect of developing content for IMVU (click here to read how items should be put together in Create Mode and the extra options available).

Prerequisites ^

Pets in IMVU are largely the same as other products in terms of what can be done with them, the only difference really is in how they are utilised by the end User. In other words, an animated Pet functionally is the same as an animated seat or other item, they all require the same fundamental parts to work correctly in IMVU. With this in mind once the export process has been completed from Blender a series of text-based XML files will be available; a mesh as "*.XMF" ("tomato.xmf"), a skeleton as "*.XSF" ("tomato.xsf"), an animation file as "*.XAF" ("tomato.xaf"), and optionally a texture or material file as an "*.XRF" ("tomato.xrf").

Design note: depending on the Pets complexity there may be several of each, typically there are several animation (xaf) and material (xrf) files each representing a different element of the overall product - separate xaf files for each animation sequence, run, jump, blink etc., and xrf files for different texture usages. Aside from mesh data its also possible to bring in audio and sound files ("*.ogg" audio files) which are generally loaded into the Client directly without the use of an associated XML file.

Once export from Blender is complete a set of text-based XML files become available, ready for reassembly in IMVU's Create Mode

Product Deriving ^

As with all other products in the IMVU catalogue, Pets must be derived from another 'root' item. When uploading a completely new mesh this is best done using one of IMVU's root products, typically the Male or Female Accessory items; "Glasses Space Lagoon" #682 (F) and "Glasses King Gold" #669 (M). For Pets either item works. When IMVU starts and Create Mode is activated click the yellow "Derive New Product" button on the left of the "Advanced Tools" section. In the "Derive a new 3D product" dialogue that appears select either/or "Female" or "Male" then select the "Accessory" item to set the product derivation base. Once the item listing appears click "Go" (lower-right) to start the derivation process.

Design note: Pets are considered 'accessory' items so don't have the dedicated root derivable product typical of other items types. When deriving the IMVU item set as the base should be the Male or Female Accessory.

Derive a new product and select "Accessory"

Pets don't have a dedicated derivable because they're essentially "Accessory" items. Select that option from the "Derive a new 3D product" dialogue (Female or Male items can be used)

The avatar in Create Mode wearing the 'accessory' item

Once the Accessory item is selected the avatar loads in Create Mode wearing the item. From this point on the various XML files will be loaded in to replace the defaults associated with the glasses

Replacing the mesh (XMF) ^

Assembling Pets is the same as for other product types, its simply a process of replacing the defaults loaded in with the derived item with those belonging to the new one, i.e., replacing 'sunglasses' with 'pet'.

Design note: the derived item acts as a container of sorts, each element being a temporary placeholder for their replacements. Once this is done the older references are essentially discarded in favour of the new (see below re: cleanup).

Once the Accessory item loads into Create Mode along with the avatar, click the "meshes" tab[1] to access mesh properties, then on the "+ Add .XMF" button[2]. In the Windows File Browser that appears, browse to and select the *.xmf file and load. Click the "Apply Changes" button to swap meshes. The replacement will then appear in the main window.

Design note: if more than one mesh needs to be loaded click the "+Add" button top-left of the section, this adds another mesh 'slot' into which a secondary XMF can be loaded. Repeat for the number of sub elements required.

When the mesh loads Create Mode also automatically updates the "Materials" subsection, listing all instance referenced in the XMF. To replace or add new textures to the mesh simply click the "Edit" button per material shown[4], browse to, select and load each slots respective *.jpg, *.png or *.gif. Click "Apply Changes" to update.

Design note: Create Mode no longer requires XRF files be loaded to explicitly update material slots[3] as images can now be opened directly (they are now given a unique session name/identified). In addition if using Blender 2.49, bitmap images need to be inverted (flipped upside-down) beforehand else they display incorrectly in IMVU - an incompatibility between the older version of Blender and IMVU that has to be compensated for.

Replacing the default products mesh

To replace the glasses click "meshes"[1] then "+Add XMF" to browse, select and load the replacement. This also updates the "Materials" section which can be replaced directly without needing to use XRF files[3] - click the "Edit"[3] button, browse, select and load. Click "Apply Changes" to update the product

Replacing the skeleton (XSF) ^

By default the mesh added above will behave as though its a pair of glasses because its rooted to the same bone, "AttachmentRoot", used by such head-based accessories - when the head moves so too does AttachmentRoot and anything linked to it. This is typically addressed by loading in the skeleton exported from Blender, and attaching it to a different bone.

Design note: the bone used as that attachment point differs depending upon requirements, a head mounted pet can be rooted to "AttachmentRoot" whereas a 'shoulder' pet might be rooted to "shoulder.R" which in turn localises the pets location and behaviour relative to the avatars right shoulder.

Click "config"[1] to access skeletons properties. To replace the XSF associated with the derived item click "+Add .XSF". In the File Browser that opens select and then load the replacement XSF file. Click "Apply Changes" to update. This will modify the product replacing the derived skeleton with the new. However, this doesn't change the Pets position. If that's required because the pet stands on the ground, in "Attachment Node:" type the name of the bone that's to act as the pet root or anchor, for example "Female03MasterRoot" to root the pets skeleton to the avatars feet. Upon updating the project the pet will relocate based on the bone name entered.

Design note: if the pet is to be available to both Male and Female avatar, in the "Compatible Body Pattern PID:" input field type a comma "," immediately after "80" then type "191", i.e., the input field should be as follows "80, 191". This ensures the same pet is usable to both.

Replacing the derived items skeleton (XSF)

Replacing the default derived items skeleton with that of the pets - click "config"[1] to access the panel then click "+Add .XSF"[2]. Browse to, select and load the *.xsf file then update the project. Depending on placement change "Attachment Node:" to the bone anchoring the pet, e.g., "Female03MasterRoot"[3]. And if the Pet can be used by both Male and Female avatars change "Compatible Body Pattern ID:" to "80, 191"

Replacing/Adding an Action (XAF)

Accessories don't generally animate to the root derivable, the glasses, don't include any animation files that need replacing. If the pet animates in some way this means loading in a brand new function. For this click the "actions" tab[1] to access the appropriate properties. The panel will be blank besides an "+ Add"[2] button top-left of the section. Click it to populate the panel with "Action 0". In the "Ensembles" area click the "+ Add .XAF" button[3] and browse to, select and load an *.xaf file.

Design note: getting animation to work in IMVU is a two part process; the file is first loaded into the Action, then a trigger is set to activate it appropriately. This has to be manually set in the "actions" panel.

Once imported the animation can be set to play automatically though an 'on load' event trigger, or manually by having the User type a command. First in "Action Parameters", some basic behavioural properties need to be set; the number of times the sequence plays once triggered. For this, in "# ensembles played:" type a numerical value in the input box, i.e., "1" if the sequence plays once, a higher number relative to the loops required, i.e., "9999", or use "0" to trigger infinite looping of the animation. In "After Playing:" set "Pick same Ensemble" from the list.

Design note: a sequence looping 9,999 times will take 'X' seconds, minutes or hours depending on the animations actual length - a 1 second sequence looping 9,999 times will effectively last for 9,999 minutes, or approximately 160 hours.

Once the duration is set the action next needs to be triggered. If the pet is to animate as soon as it loads into the scene, in the "Trigger" input field (under "Action Parameters") type "stance.Idle". Alternatively if the animation is to be manually triggered by the User type "petwalk" or other appropriate word/phrase (all triggers are CaSeSENsitIve).

Design note: aside from "stance.Idle" actions can also be automatically activated using "stance.Sitting" and "stance.Standing" which correspond to the avatar sitting down or standing up (essentially sitting and standing pose-spots). When using manual triggers its best to keep the words or phrases simply but appropriate to the product to avoid accidentally triggering other products, for example using "walk" may trigger other items whereas "petwalk" only triggers the pet, and to make it easier for non-English/native language speakers to use.

Finally in the "Ensembles" section change the "Playback speed:" to speed up, or slow down the sequence - "25" represent the standard 25 frames per second playback speed associated with most animation. Then set "Composition:" to "Replace". Once all the settings edited click "Apply Changes" to update the file. If more animations are needed first clicking the "+ Add" button top-left placing a new Action before then repeating the process.

Design note: when updating the project any auto-triggered animations may play making it difficult to do any further editing. In these instances is often best to set manual triggers during development, swapping them for stance triggers prior to upload to the catalogue.

Adding an animated Action ro the pet

Products can be animated using the XAF files added to an "Action" property. First click "actions"[1] then the "+ Add"[2] button to create "Action [n]". Then et whether the animation starts automatically when the product loads, or is User activated in "Action Parameters". Finally set the actions duration (number of times it plays) and speed. Each animation generally uses a separate "Action" unless they are sequential in which case they are loaded sequentially as "Ensembles" within the same Action

Removing Unused assets ^

Before uploading to IMVU the project will likely need to be checked for 'unused' assets, files that belonged to the original item, or extras loaded in during production but no longer needed. In either case they should be removed to ensure the products final file size is as small as possible. For this simply click the "assets" tab and select the items marked "UNUSED". They highlight yellow. Once done click the "Remove" button bottom-left to delete.

Design note: multiple entries can be selected holding down "Ctrl" whilst clicking.

Once this is done, save the file and upload.

Delete unused assets to keep the file size down

Highlighted yellow, the selected "UNUSED" assets need to be removed to keep the file size down else they will be included with the product when its uploaded - click select and the click "Remove"

KatsBits Web
Search KatsBits using StartPage
Hottest item in Store right now!
Hot Product in Store
Visit the Store Now
  • Blender Art Magazine