DAZ Plugin : Export to Second Life .bvh

Plugin source code: export_to_secondlife.ds

[UPDATE] - This page is referring to an older, pre V2.1 version of DAZ Studio, and may not apply to newer versions.  To get the latest version of DAZ Studio, visit the DAZ website.

I’ve always had trouble getting DAZ to properly create a Second Life-compatible .bvh file, so quite some time ago I took the basic export plugin code provided by Escort DeFarge on the SL forums thread "Fixed BVH Export Plugin for DAZ|Studio" (login required) and used it as the basis for learning how to create plugins for DAZ|Studio.

Installing the DAZ|Script Developer’s Kit

Fortunately, DAZ provides a decent plugin model for scripters free of charge.  The DAZ|Studio plugin SDK is required for all of these plugins, so if you are thinking of using them you should go to the DAZ|Studio Developer Info page and download and install the "DAZ Script Development Kit" now.

After installing the scripting SDK, you should see the Scripting Activity Tab in DAZ:

scripting activity tab

Switch to that tab, and you should be able to see the DAZ|Script IDE.  If you do not, you can make it visible via the menu:

show ds ide

You should now be able to see the DAZ|Script IDE below.  If you do not, there should be adequate help on the DAZ Developer forums (login required) to get you going.

ds ide

Once you’ve gotten to this point, you can run any DAZ script plugin as well as tweak them to suit your own needs.

Installing the "Export to Second Life" Plugin

Download the source code for the export plugin and place it in a location such as the DAZ script folder, which on my machine can be found at C:\Program Files\DAZ\Studio\scripts.

Select Customize from the main Edit menu to bring up the Customize dialog box:

customize menu

Right-click on the "Custom" and select "Create New Custom Action":

createnewcustom

Make sure that "DAZ Script File :" is checked, and enter the complete path to the plugin source you downloaded above. Name the new custom action whatever you want, add a description, and press "Accept".

custom action params

Now that you’ve created the custom action, you will want easy access to it, so find yourself a good icon for the plugin and we’ll put it on the toolbar.  To assign the icon, right-click your new custom action in the tree and select "Change Icon":

change action icon

You can use any .png or .jpg picture you want for the icon, so I chose to use the ubiquitous SL Hand Icon :)

Now, click on the Tool Bars tab on the right hand side of that dialog, expand Main, and drag the custom action from the left hand side over to the tree on the right:

add_action_to_toolbar

NOTE: The most recent version of DAZ has a bug where when you drag the action over, it will appear in the tree blank.  That’s okay, just ignore that and press "Accept".

You should now see the new custom action on the toolbar near the top of the screen:

wootThereItIs

Exporting a Second Life Animation

Now is the easy part.  When you’ve finished your animation and want to bring it into Second Life, press the icon and you will be presented with the export dialog.

For the most part, you can just leave all of the settings "as is" and be able to expect that it will work fine, but I will outline the sections here.  Keep in mind that I made this plugin for personal use originally and not all of the sections will make the most sense for everyone :)

daz_export_dlg

Select the avatar to export

This section allows you to choose which figure you will be exporting.  This plugin assumes that you are using the Second Life Avatar Poser Files that are freely available from the Downloads area of the Second Life website at http://secondlife.com/community/avatar.php.  This is a requirement for using this plugin, and chances are extremely good that it will fail spectacularly if you are using any other figure.

For the majority of animations, you can leave the dropdown in this section as is.  It’s only purpose, and this is not well tested, is to allow for the possibility of creating "partner" animations, where there are two or more figures in the scene, and you export the animation for each figure separately.

Select the destination BVH file

By default, this section will contain the same path as the animation you are editing, with a .bvh file extension, so that your bvh files are kept in the same location as your DAZ animations.  You can change this by typing directly into the field or using the ellipses button to browse to another file.

Animation Speed

This is probably not useful for everyone, but I discovered long ago that I tend to make my animations (which are primarily martial arts or combat-oriented) a little too slow.  Since DAZ doesn’t have convenient tools to retime an animation (changing the FPS in DAZ changes the number of frames accordingly, so that the animation is still the same play length), I needed a convenient way to change the playback speed and this was the solution I came up with.

If you are happy with how fast the animation is inside of DAZ, just ignore this setting.

Hip Position

This section is the one that I expect will be most confusing for others.  Essentially, the amount of horizontal or vertical movement you see in DAZ will be greatly exaggerated once the animation is imported to Second Life.  I don’t know if this is an artifact of how I’m doing the export or whether it’s just a difference in the unit of measurements between the two environments, so after much empirical testing I came up with a "scaling factor" that would allow the amount of movement in DAZ and Second Life seem essentially equivalent.

If you discover that your animation doesn’t move as far in Second Life as you want, you may consider messing with these settings to adjust that.  I won’t describe their function more than just to say that if you feel the need to experiment, you can do so.

The "Use absolute values for hip position…" checkbox is essentially left over from the days when I would preview my animations in QAvimator, and doesn’t really serve any other purpose.  Leaving it unchecked or checking it doesn’t have an appreciable effect in Second Life, and I recommend ignoring it.

That’s It!

You should now be able to turn this:

fwdrollexample

into this (sorry, the SL video is choppy and messed up, it was a SLoppy job) :

fwdRollSL

NOTE: Yes I know the playback speed of the animated gifs in Internet Explorer is slow.  No, I don’t know why.  I suggest you get and use FireFox :)

Popularity: 16% [?]



Bad Behavior has blocked 58 access attempts in the last 7 days.

Close
E-mail It