AntennaHowto

From BFEditor

Jump to: navigation, search

Prerequisites

  • Max 7 or 8. GMAX probably works.
  • Latest exporter tools.
  • Know how to export BF2 models already.

Steps

1. Make your thing you want to sway. I'm making a stubby version of the vanilla antenna. For this, my model will be a pyramid with 3 height segments. Really easy to make. I'm giving it a plain black texture.

http://orgx.com/fh_work/antenna_tut01.png

Now, you have your thing unwrapped and textured, with a BF2 bundledmesh material.

2. Select it, run the bundledmesh wizard. This will copy your mesh into a hierarchy. Delete the geom1 portion and all children. This leaves you with a really simple hierarchy:

  • root_bundledMesh_stubantenna helper
    • geom0 dummy
      • lod0 dummy
        • stubantenna editable mesh

3. Rename your hierarchy. The root becomes 'root_skinnedmesh_stubantenna'. The mesh becomes 'stubantenna__AntennaObject'.

  • root_skinnedmesh_stubantenna helper
    • geom0 dummy
      • lod0 dummy
        • stubantenna__AntennaObject editable mesh

4. Create your skeleton. A skeleton is a hierarchy of pyramid primatives. I'm following the BF2 skeleton here, using two bones plus the root. Create these under a helper called 'root_skeleton_stubantenna_setup', though obviously the 'stubantenna_setup' bit of this can be whatver you like.

Now you have two hierarchies in your scene:

  • root_skinnedmesh_stubantenna helper
    • geom0 dummy
      • lod0 dummy
        • stubantenna__AntennaObject editable mesh
  • root_skeleton_stubantenna_setup helper
    • root pyramid primative
      • joint2 pyramid primative
        • joint3 pyramid primative

5. Duplicate your entire root_skeleton_... hierarchy. Rename the helper to 'ske:skeleton' and parent this directly to the geom0 of your root_skinnedmesh_....

  • root_skinnedmesh_stubantenna helper
    • geom0 dummy
      • lod0 dummy
        • stubantenna__AntennaObject editable mesh
      • ske:skeleton helper
        • root pyramid primative
          • joint2 pyramid primative
            • joint3 pyramid primative
  • root_skeleton_stubantenna_setup helper
    • root pyramid primative
      • joint2 pyramid primative
        • joint3 pyramid primative

6. Now add a skin modifier to your mesh, and add the bones from the ske:skeleton skeleton to the modifier. Weight your verts using whatever you like. I found Max 8's "weight all vertices" thing good here.

7. Select your 'root_skeleton_stubantenna_setup' and export. This will give you a stubantenna_setup.ske.

8. Select your 'root_skinnedmesh_stubantenna' and export. This will give you a meshes/stubantenna.skinnedmesh and a stubantenna.con which looks like this:

GeometryTemplate.create SkinnedMesh stubantenna

ObjectTemplate.create AntennaObject stubantenna
ObjectTemplate.saveInSeparateFile 1
ObjectTemplate.creator BUTTSLOL:jpixton
ObjectTemplate.geometry stubantenna

include stubantenna.tweak

Create a stubantenna.tweak (use the editor if you like). Mine contains this -- different from the default BF2 antenna because it's more stiff due to being smaller.

ObjectTemplate.activeSafe AntennaObject stubantenna
ObjectTemplate.saveInSeparateFile 1
ObjectTemplate.geometry stubantenna
ObjectTemplate.floaterMod 0
ObjectTemplate.hasMobilePhysics 0
ObjectTemplate.antenna.skeleton objects/vehicles/land/common/stubantenna/stubantenna_setup.ske
ObjectTemplate.antenna.maxSwayAngle 40/40
ObjectTemplate.antenna.stiffness 0.6
ObjectTemplate.antenna.damping 0.05
ObjectTemplate.antenna.accelerationFactor 20

9. Add stubantenna to your vehicles :)

http://orgx.com/fh_work/example_hierarchy.png

http://orgx.com/fh_work/example.jpg

Personal tools