Animation Master to Blitz3D info

Community Forums/Developer Stations/Animation Master to Blitz3D info

ragtag(Posted 2003) [#1]
Here is some info on my experimenting with game modeling in Animation Master.

I've been trying to use AM to create models for use in Blitz3D. I thought I would share with you my progress so far in case anyone else is interested in going down this route. So far it works, but doesn't seem to be the easiest way to go.

(disclaimer: This is not really a tutorial, as I'm experimenting with the workflow and tools as I go along. I don't know if this is really the best way to go, and would love to get some feedback on this.)

AM project file, .x file, .b3d file and Blitz code used can be downloaded here http://www.ragtag.net/xternal/blitz/sailor.rar (note: no textures or texture info/UV mapping).

TOOLS USED:
Animation Master v.10n ( http://www.hash.com )
Obsidian Games AMXtex .x plug-in for AM ( http://www.obsidiangames.com )
Ultimate Unwrap 3D ( http://www.unwrap3d.com )
Blitz Basic 3D v.1.85 ( http://www.blitzbasic.com )

BASIC WORKFLOW:
Model, rig, texture (not done yet) and animate in AM.
Export the model with AMXtex to .X
Append an animated Action to the .X file with AMXtex
Open the .X file in Unwrap3D and save it out as a .b3d file
Write a basic viewer in Blitz3D, load in the .b3d file and play the animation

MODELING
What I've done is taken a sailor model I made, modified it work for real time with 1436 patches in AM and 2707 polys when exported and triangulated. I'm exporting them with 1 poly per patch. There were a few problems with the modeling part. Firstly, when models are exported hooks become cracks in the surface so hooks are out. And secondly, 5-point patches get divided into 10 triangles, which is a bit of an overkill, so they are out too (this is actually caused by the model being triangulated when loaded into Unwrap3D). On the positiv side, 3-point patches, which tend to create creases when rendered in AM, export just fine.
What all this means is that you won't be able to use the same version of the model to render out pictures/cinematics in AM as you use in your game (unless that model is very cleverly made).
AM is spline based, so when viewing the wireframe the a model can look a bit messy, unless you peak all the points. With peak points the model display gets faceted, but this is really not a big problem. Also a peaked model will load in as a faceted model in Unwrap3D, but can quickly be smoothed out there (Weld).
The modeling tools in AM are made for spline modeling, and when trying to use them for low poly modeling I found myself missing some tools from poly apps, such as Wings3D, I can normally live happily without when modeling in AM. An alternative I haven't tested yet is simply to model in Wings3D ( http://www.wings3d.com ) and export to AM .mdl from there.

TEXTURES
I didn't get really into this, but there are a few concerns. The way Blitz3D works (and I believe most 3d game engines) is that for every texture applied you need a seperate surface. Having a lot of surfaces slows things down, so for a single character you'd preferebly want to have only a single surface. This means you would want to apply a single texture to the entire character in AM, which is not that easy to do but quite possible. You would need to do some clever planning, by flattening different parts of the model and stamping different parts of a single image onto each one.
Each group contained in the file and each seperate texture (not multiple stamps of the same one) becomes a seperate surface on export. These show up as materials in Ultimate3D, and can simply be deleted there.
Alternatively, you can have AMXtex generate a map from the combined textures you've applied to the model. This generates a map divide into squares, which is kind of hard to make sense of and modify, but also small lines tend to show up between polygons once in Blitz3D. So it's not really that usefull, unless you could somehow contract/shrink all the UV coordinates afterwards by 1 pixel.
Probably the best way to go is simply to use Ultimate3D to UV map the model and apply textures after it's been exported, that's what it's made for.

RIG & ANIMATION
I created a very basic set of bones, with IK only for the feet, and animated a simple walk cycle. For final export you would want to get rid of the IK targets, as you don't want any extra bones in the file, this can be easily done in Unwrap3D. The points were attached to the appropriate bones, as Blitz3D currently doesn't support weighting or shapes. You could add more bones to the model to get nicer looking deformations, though I'm not sure how this would affect performance in Blitz3D.
When I got the animated moddel into Unwrap3D, some points had moved to the root. It turned out this was because of some error in the modeling on my part that was hard to spot in AM (I think it was internal patches and wrongly connected splines). Though I was able to fix this.
The animation export worked just fine, and the animation tools in AM are some of the best available, so there is not much to complain about in that department.

CONVERTING TO B3D
In this process I planned to use Unwrap3D to load in the .X file and save it out as a .b3d file. It turns out Unwrap3D comes in handy for smoothing out a model exported with peaked points, as well as deleting extra surfaces and bones and probably for UV mapping and applying the textures to the model as well. The conversion to .b3d worked just fine, including animation and all.

IN THE GAME
Loading the model into Blitz3D took about 10 lines of code and was problem free.

CONCLUSING (so far)
The point of this experimenting was to figure out if AM was a viable tool to create characters for Blitz3d games. The modeling and texturing were less than ideal, while the animation worked fine. Not being able to use the unmodified AM models to both render in AM and export to Blitz3D was a big minus (unless, of course, you build your model only with 4 point patches and a few well hidden 3 point ones).

A possible workflow would be to use Wings3D to model, Unwrap3D to texture/map and AM to animate, but might be a little convulted (needs to be tested). A simpler route would probably be to skip AM out of the pipeline, and use Wings3D, Unwrap3D and finally CharacterFX ( http://www.insanesoftware.de ) for rigging, animation and exporting to .b3d. Although, you'll miss out on the great animation tools in AM, it might make life a little simpler.

So I guess, unless you write your own engine that supports the Hash spline technology directly (which would be great), AM is not the best tool for creating characters for real-time 3D games. For creating films, cinematics, stills and sprites for 2D games though, it's still my first choice.

Ragnar


NTense(Posted 2003) [#2]
Hi Ragtag,
As an AM user, I thought I'd throw a comment in here. I've used AM as a modeler for my games and then taken the models into Milkshape to bone and animate. I agree that it would be nice to export directly from AM. We might be able to write a conversion tool (maybe that loads the model, and then whatever actions you want to load), to export from the .mdl/.act format to .b3d with no tweaking. Might be a nice project.


ragtag(Posted 2003) [#3]
Mike Hart over at the AM forum said he was working on an export plug-in directly from AM to .b3d. Though, of course, I wouldn't mind at all if more people were working on AM to .b3d plugins/converters. :)

I might have another go at making a model in AM to use in Blitz3D, maybe taking some different aproaches. Also building the model from the ground up in AM to be used in a game, might be better than modifying an existing one (like I did above).

Cheers,

Ragnar


Dirk Krause(Posted 2005) [#4]
I just came across Animation Master recently (again - I first got interested with DukeNukem3D) and I wonder if there is a better pipeline to Blitz already?

What export formats are there?