Moderator elections are being held. See Valve Developer Community:Moderator elections for more details.
Users who would like to run for moderator must be autoconfirmed and have at least 100 edits. Users can check their own edit count at Special:Preferences.

Source Engine Collision Tools

From Valve Developer Community
Jump to: navigation, search
Srcengcolltools.gif.gif

Source Engine Collision Tools Source Engine Collision Tools is an addon for Blender (3.0+ / 4.0+), made by Theanine3D, to generate and optimize collision meshes for Source Engine.

Features

Some features are customizeable and can be tweaked via optional settings. There is also a "Recommended Settings" button that will automatically guess the best settings for you based on the currently selected, active object.

  • Generate Collision Mesh - Generate a Source Engine-compliant collision model based on the current active object.
  • Supports (optional) decimation, to automatically reduce the complexity of the resulting collision model
  • Generate Fractured Collision - This operator uses the Cell Fracture addon built into Blender to generate more accurate and performant collision meshes for Source Engine. However, unlike the above operator, it is intended to be used on individual props, not entire scenes at once. Works best on fully sealed objects with no holes or non-manifold geometry.
  • Automatically creates a gap between collision hulls to prevent overlapping. The size of the gap is determined by the "Gap Width" setting
  • Attempts to generate only the amount of hulls specified by the "Fracture Target" setting. ie. A "Fracture Target" of 4 will try to split up the model into only 4 parts.
  • Note that the Cell Fracture addon needs to be enabled in your Blender preferences first!
  • Split Up Collision Mesh - Splits up a selected collision model into multiple separate objects, with every part having no more than 32 hulls.
  • Merge Adjacent Similars - Merges convex hulls with similar adjacent hulls aggressively, lowering the final amount of hulls & producing a (potentially) less accurate, but more performant model. Similarity is based on the face count and volume of the hulls.
  • Remove Thin Hulls - Removes any convex hulls that are significantly smaller than all other hulls.
  • Force Convex - Forces all existing hulls in a collision model to be convex. Especially useful after using Blender's built-in Decimate modifier on an existing collision mesh, to ensure that any decimated hulls are still convex.
  • Remove Inside Hulls - Removes any hulls that are completely or almost completely buried inside other hulls.
  • Generate Source Engine QC - Automatically generate QC files for one or more collision model(s), allowing you to quickly compile them with batch compile tools out there (ie. Crowbar Crowbar)
  • Update VMF - Updates a selected VMF file by automatically adding any partitioned/split-up collision models that haven't already been added to the map.
  • Export Hulls to Hammer .VMF - Converts hulls in the selected collision mesh into Source Engine brush solids and exports them as a .VMF file that can be opened in Hammer.

Installation

  • For the newest, bleeding edge version, visit the GitHub page and then click on the big green "Code" button near the top. Then choose "Download ZIP"
  • If you want a more stable release, check the Releases.
  • After downloading either of the above, go into Blender's addon preferences (File → Preferences → Addons)

4. Click the "Install..." button and browse to the ZIP file you just downloaded, select it, and press "Install Add-on"

Tips

  • The UI for the addon is found in the "Object Properties" tab on the right-hand side of the Blender window. The UI's features are greyed out if you have no object selected, so select an object first in the 3D VIewport.
  • Decimation (by the Generate Collision Mesh operator) generally makes the Merge Adjacent Similars operator less effective, but Decimation is much faster at reducing the final complexity of the collision mesh. However, Decimation will reduce the complexity uniformly across the entire model, whereas Merge Adjacent Similars tries to reduce complexity only where similar hulls are found.
  • Merge Adjacent Similars is less effective on overly large, complex models. For best results, split up a large complex model into several (3-5) separate pieces first, and then use Merge Adjacent Similars on each individual piece.
  • For the "Update VMF" feature, the very first part of your split-up collision mesh, ending in 'part_000.mdl', must already be in the VMF somewhere (such as in a prop_static). The operator scans the VMF for any part_000, and any that are found are used as a template for all the other parts. So you'll need to add that first part manually in Hammer first.
  • Source Engine has a limit of 32 hulls per collision mesh. Going beyond 32 hulls can lead to severe lag during gameplay. The "Split Up Collision Mesh" and "Update VMF" features are handy for this. By splitting up your collision mesh into 32-hull parts, you prevent lag, and the Update VMF feature can add numerous (even dozens or hundreds) of parts automatically for you to a VMF file.


Links