Search public documentation:
UE3 Home > Static Meshes > Using StaticMeshActors
UE3 Home > Level Designer > Using StaticMeshActors
UE3 Home > Level Designer > Using StaticMeshActors
Static meshes are one of the foundational types of renderable geometry in Unreal Engine 3. In order to use these meshes to populate your worlds, the StaticMeshActor is used. This is a type of actor that displays a single StaticMesh and cannot move or be modified during play, i.e. it is static. These actors are used to create the majority of the world geometry within maps.
StaticMeshActors are placed in maps using standard actor placement methods; either through the right-click context menu of the viewports or drag and drop from the Content Browser. Context Menu
- In the Content Browser, select the StaticMesh you want to add to the map as a StaticMeshActor.
- Right-click in the viewport where you want to add the mesh and choose Add StaticMesh: [MeshAssetPath] from the context menu. The location does not need to be exact. You can always reposition, rotate, scale the mesh afterwards.
- The StaticMesh has been placed in the map as a StaticMeshActor, as seen in the Property Window.
- In the Content Browser, locate the StaticMesh you want to add to the map as a StaticMeshActor.
- Left-Click on the StaticMesh in the Content Browser and drag the mouse (while holding the left mouse button down) from the Content Browser to the location in the viewport where you want to place the mesh. The location does not need to be exact. You can always reposition, rotate, scale the mesh afterwards.
- Release the left mouse button to place the mesh in the map as a StaticMeshActor, as seen in the Property Window.
StaticMeshActors can be converted to and from certain other types of actors which display a StaticMesh through the right-click context menu of the viewports. This can be handy should you decide that you want a mesh previously placed in the map as a KActor or InterpActor to be a StaticMeshActor, or vice-versa. Converting to a StaticMeshActor
- In the viewport, select the actor you want to convert to a StaticMeshActor.
- Right-Click on the actor and choose Convert > Convert [CurrentActorType] to StaticMeshActor.
- The actor has been converted to a StaticMeshActor, as seen in the Property Window.
The Material(s) applied to a StaticMesh can be overridden on a per-actor basis. This allows a single StaticMesh asset to be used multiple times in a single map or throughout your game while giving each a unique appearance. The Materials property located in the Rendering category of the StaticMeshComponent of the StaticMeshActor is an array of Materials that directly maps to those applied to the StaticMesh asset through the Static Mesh Editor. Materials can be assigned to the array manually or they can be applied directly to the mesh in the viewport by dragging and dropping from the Content Browser. Manual Assignment
- In the viewport, select the StaticMeshActor you want to assign a new Material to and press F4 to open its properties in the Property Window.
- In the Rendering category of the StaticMeshComponent, add a new item to the Materials array by clicking the button. If the StaticMesh has more than one material slot, you may need to add more than one item as the items in the array match the material slots of the StaticMesh.
- In the Content Browser, select the Material you want to apply to StaticMeshActor in the map.
- Press the button for the corresponding item in the Materials array to assign the material. The mesh is now displayed with the Material applied.
- In the Content Browser, locate the Material you want to apply to StaticMeshActor in the map.
- Left-Click on the Material in the Content Browser and drag the mouse (while holding the left mouse button down) from the Content Browser to the section of the StaticMeshActor in the viewport you want to apply the Material to.
- Release the left mouse button to apply the Material. The mesh is now displayed with the Material applied and the Materials array in the Property Window has been updated.
By default, StaticMeshActors use the COLLIDE_BlockAll Collision Type. This means they will block all actors and traces in the world. Since StaticMeshActors are generally used for placing world geometry, this is usually the desired behavior. However, collision calculations do have a cost so any StaticMeshActors that do not need to collide with other actors should have their collision disabled. For instance, StaticMeshActors used as small decorations or background environments that are unreachable by the player may not need to actually block anything. The selected StaticMeshActor is a decorative mesh that probably doesn't need collision.
The selected StaticMeshActors outside the window make up the background environment where the player is never able to reach.
Collision Types The Collision Type property is a method of exposing several collision settings in a simple way. Changing this value in Unreal Editor will set the low level flags such as CollideActors, BlockActors, BlockNonZeroExtent, BlockZeroExtent and BlockRigidBody on the Actor and its CollisionComponent to match the description of Collision Type.
|COLLIDE_CustomDefault||Programmer set collision. This restores collision to defaults set in the default properties when selected.|
|COLLIDE_NoCollision||The Actor will neither block nor touch other actors or traces.|
|COLLIDE_BlockAll||The actor will block other actors and traces.|
|COLLIDE_BlockWeapons||The actor will block zero extent traces only, such as instant hit weapons.|
|COLLIDE_TouchAll||The actor will touch other actors and traces.|
|COLLIDE_TouchWeapons||The actor will touch zero extent traces only, such as instant hit weapons.|
|COLLIDE_BlockAllButWeapons||The actor will block other actors and non-zero extent traces only.|
|COLLIDE_TouchAllButWeapons||The actor will touch other actors and non-zero extent traces only.|
|COLLIDE_BlockWeaponsKickable||Same as COLLIDE_BlockWeapons, but also enables the actor to be kicked by player physics.|
- Collide Complex
- If enabled, simplified collision geometry on this actor will be ignored and collision will be performed per-polygon. Simplified collision geometry is generated in Unreal Editor or within a 3D content creation package. Colliding per polygon is useful for non-zero extent traces so that bullets will collide accurately. Colliding per-polygon is not recommended for Actor movement as it is expensive to do so.
- Block Rigid Body
- if enabled, Actors using PhysX should collide against this actor.
- No Encroach Check
- If enabled, encroachment checking when this Actor is moved is turned off. Enabling this speeds up the game, but the actor will not be able to touch triggers, push players, enter or exit volumes.
- Path Colliding
- If enabled, this Actor can block paths during path building in Unreal Editor.
- Collision Component
- Reference to the component used for collision calculations of this Actor.
Visibility of StaticMeshActors can be controlled based on the distance from the camera using the MinDrawDistance and MaxDrawDistance properties of the StaticMeshComponent (located under the Rendering category). These two properties allow you to specify both a minimum and maximum distance from the camera where the static mesh of the actor will be rendered. The ability to control the distance at which meshes are rendered can be used simply to hide meshes when the player is too far to see them (as shown above), or it can be used to swap out one or more higher-resolution meshes for low-resolution proxies (or a single proxy taking the place of multiple high-res meshes) by placing multiple StaticMeshActors in the same location(s) where the MinDrawDistance of the low-res mesh(es) is the same as the MaxDrawDistance of the high-res mesh(es). Of course, simply using the LOD system inherent to StaticMeshes could perform the same function as shown above, but this method allows the level designer to handle the setup as the Mesh Simplification Tool can be used to create low-res versions of existing meshes directly in Unreal Editor. And, as mentioned previously, multiple higher-res meshes can be swapped out for a single low-res proxy that in order to not only lower the poly count, but the number of draw calls as well. This same concept is the basis for the Massive LOD system. See Visibility Culling for more information on how the visibility of static meshes and other geometry controlled in UE3.