Starfield Mod:Adding Collision with 3ds Max 2021

From Starfield Wiki
Jump to: navigation, search

Adding Collision with 3ds Max 2021[edit]

Read this guide to add primitive collisions to a static mesh and export to the CreationKit.

Prerequisites[edit]

Creating the Collision[edit]

This part is complicated, you can make collisions with the following objects, in escalating amounts of cost.

  • Sphere (cheap)
  • Capsule
  • Cylinder / Box
  • Convex Hull
  • Mesh (extremely expensive)

You can use multiple primitives to make up the collision of an

entire object. A handful of boxes is still very likely cheaper than a mesh collision.

For this tutorial, we're going to take a very simple table mesh and add collision to it. It's not pretty but it gets the job done!

Table Mesh in 3ds Max

This mesh has the following structure where the legs (BestTableEverLegs) are linked to the table top (BestTableEver) which is then linked to the TestExport which is the name of our export config for the FBX:

Table structure in 3ds Max with no collision
Table structure in 3ds Max with no collision
The naming of the collisions for statics hasn't seemed important so far, but it is a convention that dates back to at least Skyrim.
When creating the primitives (sphere, capsule, cylinder & box) try not to convert them to Editable Poly/Mesh. This can break the transform and scale of the collision.
  1. Create a box roughly the size of the table top and name it c_TableTop
  2. The creation of a primitive box in 3ds Max
    The creation of a primitive box in 3ds Max
  3. Create a box collision around one of the legs, clone and move the clones to the other legs. Name them c_TableTopLeg01, c_TableTopLeg02, c_TableTopLeg03 & c_TableTopLeg04
  4. The collision primitives can overlap with no problem!
  5. You should now have the following primitive collisions
  6. A list of the collision objects in 3ds Max
  7. Now, link all of the collisions to BestTableEver, so the full structure should look like below. It's imperative all children of the main mesh are at the same link level.
  8. The object with correct collision structure
    The object with correct collision structure
  9. Select BestTableEver and ALL of the collision meshes (the meshes prefixed with c_)
  10. The selected collision objects
    The selected collision objects
  11. In the menu bar, choose Havok Content ToolsPhysicsCreate Rigid Body with Proxy(s)
  12. The BestTableEver object should now have the Rigid Body modifier and the collision meshes should have the Shape (aka Havok Shape) modifier
  13. Check each collision mesh, click the Shape modifier and ensure they have Shape Type set to Box
  14. The Havok Shape in 3ds Max
    The Havok Shape in 3ds Max
  15. Select the BestTableEverLegs object and in the menu bar, choose Havok Content ToolsPhysicsCreate Rigid Body

      Assign Collision Materials[edit]

      Collision materials will allow you to define how the surface of the mesh reacts to bullets and what it sounds like to be walked on. You can assign each collision mesh a single collision material.

      Our table legs are metal, so we'll assign a metal collision material to those. The tabletop is wood so we'll use a wood one for that.

      The steps are the same for any collision, you just change up what material you want to set it to.

      Setting up Utilities[edit]

      1. First we'll want to setup the CollisionGroup utility, start by clicking Utilities on the right side of 3ds Max
      2. Click Configure Button Sets
      3. Set Total Buttons to 9 and drag CollisionGroup under BGS Utility in Utilities
      4. Adding the collision group

      Assigning Collision Materials[edit]

      If you do not see anything listed under Default Materials it is likely because the INI for the Bethesda 3ds Max plugin isn't setup/set properly. Follow Setting up 3ds Max 2021 to set this up.
      1. Select all of the table leg collisions (c_TableTopLegs00, c_TableTopLegs01, c_TableTopLegs02 & c_TableTopLegs03)
      2. Click Utilities --> CollisionGroup
      3. Set Default Materials to MetalHollow
      4. Set Object Type to Static
      5. Click Apply To Selected
      6. Repeat steps 1-5 for c_TableTop but set Default Materials to WoodHeavy

      Export & Test[edit]

      Lastly, we'll export our collision and test it out. This assumes you know how to get NIFs into CreationKit.

      1. Click Open Bethesda FBX export
      2. Check off your mesh and click Export Checked
      3. In CreationKit add the static with your mesh to a cell, select it and hit F4, this will show the collision over the object in red
      4. Example of collision in CreationKit
        Example of collision in CreationKit
      5. In game, try walking on it, and shooting it!