DAZ|Studio Plugin : Export to Second Life

While I do own a copy of Poser, the "recommended" program for creating Second Life® animations, I strongly prefer DAZ|Studio.  It’s easier for me, and while not as feature-packed as Poser, it works well enough for what I need to do.  DAZ|Studio is free, is compatible with most Poser content, and is frequently updated.

It also supports the creation of plugins using a variant of JavaScript, so I’ve been able to extend it to add functionality that I’ve needed.  One of those plugins is an exporter that creates .bvh files that are compatible with Second Life®   While DAZ|Studio has a .bvh exporter built-in, and they’ve made a good attempt at making it SL-compatible, it’s still just not quite right, so I made an exporter that did what I needed.

Because of the fact that I’ve answered questions about both DAZ|Studio and my export plugin on the SL™ Forums and in-world a number of times, I decided today to throw together a page that gives basic instructions on how to install and use the plugin.  That page is at http://www.daikonforge.com/webtab/dazstudio-plugins/, and can also be reached via the "DAZ|Studio Plugins" tab at the top of this website.

The instructions are probably not very well written or as clear as I’d like, but hopefully they will serve as a good enough starting point to enable those who wish to try using DAZ to create Second Life® animations to successfully get their work in-world.

4 Comments

  1. Posted 2008/02/27 at 11:43 am | Permalink

    I’m a product manager at DAZ 3D, our team has read your post regarding the BVH exporter for second life. We are curious on what you’re doing different to get the better results for second life animations. If you are interested in working with us to incorporate some of your technology into DAZ Studio we may be able to work out some kind of deal. Often we work with external developers to add technology to our products.

    Please let me know if we can start a dialog to work out an arrangement.

    Best regards,

    Blaine
    [Edited by Takuan to stop email-harvesting bots]

  2. Posted 2008/02/27 at 12:09 pm | Permalink

    Blaine,

    DAZ is welcome to use anything in that plugin, without restriction, if it will help, and additionally to distribute it by any means without restriction.

    I will try to remember what is different between my plugin and the built-in exporter, and will send that via email to you. Right off the top of my head, though, I think there are a few small differences of note:

    1) My plugin is designed for the exclusive use of the Second Life avatar model downloaded from the Second Life Avatar Files Download page. Your plugin is more general in the sense that it allows other avatars to be used and allows the user to specify the mappings. There could be a happy marriage in there, but I’ve been too lazy to explore it :)

    2) If you look in the code or in the resulting .bvh file, you will notice that the hierarchy is different. In particular, the offsets are different in my plugin, and are calculated from boneRef.getOrigin().subtract(boneRef.getNodeParent().getOrigin()). Also, the channels are not necessarily in the same order, which can be seen in the jsBone.writeChannels() method. I am not expert enough on either .bvh or Second Life’s internal workings to know how important this information is (or isn’t), so I call attention to it as a possibility. On line 667 of the plugin, I have a comment about the axis order of the channels being specified by a readme.txt file in the Second Life Avatar Download file mentioned above. Reviewing that file, I found this comment:

    Remember that the hierarchy, joint names, and joint rotation order must match those specified in this file in order for any resulting animation to import correctly into Second Life.

    3) I have allowed the user to independently scale the magnitude of hip movement, because I found that when imported into Second Life the movement would be greatly exaggerated. I arrived at the value used in the plugin empirically, and doubt it’s absolutely correct, but it works for most of the animations I have made. I do wonder whether it’s simply an issue of different units of measurement, but again I am no expert on the internal workings of Second Life.

    I will send you more information after I’ve gone through the plugin to refresh my memory of how it all works.

    I’m only too happy to help!

  3. Makkiavelli
    Posted 2008/02/27 at 5:34 pm | Permalink

    sidenote from an end-user ;)

    if the first frame of your animation starts with a hip-rotation you manually need to include a “first-frame” that shows the avatar in its default pose when using robby’s exporter.

    the built-in DAZ-exporter automatically creates this first-frame so you dont need to worry about it if you use this export.

    (it took me a while to figure this out … ;)

  4. Posted 2008/02/27 at 5:42 pm | Permalink

    Ah, yeah, that’s a great point!

    I typically just use a .DAZ file that I’ve made as a “template” which already has that in it, and had not thought to add that to the plugin.

    I will do so as I find time, it’s a good thing to have.