Animated 3D-model building for Aleph One
13-10-2002 | update 11-05-04
Jump to:
toollist
workflow
meshwork + photoshop
DimAnimator
MML-Scripting
Examples
Notes spnkrghol-home

Intro (Dim b10c is out!!)


Currently the method below doesn't work yet with the new DimAnimator b10c, wait a mo' while Loren Petrich updates his "insert-Dim3-thinghy-into-Aleph-module". You'll need to re-animate the model anyway, BUT Dim3 promises that from now on it will be backward compatible...
A method to build animated 3D-models for Aleph-One under MacOS 9.xx and MacOS 10.
At the current version of A0 (March 23 2003) a whole load of 3d is possible.
Any sequence in Marathon can be replaced by a model, except for wall-textures and weapons-in-hand (yet).
Monster-movements are divided into sequences (Anvil), each of those sequences can be replaced.
Scenery (animated or not) can be replaced, effects and shots, all by 3D-models. Ofcourse you can use the following method to create static models, but there is another method for static models also available. Choose whatever you prefer.
Here is a method to build meshwork models which can be translated into Brian Barnes Dim3-format (an xml-collection results in animated model with bones), (visit Klink)

Some restrictions and remarks
  • The meshwork models can't be bigger than 2000 vertexes (or the surplus will just be ignored).
  • Do have a peek at this page, I have a Frames-per-Second test, the fps WILL drop severly, how much is depending on the complexity of the model (and a bit less on the use of texture-maps).
  • For any animated model, an extra default sequence has to be created (no big deal, but hey :)
  • The animation of bones is not yet 'optimal', the longer the bone-chain, the more (risk at) deviations will pop up. (Ofcourse, this can be just me, but annoying anyway.)
  • The actual animation is configured in relation with the Shapes-file, it's sequence and the number of sequence-frames, this means 9 frames maximum (Anvil limit), and it is exactly a replacement, update: Aleph-One now allows the inbetweeining on the fly from one extrem pose to another! A walk-sequence can be made from just 2 frames, A1 will calculate the moves inbetween with fluid animation.
  • Your meshwork art will be flipped horizontal in DimAnimator.
  • Your meshwork art will be scaled much bigger than the .obj-files (see static models), scale down in DimAnimator and/or with mml.
  • Try different poses for non-animated scenery/items for variations, see also Loren Petrich's 1-10 Twiddler
  • And ofcourse, loading Aleph One with big-ass textures does affect the framerate severly.

  • toollist

    Meshwork (Classic)
    shareware 3D modelling application, when unregistred anything under 200 vertexes is save-able, excellent for low-poly building (especialy when registred :)
    tutorial on masks and pinned mode in Meshwork

    dim3 Animator b5
    408k, MacOS X only
    Animator is part of Brian's Dimension 3 software, (see also: Dim discussion board at iDevGames) announcement at iDev-forum: Dim b10 is out and the download itself: dim3 b10 (7,5 mb OSX10.2 and higher)

    PhotoShop
    (or any other application which can convert a bitmap into rgb images and edit them)
    check out SuperPNG and J2K, free PS-plugins to get smaller and better (!) png's and jpg's
    workflow for the WFD (water filtration device)


    Meshwork + PhotoShop
    This time rebuild the water filtration device, would be nice to have an example/draft in the meshworkscreen.
    Copy image from Shapesfile, past image into Meshwork... This image is just temporarily, will disappear when saved and closed. Why can't live be so simple? :)

    Build nice new wfd, because it's a rotating symmetrical object, it pays to only build a meshwork which can rotate the small step between one 'fan' and another in an endless loop. (Just as the original which is composed of 3 images.)
    Use the 3D-preview a LOT.
    Launch Photoshop, create a square of say 256x256 pixels, copy the (white) image.
    Meshwork, select all, double click on the first (white) colourbox (topright).
    A new texturewindow pops up, select (planar) view, click set, select x,y or z axis, click in the texture-field, paste the 256x256 image (for now just white).
    Exit texturewindow, re-enter texturewindow, change the texturing-mode into pinned mode. Exit texture-window.
    DO NOT ADD ANY NEW VERTEXES, or your pinned texture is lost (usually) and you'll have to start over.
    Any new vertexes added will pile up on the bottomleft of the texturewindow, it's a pain to drag these around, so make sure when you start defining the texture... (he sez from wise experience ;p)
    Select from the menubar Display Texture.
    Make a screendump (activate caps-lock + command + shift + 4 creates a windowscreendump).

    Trim this into photoshop into a clean texture-image, this is your base for texturing.
    Awfully handy to make a tiny PS-action script, like:

    Have some Phostoshop fun

    Select and copy the PS-image, goto meshwork, open the texturemode, paste the image (but DON'T change anything on the pinned texture-modes).
    Hit OK, preview in 3D, oggle at textured model.


    Go to main-window, select a part of the object, go to Display Texture and drag your just selected parts around.
    This is a texture-pinned-onto-vertexes grid (uv-map), you can drag this around and the placement of the texture on the object will be changed, NOT the object itself.

    Save under anyname with the extension .mesh at the end
    (Your texture is saved in the .mesh file itself, but can later be replaced with a much better texture and their masks/glows.)
    For animated models we need bones, for this simple model a base bone and a rota bone are sufficient. (Names have to be 4 characters max.) Select bone tool, create a bone under the object, call it [base-None].


    Create another bone in the center of the object, call it [rota-base],
    select the vertexes (this case the whole object), hit command+bcall it [rota-base].

    This is a minimal bone-chain, base is the parent, rota is the child.

    note: Take care with the UNDO-function, sometimes Meshworks undoes much more than you intended and scrambles the model too. Save (often) and nuttin gets hurt.

    tip: Meshworks doesn't group parts, but adding bones to a bunch of vertexes, allows to COMMAND CLICK ON BONE to select the group assigned to it. (you wouldn't believe how long I looked for that tip...)
    Jeff Quan's tutorial on 'pinned textures'
    DimAnimator
    Launch ye mac into OSX.

    Launch DimAnimator.
    Import meshwork.
    Create 3 poses. (any name will do)
    Create an animation (any name will do) of 3 poses. Check if the animation loops decently.
    (Note, when playing the animation (command-p), DON'T change/add/delete the poses, sometimes DimAnimator crashes on this so stop the playing, then change.)
    (Again, AlephOne now animates the smooth animation inbetween extreme A (pose) to extreme B (another pose).
    (Note, the rotation works fine in AlephOne, but the x,y,z-movementresults are... tricky, swaying the animated pose works fine again. (Although, sometimes the xsway and zsway seems to be swapped, lookee in A1, change manually the animation.xml-file)
    Swaying an animation is only adjustable/visible when running the animation)
    Save.
    The result is a folder with 3 xml-files and a bmp image, when opening a Dim-file, you have to select a folder, DimAnimator will construct the animated model from this folder.
    It's also possible to re-place a meshworkfile with another one, very handy when you invested countless hours in posing the animation and with just a replacement you can get this animation on the new replacement.

    Exit OSX
    (I'm weird, I don't like OSX, me being a decennia-long OS9-using filthy male sea-monkey...)
    OS9 (pfhew! home sweet home)

    Anvil/Hakvil: Open the Shapes-file and add two new sequences to the scenery-collection.
    default-sequence: Consisting of 1 frame with any (old) bitmap you like, call it 3d_default_wfd or so.
    animation-sequence: Consisting of the number of frames for your animation, at least 2, duh. Appoint any bitmaps you like, no need to add new bitmaps. (So the Shapesfile will be having lots of new sequences, but no new bitmaps, so the filesize will change very minor, instead of the usuall big bloated TC-shapes.!) Starts ye fav texteditor (BBEdit) and use the following MML-script.
    MML-Scripting
    Example ready for copy and paste:
    <marathon>
      <opengl> 
      <!-- coll22 seq#11 water filtration device into 3D -->
    <model coll="22"
            file="art/ani3D/wfd/mesh.xml"
            file1="art/ani3D/wfd/pose.xml"
            file2="art/ani3D/wfd/animate.xml"
            type="dim3"
            scale="0.8"
            x_rot="-90"
            y_rot="0"
            z_rot="0"
            x_shift="0"
            y_shift="0"
            z_shift="0"
            side="0"
            norm_type="0"
            light_type="0"
            depth_type="0" >
           
    <seq_map seq="24" model_seq="-1"/>  <!-- Shapes: 3D-static default wfd -->
    <seq_map seq="11" model_seq="0"/> <!-- water filtration device -->
    
    <skin  
    		 clut="-1"
             opac_type="0"
             opac_scale="1"
             opac_shift="0"
             normal_image="art/ani3D/wfd/wfd.jpg"
             normal_mask=""
             glow_image=""
             glow_mask="" />
    
       </model>
    </opengl>
    </marathon>
    
    		
    this works well IF...
    this file-structure is present

    Copy the above script, save as something (3D_waterscenery_wfd) into the folder: Scripts.

    About CLUT replacement
    Above mml has the line

    clut="-1"

    This is good for scenery, because it just adds a texturemap to any replacement whatever clut is has.
    For different flavours (green pfhor, red, blue, pink), each CLUT has to have a replacement line.
    <skin  
    		 clut="0" <!-- first CLUT -->
             opac_type="0"
             opac_scale="1"
             opac_shift="0"
             normal_image="art/ani3D/wfd/L33T.jpg"
             normal_mask=""
             glow_image=""
             glow_mask="" />
    <skin  
    		 clut="1" <!-- second CLUT -->
             opac_type="0"
             opac_scale="1"
             opac_shift="0"
             normal_image="art/ani3D/wfd/L33T_scarred.jpg"
             normal_mask="art/ani3D/wfd/L33Tmask.jpg"
             glow_image="art/ani3D/wfd/L33Tglow.jpg"
             glow_mask="art/ani3D/wfd/L33Tglowmask.jpg" />
    <skin  
    		 clut="8" <!-- DO NOT FORGET, clut 8 is the infravisionview -->
             opac_type="0"
             opac_scale="1"
             opac_shift="0"
             normal_image="art/ani3D/wfd/L33T_infrared.jpg" />
    
    With some thought, awesome scenario-results can be made, replacing a different clut with a whole different texturemap...
    Enemy-flavour one, the enemy is fresh out of school (physics, make wussies)
    Enemy-flavour two, the enemy is battlehardened and has the scars, dents, prostatics and false teeth to prove it (physics, max out enemy)
    Enemy-flavour three, the powersuits of the enemy have been out of juice, and don't glow anymore in the dark.. or uberL33T-mysterious ninja-raised wraiths of another dimension, undsoweiter, undsoweiter.

    Note the unused but ready for use lines of normal_mask/glow_image and glow_mask, go bonkers, and use those too! MML can be adjusted later with the correct new textures, and this way its more handy to have the lines ready to be filled in, for now it doesn't make a difference.
    Note2: if you make a replacement for whole and destroyed scenery with the same model, (shoot evil green light, bulb splatters) make sure to have the same number of replacementtextures, meaning: if whole-scenery has all 4 maps, then broken-scenery too (could be different maps, but same number nonetheless)!
    Or crash.
    Launch ye Marathon

    If an errormessage pops up/A-1 crashes or such, slowly retrace what went wrong, enough RAM?, weird scripting? Bizarre bugs? Just one tiny chocolate?
    Check these settings:


    That's it. Now go building.

    Comments, suggestions etc to

  • M
  • Example ready for use in A1

    example script + model + skin + small shapesjuggler-file
    wfd.sit 140k

    Some images

    typical 'not found correct texture' (+ time to adjust the x-rotation with mml)


    forge view with the 2d wfd, and AlephOne view with 3d wfd



    Some notes
  • Add plenty of RAM to Aleph-One, opengl and loads of textures/models eat memory for breakfast.
  • F4-key resets OpenGl, F4-key is your friend.
  • When a 2d-sprites gets infront of a 3d-object, OpenGl (at least on my comp) has some trouble rendering.
  • When defining a texture mode (the uv-map) in Meshworks, make sure you pre-viewed the possible texturemap, if the model (parts) is overlapping a lot, shift-move the parts in Meshwork (keep in mind how much!) until a nice useable texturemap, add the pinned-mode (+add texture), then shift-move the parts back to a correct model (very akin the plastic airplane models, painting then glue-ing it together).
  • When adding x,y,z-movement in DimAnimator to poses/animations, the actual results in Aleph One are very minimal.
    If this happens, open the pose.xml and/or animate.xml doc, and manually multiply the x,y,z-movement with a factor of around 17x or 20x (!).
    Seems the translation from DimAnimator and A1 needs a nudge :)
    The xml files can be adjusted manualy with say BBEdit, and are saved, even when reloading and re-saving the animation in Dim.
  • DimAnimator will output 3 xml-files and a bmp, keep the bmp untill the utter last editround (heh, does that happen ever?), then ditch it. When you want to reload the xml-filled folder, Dim wants this bmp to texture your object. Otherwise, Dim assumes you have no texture and will add a bland colour to the animation (the HORROR!)
  • A tough problem is (with for example 3D-pfhor), the model will pop out of view when too close (melee-range), workaround (which helps a bit) is adding some planes around your model in Meshworks, and later masking them invisible, so as far as A1 goes, you have a major big model, and will stop popping the model out of view (usually).
  • Setting up a bone chain is better done with some small different chains instead of one huge branched bonechain, experiment a lot. (As if you didn't already :)
  • Take care to put (big) models on a nice big polygon, otherwise; strange clippings will occur.
  • I have the suspision A0 doesn't like to render 'bottles' (two cilinders connected to eachother, smaller one in the big one, donut-shapes, preferable transparent), if there is a huge frameratedrop, think about the models in sight and about re-modeling.
  • Use the textures maximal and economical.
  • Using a lot of models lengthen the loadingtime of A0 significantly.
  • !!! HOT TIP !!! Placed scenery has only one direction to face, be it 3D or not. Enter the wonderworld of Chisel 2.1.6, more precize: Face Objects 1.0.1. With this rather easy to use plugin for Chisel, one can change the horizontal rotation of any scenery, so for utterly awesomeness (and moderation in file/load-space) you can rotate the same scenery in a map, instead of creating loads of the same scenery things with different rotations.
  • 1-10 Twiddler is a big help for non-animated scenery. Add 9 frames to a scenery animation, and instead of animated scenery, you can now have 9 non-animated poses of that scenery, added randomly on the map akin 'waterpuddles'.
  • It looks like 3dmf-files crashes the March 23 2003 build of Aleph-One.
  • (note to self) Make regular backups...
  • Blond ghols have more fun.
  • spnkrghol