SketchUp to SMD Export plugin

From Valve Developer Community
Revision as of 21:31, 3 February 2010 by YasserMalaika (talk | contribs) (SMD tips)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The SketchUp SMD_export plugin, part of the SketchUp Source Tools, allows SketchUp users to export their models to .SMD files. These may then compiled into models or static props for your levels.

There is also a SketchUp to Hammer Export plugin.

How it works

You start by creating 3D geometry in SketchUp. The plugin translates selected parts of your model to an .SMD file, which you may subsequently compile or "bake" into an .MDL(model) file. MDL files are used by the game engine directly, and are useful as props or parts of the environment to compliment brushes.

The types of geometry you can export to .SMD format are not as limited as they are with .VMF.

Installation

See the main SketchUp Source Tools page for detailed installation instructions.

SMD tips

  • SketchUp is very well suited to doing large-scale environmental props.
  • The .SMD export will only include what is selected. You can keep several models in one SketchUp file, and then export each individually. If you name your components with a prefix of "SMD_" or a suffix of "_SMD", the export dialog will use that as the default filename of the .SMD file.
  • If you want your component to export as an .SMD in a certain folder, you may include a full path. For example, \props_highway\bridge_beamheavy_smd will export to <your_game_dir>\models\props_highway\bridge_beamheavy.smd
  • You can make physics collision models for your props in SketchUp as well. SMD files used for collision should:
    1. Conform to the size and shape of your prop. The collision mesh blocks player movement and projectiles, so it should wrap tightly.
    2. Should be composed of convex, water tight solid volumes. This is not unlike making brushes for VMF export. You can combine several solids to create an overall concave collision volume, but you should try to keep the number of hulls (solids) under 20 or so.
    3. Have a valid game material assigned to each face of the collision mesh.
    4. Have all edges smoothed 100%. This is critical for proper physics functionality in game.
    5. Be inside a Group or Component to ensure proper smoothing export. Collision meshes that are not grouped will not export with correct smoothing.
  • Search for models online at the Google 3D warehouse.
  • The .SMD/.MDL system renders lighting differently than world geometry such as brushes you make in hammer. Thus, you can't apply the same exact .VMT material to the two. VMT material files that are used on world brushes typically start with "LightmappedGeneric", whereas models need to be "VertexLitGeneric". If there's a hammer material you want to use with your .SMD props, you’ll need to make a modified version that is "VertexLitGeneric".
  • VMT's work best when they are under the materials/models folder, and in a folder with the same name as your model. For example, if your model is in models/mystuff, the .VMT should be in materials/models/mystuff. The .VTX files referred to in your .VMT's can live anywhere under materials.

See also