您的位置:首页 > 产品设计 > UI/UE

UE4 Static Mesh LODs

2015-09-02 17:33 627 查看


Static Mesh LODs

Static Meshes can make use of levels of detail (LODs) in-game in order to limit the impact of meshes as they get farther from the camera. Generally, this means each level of detail will have a reduced number of tris and, perhaps, a simpler material
(or materials) applied to it.



The FBX pipeline can be used to export/import these LOD meshes.


LOD Setup

General

In general, LODs are handled by creating models of varying complexity going from the full-detail base mesh to the lowest-detail LOD mesh. These should all be aligned and occupying the same space with the same pivot point. Each LOD mesh can have completely different
materials assigned, including different amounts of materials. This means the base mesh could use multiple materials to give the desired amount of detail up close, but the lower-detail meshes could use a single material since details will be less noticeable.

Select all of the meshes (base plus LODs) in order from the base LOD down to the last LOD. This is important so that they are added in the correct order in terms of complexity. Then select the Level of Detail > Group command from the Edit menu.



You should now have the meshes all grouped under the LOD Group.




Export LODs

To export the StaticMesh LODs:

In Maya: select the LOD Group and any collision geometry.



Follow the same export steps used for the base mesh (described above in the Export
Mesh section). Make sure to enable export of animations in the FBX exporter properties. This is required for LODs to be exported.


Import LODs

Static Mesh LODs can be imported along with the base mesh in the Content Browser or they can be imported individually through the Static Mesh Editor.

Mesh with LODs

Click the

button in the Content
Browser
and choose Import. Navigate to and select the FBX file you want to import in the file browser that opens. Note: you may want to select

in
the dropdown to filter out unwanted files.





The imported path of the imported asset depends on the current location of the Content Browser while importing. Make sure to navigate to the appropriate folder prior to performing the import. You may also drag the imported assets into a new
folder once import is complete.

Choose the appropriate settings in the Import dialog. The defaults should be sufficient, but also make sure that Import LODs is enabled.Note: When importing LODs, the name of the imported mesh will follow the default Naming
Rules
. See the FBX Import Dialog section
for complete details of all of the settings.



Click the

button to import the
mesh and LODs. The resulting mesh, material(s), and texture(s) will be displayed in the Content Browser if the process was successful.



Although textures and materials can be imported with a Static Mesh, only Color and Normal will automatically be connected (assuming a supported material was used in Max/Maya](Engine/Content\FBX\Materials)), Specular maps
will be imported but not connected, other maps, like Ambient Occlusion map in the Diffuse slot of a maya material, will not even be imported; it is best to check your materials and connect any unconnected maps and check which
maps did not import. Simply double-click the new material and connect the available textures into their appropriate inputs.

By viewing the imported mesh in the Static Mesh Editor, you can cycle through the LODs using the

dropdown
at the far right side of the toolbar.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: