NVIDIA Quadro cards are not recommended for Artec Studio 9 and 10, although they may deliver acceptable performance after you tweak a certain parameter in the NVIDIA Control Panel (see the 'Threaded optimization' section further below). For optimal operation, a very specific version of the NVIDIA graphics driver needs to be installed on your.
- 1Importing
- 2Exporting
- 2.2Source Engine Exportables
- 2.2.2Flex properties
- 2.2Source Engine Exportables
- 3Troubleshooting
Models are imported and exported from Blender with the Blender Source Tools. Any type of object with 2D surfaces can be exported. For details on creating animations for export, see Animation in Blender.
Importing
The 'Import SMD/VTA, DMX, QC' operator is used to import models. You can find it:
- By searching the Space menu (try 'SMD')
- Under File > Import
You can import a whole QC at once to save time.
Options
These can be set in the lower-left area when selecting a file.
- Extend any existing model
- Adds meshes and animations to the armature of the active object, or of the first object found in the scene if none are active. Otherwise a brand new armature is created. Ignored during QC import.
- Import animations
- SMD animations are very large. They take a lot of time to import and take up a lot of disc space. You can skip them when importing a QC by unchecking this box. Ignored during SMD import.
- Up axis
- Rotates everything so that it points upward in Blender if it didn't originally, and configures the Target Up Axis property of the current scene. Automatically set during QC import.
- Make camera at $origin
- Helpful when importing viewmodel QCs. If this is not set, an Empty is created instead.
- Rotation mode
- How keyframes are created. Euler is human-readable, Quaternion avoids gimbal lock.
Exporting
The 'Export SMD/VTA/DMX' operator is used to export models, animation and shape keys. You can find it:
- By searching the Space menu (try 'SMD')
- Under File > Export
- On the export configuration panel seen below
The Source Tools are designed to make repeat exports as painless as possible. To that end, once you have set up an Export Folder (see below) objects/groups are exported there using their Blender names.
The Source Tools' three export panels can be found under + Scene Properties. Due to the way Blender's addon system works they will start off at the bottom of the area, but you can drag them higher with the grips in the top right corners.
Source Engine Export
This panel contains scene options, export buttons, and utilities.
Note:You won't be prompted for a filename. Exports are made to the folder given in Export Path, using the exportable item's Blender name as a filename.
Tip:Use the Source Engine Exportables panel to configure the Scene Export option.
Tip:If you start the path with
//
it will be relative to the location of the .blend file.bin
folder of the engine branch for which you are making a model. This determines DMX version and is used to select the correct version of studiomdl when compiling QCs.Source Engine Exportables
This panel contains settings for each of the exportable items in the scene. The checkboxes determine what is exported when you select the Export Scene export mode (filtering the list UI does not do this). There are three types of exportable item:
- Groups
- Objects which have been grouped together in Blender are merged and exported to the same file.
- Objects
- Objects not in a valid Group are listed here. They will be exported individually.
- Actions
- Actions are the source of skeletal animations. Only Actions from Armatures are listed.
The 'Subfolder' option can be used to change the folder to which an item is written.
There may also be some of the following sub-panels:
Group properties
This panel lists all of the Group's exportable members. You can disable each one individually.
Note:Filtering the list UI doesn't affect which items are exported.
There are two advanced options:
- Suppress
- Makes the Source Tools ignore the Group, returning its members to the list of exportable items (unless they are in other unsuppressed Groups).
- Merge mechanical parts
- This option only appears when exporting DMX. When enabled, the exporter will run the Join operator on objects which share the same bone parent, reducing the number of individual items written to the output file. This is useful when you are exporting complicated mechanical objects consisting of many bone-parented objects.
Flex properties
If you are exporting DMX, flex animation controllers are defined in the model file (if you're exporting SMD they are defined in the QC and this panel won't appear).
The Source Tools don't provide any UI for defining flex controllers. Instead there are two options:
- Simple
- Generate simple flex controllers every time you export
- Advanced
- Insert the flex controllers of another DMX file
Advanced mode
Advanced mode has the following settings:
Tip:See Flex animation#DMX format for details on writing your own flex controllers. Use the Text Editor's Edit > Insert UUID operator to generate unique IDs.
Tip:To enable wrinkle map generation, set a non-zero
wrinkleScales
value in the relevant flex controller definition. Note:The algorithm for applying corrective shapes is not guaranteed to match Source's, so always check your work in HLMV!
Armature properties
There are no special Action properties; instead, this panel displays the properties of the relevant Armature.
Note:Only armature bone animation created in Pose Mode can be exported. See Animation in Blender.
- Action selection
- You can choose how to select Actions for export: either the active Action or NLA track, or a filtered list of all Actions in the .blend. This is fiddly, but unfortunately Blender does not currently provide a good way of associating multiple Actions with any one Object.
- Implicit motionless bone
- Creates a dummy bone for vertices which don't move. Otherwise Studiomdl will attach them to the root bone.
- Enabling this option emulates Blender's behaviour with regard to unweighted verts, but may break compatibility with existing exports.
- Action selector
- Changes the Armature's current Action. This is a built-in Blender setting that has been placed here simply for convenience.
Curve properties
Determines which side of an extruded Curve to generate polygons on.
Source Engine QC Compiles
The Source Tools can automatically run studiomdl on demand or after an export. They will not actually generate a QC for you!
- QC file path
- This is where the Tools should look for QCs to run. You can use the
//
syntax to make the path relative to the .blend file, and you can also use*
and?
to perform a wildcard search for multiple files. - [QC List]
- This is where any QCs found at the QC path are displayed. You can compile one at any time by clicking its button.
- Compile all on export
- Automatically compiles all QCs when anything is exported.
- Compile all now
- Does exactly what it says.
- Launch HLMV
- Launches HLMV from your SDK folder. If Game Path has been defined, it will override the system VPROJECT value.
Troubleshooting
Animation
- My animations are messed up!
- Version 1.1 of the Tools changed the way bones are exported. You can fix the problem by re-exporting everything, but if that isn't an option see the + Armature Properties panel and enable 'Legacy rotation' (only available when exporting SMD).
- My animation won't export!
- Only armature bone animation created in Pose Mode can be exported. See Animation in Blender.
Meshes
- My mesh is in the wrong place!
- The Source Tools export each object relative to its own origin, not the scene's, unless it is parented to another object. If you need to align meshes with each other (e.g. Groups, collisions, gibs) then make sure that they are all parented. Create an Empty if need be; the parent itself doesn't have to be part of the export.
- Studiomdl always says my collision mesh has '2-dimensional geometry'!
- The edges of collision geometry must be smooth. Use the 'Shade Smooth' operator on your object. Also, there cannot be any holes in the mesh. See Collision mesh#Caveats.
Export filename
- My stuff is exporting with the wrong name!
- Names of Blender objects/data used have an annoying 29-character limitation, which the Source Tools overcame by using a Custom Property called 'smd_name'. Remove the property (via the 'Custom Properties' panel) and the Blender name will be used again.
- I don't want my animations in a subfolder!
- You can use a subfolder of
.
(which means 'current directory') to preventanims
from being inserted.
I found a bug
Retrieved from 'https://developer.valvesoftware.com/w/index.php?title=Blender_Source_Tools_Help&oldid=196261'
< Blender 3D: Noob to Pro
previous module: 'Modeling a Simple Person' | • Table of Contents • Glossary | next module: 'Detailing Your Simple Person 2' |
---|
Your goal.
Few real-life objects have perfectly sharp edges. People, in particular, consist of mainly smooth surfaces. How does one model a smooth object using flat faces and sharp edges?
In this module, you'll learn how to smooth a mesh by using subsurfaces and smooth shading.
- 1Subsurfaces
- 2Smooth Shading
You'll need the simple person model from the previous module. If you haven't done it, either go back and do it now or download the pre-made model from Yosun Chang's website at http://www.nusoy.com/blender.
If the model doesn't look solid, your Viewport Shading setting may be set to Wireframe. To switch to Solid shading:
- Activate the 3D View window.
- Press Z .
Subsurfaces[edit]
The sub surface modifier.
So far, all the meshes you've created have had sharp edges, giving them a faceted appearance like that of a cut diamond. To model a smooth object (like a human body) you might think you need a huge number of vertices and faces. Subsurfaces partly solves this problem by automatically subdividing a mesh into a finer mesh suitable for smooth rendering.
You subsurface in Blender by adding a subsurf modifier to an existing mesh object. A modifier is simply an algorithm (automatic process) which can be added to an object. (Blender modifiers are analogous to Photoshop adjustment layers.)
To get started, make sure Blender is in Object Mode, with only the simple person object selected:
- If Blender is in Edit Mode, press Tab .
- To select the simple person, RMB on it.
To add a subsurf modifier to the selected object:
- Click on the modifiers tab (wrench icon) in the Properties window.
- Add Modifier → Subdivision Surface.
You could also add subsurf modifier by pressing Ctrl + 1Key .
![Drivers Drivers](/uploads/1/2/5/7/125744141/756365611.jpg)
The object's appearance should immediately become more faceted and more rounded. In addition, several subsurface controls will appear in the Modifiers tab.
The modifier has been added, but it hasn't actually been 'applied' yet. (Applying a Blender modifier is analogous to flattening a Photoshop adjustment layer.) |
The model may include some double vertices. To get rid of these:
- Edit the model in Vertex select mode.
- Select all vertices.
- Mesh → Vertices → Remove Double
- Try again.
If Blender crashes when you attempt to subsurf an object...
You need to look in to upgrading (or possibly even downgrading) your graphics drivers. Having the right graphics driver can avert many problems.
What just happened? The default subsurf modifier (one level of Catmull-Clark) subdivided each face of the object into four smaller faces that are progressively angled. This softened the sharp edges of the original model where faces met at 90-degree angles.
Controls[edit]
For this model, one level of subsurf isn't quite enough. To increase the number of levels to two, just increase the number in the text box directly underneath Subdivisions. The View setting controls the number of subdivision levels visible in the viewport. This is very useful when you have a high-poly scene, just decrease the number of visible subdivisions to speed up viewport action.
You can specify additional levels of subsurfing to be used during renders. For extra smooth renders, you might want three levels of subsurfing. Set this with the Render control immediately below the View control.
The Apply button applies the modifier to the mesh. Do not click it yet. We'll be playing with the model a bit longer before we apply the changes. While useful with some modifiers, applying a subsurf modifier produces a very complex mesh, and there's no need to do so here.
Remember that you can undo any accidental modifications with Ctrl + Z .
Blender can combine a series of modifiers by stacking them. For this reason, the Modifier tab includes buttons for arranging and removing modifiers.
You can hide edges created by the modifier by activating the Optimal Display toggle button. The effect is especially clear with the Wireframe draw type.
You can edit the mesh in modified form (without actually applying the modifier) by activating the Adjust edit cage to modifier toggle button, a small button with a triangle and vertices, to the left of the Up/Down arrows (the arrows are for changing the position of the modifier in the stack) in the Modifier panel.
Try this out:
- Press Tab to enter Edit mode.
- Make sure Blender is in Vertex select mode.
- Note that the vertices no longer lie on the surface of the object.
- Activate the Adjust edit cage to modifier button.
- Now all vertices lie on the surface of the object, and you can adjust the (modified) vertices directly. However, any additional vertices created by the modifier cannot be directly edited without applying the modifier.
You will be editing the boxy version of the simple person awhile longer, so before continuing, deactivate the Apply modifier to editing cage during Editmode button.
Smooth Shading[edit]
Your simple person after setting smooth.
Subsurfaces do a good job of smoothing out corners in meshes. Even with two levels of subsurfaces, however, the simple person does not look completely smooth; when viewed close up, it has a scaly appearance. This is because each face is flat shaded—shaded to resemble a flat surface—resulting in sudden changes in brightness at most edges. For a smooth object, you want smooth shading, which smooths out the changes in brightness.
- Go to Object Mode.
- Set the draw type of a 3D View window to 'Solid'.
- Select your subsurfed object.
- In the Toolshelf on the left, look for a caption called Shading. Under it should be a button called Smooth.
- All the mesh edges will be smoothed out, leaving no sudden changes in brightness. The faces blend smoothly into one another, making the edges nearly invisible. If the icosphere has not smoothed properly and is dimpled, enter Edit Mode by pressing Tab , select all vertices (A) and recalculate the normal direction (CTRL+N). This is also available in the Toolshelf under Normals.
- Click the other button under Shading in the Toolshelf, named 'Flat'.
- The edges will reappear. Now you know the difference between Flat and Smooth.
- Since the model looks better with smooth shading, click LMB on the 'Smooth' button again.
Note that if you didn't have subsurf enabled, then the mesh wouldn't look much different. This is because smooth shading doesn't affect the mesh shape, it just changes how the computer draws the triangles.
Smooth shading also removes a lot of definition. A good way to get rid of this is simply to add a subsurf modifier like you just did. The modifier will not only require fewer vertices, but add definition.
- Flat Shading
- Smooth Shading
Save your work. You will continue refining this model in the next module.
Additional Resources[edit]
- Flat shading at Wikipedia.
- Gouraud shading at Wikipedia.
- Phong shading at Wikipedia.
- Subdivision surface at Wikipedia.
- For more about modifiers, see the Blender Manual page on 'The Stack' at http://wiki.blender.org/index.php/Doc:Manual/Modifiers/The_Stack
- For more about Blender subsurfaces, see the Blender Manual page on 'Subdivision Surfaces' at http://wiki.blender.org/index.php/Doc:Manual/Modeling/Meshes/Subdivision_Surfaces.
previous module: 'Modeling a Simple Person' | • Table of Contents • Glossary | next module: 'Detailing Your Simple Person 2' |
---|
Retrieved from 'https://en.wikibooks.org/w/index.php?title=Blender_3D:_Noob_to_Pro/Detailing_Your_Simple_Person_1&oldid=3196983'