meta data for this page
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
impue4 [2021/03/16 13:49] – croft | impue4 [2022/03/09 17:17] (current) – croft | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Importing into UnrealEngine4 | + | ====== Importing into Unreal Engine (Legacy) |
- | SpeedTrees are supported in the [[https:// | + | SpeedTrees are supported in the [[https:// |
- | =====Pipeline to UE4===== | + | =====Pipeline to UE4/UE5===== |
- | Before exporting a tree for UE4, be sure that your tree is set up for real-time use by using [[kcgameslod|LOD]]. Also ensure that wind is correctly set for UE4 by setting the fan to [[windlegacy|Legacy UE4/Unity mode]] and tuning the wind effects, if necessary. | + | Before exporting a tree for UnrealEngine, be sure that your tree is set up for real-time use by using [[kcgameslod|LOD]]. Also ensure that wind is correctly set for UnrealEngine |
- | If this is the first time exporting to UE4, be sure to pick one of the UE4 presets in the [[expgame|export mesh dialog]], to ensure all the export settings are correct for UE4. Export an .ST file to disk, then switch to UnrealEd and import the ST file there. The mesh and all textures should be found and imported into your UE4 project assets. | + | If this is the first time exporting to UE, be sure to pick one of the UE4 presets in the [[expgame|export mesh dialog]], to ensure all the export settings are correct for UE. Export an .ST file to disk, then switch to UnrealEd and import the ST file there. The mesh and all textures should be found and imported into your UE4 project assets. |
- | [import | + | {{ :: |
+ | On import | ||
+ | |||
+ | It is recommended that you allow the importer to create materials for you, and tick the " | ||
+ | |||
+ | > | ||
=====Placement===== | =====Placement===== | ||
- | <WRAP group> | + | {{: |
- | + | ||
- | <WRAP twothirds column> | + | |
Once you've imported the model as an asset you can place it in your scenes like you would any other static mesh. Simply drag the asset and drop it in the scene to place a model. Mark them as “static” to use them with Lightmass (you' | Once you've imported the model as an asset you can place it in your scenes like you would any other static mesh. Simply drag the asset and drop it in the scene to place a model. Mark them as “static” to use them with Lightmass (you' | ||
- | </WRAP> | + | < |
- | <WRAP third column> | + | |
- | {{: | + | |
- | </ | + | |
- | </ | + | |
- | {{ : | + | {{: |
You can also paint the tree with a foliage layer. Drag the asset into foliage painting area and paint the SpeedTrees like any other static mesh. See [[https:// | You can also paint the tree with a foliage layer. Drag the asset into foliage painting area and paint the SpeedTrees like any other static mesh. See [[https:// | ||
+ | <WRAP clear></ | ||
=====Wind===== | =====Wind===== | ||
- | =====LOD===== | + | Wind behavior is tuned inside of the SpeedTree Modeler. To see the animation in UE4, you must add a WindDirectionalSource object. The “Speed” property controls the wind speed while the " |
- | =====Materials===== | + | > |
+ | =====LOD===== | ||
+ | Your [[kcgameslod|LOD behavior]] is set in the SpeedTree Modeler, but you can adjust when the LOD changes occur inside of UE4. LOD transitions are based on screen space area, and these values can be edited in the static mesh editor associated with the SpeedTree model. Default values are chosen upon import that work for typical situations. | ||
+ | =====Materials===== | ||
+ | {{ :: | ||
+ | The SpeedTree materials created by the importer get the basics in place but can be edited to improve and tailor them to suit your scenes. | ||
+ | The SpeedTree node connected to WorldPositionOffest is the only SpeedTree-specific component in the material. If you disconnect it, everything rendered with that material will be identical to a static mesh. With it connected you will get SpeedTree wind, camera-facing geometry, and smooth LOD transitions. | ||
+ | There are several options available on the SpeedTree node. | ||
+ | <WRAP clear></ | ||
+ | | Geometry Type|This setting controls what type of geometry is rendered and is set automatically by the importer. This value rarely needs to be edited.| | ||
+ | | Wind Type|This property controls the complexity/ | ||
+ | | LOD Type|Use this to control whether SpeedTree models smoothly transition between LOD states or pop between them like standard static meshes.| | ||
+ | | Billboard Threshold|This option is unused with ST files| | ||
+ | | ExtraBendWS|To achieve additional bending effects on a tree, such as from explosions or player interactions, | ||
+ | Billboard materials contain a few extra material functions that remove non-camera-facing polygons from the billboard mesh and adjust the normals to avoid seams in the billboard mesh. These can be opened up for editing, as well. | ||
- | |||
- | **NOTICE: These instructions are applicable for Unreal Engine 4.19.2. SpeedTree will not work with earlier versions of UE4.** | ||
- | |||
- | When you save a model in the UE4 version of the Modeler (or use the compiler for custom licensees) you should have an " | ||
- | |||
- | Import the .st file as you would any other asset. | ||
- | |||
- | {{ : | ||
- | |||
- | Several options are presented during the import process. First is the choice between 3D geometry, billboards, or both. If a tree will only be used close-up, it is a “hero” tree, or you otherwise have trouble with the billboard as the lowest LOD (as is sometimes the case with dynamic shadows falling on the flat billboard geometry), you can choose to ignore the billboard mesh. Or, if a tree will only be used far away and you want to save loading the 3D geometry, you can only import the billboard. Just importing the billboard mesh also creates a static mesh that can be used with UE4's foliage layers. | ||
- | |||
- | In the import dialog, you can also choose to include detail, specular, and branch seam blending in the materials used on the 3D tree. You can also add vertex processing to the materials, which puts a special SpeedTree node into the material that can handle wind, billboarding, | ||
- | |||
- | Finally, you can import any collision primitives that were set up in the SpeedTree Modeler into collision information on the new SpeedTree mesh. | ||
- | |||
- | {{ : | ||
- | |||
- | |||
- | Once the import process is complete you should have the following new assets (pictured below): | ||
- | |||
- | * A static mesh that represents your model. | ||
- | |||
- | * Texture assets for each atlas, billboard atlas, and tiling texture map on your model. | ||
- | |||
- | * Material assets for each component (draw call) of the model. | ||
- | |||
- | {{ :: | ||
- | |||
- | The materials are of particular importance. | ||
- | |||
- | The SpeedTree node connected to "World Position Offest" | ||
- | |||
- | * **Geometry Type**. | ||
- | |||
- | * **Wind Type**. | ||
- | |||
- | * **LOD Type**. | ||
- | |||
- | * **Billboard Threshold**. | ||
- | |||
- | |||
- | The " | ||
- | |||
- | {{ :: | ||