Convert Scene to Model

Posted Dec 19, 2016
Last Updated Sep 4, 2018

If you need to convert a scene to a single model (or large sections of a scene) you can use the Convert Scene to Model utility. The tool is found in Wall Worm > Wall Worm Model Tools > Convert Scene to Model. In many cases this tool is used for clustering props (to reduce prop count in a scene).

When you run the function, the tool can collapse the targeted objects (scene or sub-selection) into a single object, delete most tool texture faces, weld vertices and create a WWMT Helper for the object to export as a model. This tool was intended as a replacement for Propper (converting imported VMF files into models) but can be used on arbitrary scenes. The video below used this tool to cluster rocks to the landscape.

Converting Scenes to Models

Converting a set of props into a single prop is simple.

Simple Steps for Converting

  1. Open Convert Scene to Model
  2. Select Objects in Scene to convert
  3. Set the Convert option to Convert
  4. Set relevant options (like Weld, Delete Faces with Tool Textures, Convert Models and Generate Collision Hull).
  5. Click Do It.
  6. Review your results and click Accept Last to move onto next object.
  7. Repeat on next set of objects to convert

See Optimizing your Scene below for tips on preparing your scene for clustering.

Exporting the Model(s)

For the most part, exporting the model itself should be as simple as selecting the WWMT Helpers generated in the scene and clicking Wall Worm > Wall Worm Exporters > Export WWMT To Source Models.

Explanation of User Interface

Convert

Choose the objects to convert: Selected Objects or the Entire Scene.

Skip Hidden

Skip all hidden objects in the new model.

Skip Import Layers

Skip objects that are part of hidden Utility Layers that WW creates during QC imports.

Convert Models

Include model props. When off, ignores objects of the WallWormMDL class.

Skip Dynamic MDLs

When on, will skip models that were not compiled with $staticprop.

Convert Displacements

When off, skips displacement objects. If you convert displacements, you will need to do extra work for baking blends.

Convert Untagged Geometry

When on, will use any geometry in selection/scene unless filtered with displacement/model options. When off, only objects that would normally export as brushes (and MDLs/displacements) will get collapsed.

Skip Import Layers

The function will skip objects that are put in standard utility and import layers created by WW.

Delete Faces with Tool Textures

Delete the faces of the model with textures that have the word "Tool" in them.

Weld Verts

Weld the vertices of the model.

Create WWMT

Generate a WWMT Helper with the resulting model to re-export into Source

Pivot to Origin

Place the model's pivot at the world origin.

Illumination Origin

Set options for where the illumination origin should be.

Create Collision Hulls

Generate a Hull from each Element of the model. Warning: this can be slow with large scenes!

Delete Objects that Cannot Convert

Delete skipped objects from the scene. Do not do this if there are objects you need to keep like entities.

Advanced Options

Union Parts

This function requires the Carver plugin to be installed. The tool will remove all intersecting faces of the resulting model.

Use Culling Objects

This setting will cull away any geometry that intersects with the culling objects. Uses include removing faces of props that are hidden under a displacement, etc.

Optimizing your scene for Clustering

This document details methods for efficiently setting up your scene to cluster with the Convert Scene to Model tool in Wall Worm. There are two main functions in the Convert Scene to Model tool:

  • Clustering multiple meshes into single WWMT Helper models.

  • Culling (deleting) faces that the player never sees.

Clustering

Clustering (merging meshes) takes the least amount of preparation but still takes planning. These are things to consider for merging. When using Convert Scene to Model, Clustering is always performed.

  • When merging multiple objects into a single model, you should consider the physical dimensions because large models often do not light well in Source. Consider creating clusters of objects that are in relatively limited spaces and have similar lighting angles.

  • There is a limit on the number of vertices allowed in each model. Exact limits are dependent on different versions of Source. If the set of objects to cluster have over 24 thousand vertices, you might consider using less objects in the cluster. There is also a face count limit. *Culling (below) can help reduce mesh resolution.

  • There is a limit to the number of materials that can be on a single model. This limit is classically 32 materials. Normally, each MDL has its own material--meaning that if you are clustering more than 32 different MDLs, the resulting model will fail. This number is even less if the MDLs have multiple materials in them.

  • If you need collision models on your clusters, it’s best to cluster MDL nodes that already have hulls. This will reduce the amount of work to create hulls. However, if the collision model has more than 20 elements, it will be considered expensive.

  • All clustered props become static props. This is why the default options have Skip Dynamic Models turned off--since any animations or dynamic attributes of such MDL nodes will be lost if clustered.

Culling

Culling is the process of removing all faces the player cannot ever see. Culling normally reduces the polycount and total drawcalls. However, the process of culling has several requirements and is often time-consuming. The culling tools in the Convert Scene to Model are designed to help you cull your scene more efficiently. Unlike clustering, culling is optional in Convert Scene to Model.

Challenges you will face

The culling tools in Wall Worm utilize the Boolean functions inside 3ds Max. There are several boolean tools in Max that Wall Worm can use. The Convert Scene to Model lets you choose among these options: ProBoolean, Boolean2 and Boolean3* (Boolean3 is only available in 3ds Max 2018+). Sometimes a setup will work best with ProBoolean, other times with Boolean3.

Here are some important considerations for culling:

  • Watertight models (those with no open edges) work best. If the model isn’t watertight it is likely to cause problems with the boolean functions. Seal your models before culling.

  • Watertight culling meshes are also prefered.

  • If the models or culling meshes have self-intersecting faces, the culling function will almost certainly fail.

  • Because the boolean functions require sealed meshes, models and culling meshes are generally welded and holes are capped. When done automatically, the odds increase that there will be self-intersecting faces (and causing a failure). This is why you should carefully seal your objects.

  • For MDL nodes that are not already sealed (but are already compiled) you can choose to recompile them as sealed (which may add extra polys in previously compiled levels) or you can create a Substitute mesh. A substitute mesh is one that is used instead of the MDL mesh and is referenced via a Substitute Modifier. You can create this by selecting a MDL with an open edge and clicking the Create Substitution button in the MDL Node’s MDL Utilities rollout (WW 3.748+). Once created, edit that new mesh (sealing it and removing self-intersecting geometry) before culling the meshes. Edits to the substitute mesh will propagate to all the MDL nodes in the scene using the same MDL file. 

  • Several of the Advanced culling functions require Carver (an inexpensive tool developed by Wall Worm).

Re-Clustering Props

Sometimes you may need to edit a cluster of props. To do this, you must have not turned on the Delete Original on Accept option when creating the cluster.

Remaking Clusters with WWMT Helpers

cluster dataIf your cluster had an automated WWMT Helper generated with it, you will find a new rollout at the the bottom of the modify tab when you select the WWMT Helper called Cluster Data. That rollout list all the original mesh nodes that created the cluster. It also includes some functions to select the originals as well as to restage the prop. If you restage the prop, the current cluster, the WWMT Helper and all extra parts of the clustered prop will be deleted and the original nodes will be reselected--this allows you to rebuild the cluster with the Convert Scene to Model functions.

Convert Scene to Model UI

UI for the Convert Scene to Model tools in Wall Worm.

cluster data

Rollout applied to WWMT Helpers created by Convert Scene to Model.


Newsletter Subscription