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 | ||
impue4st9 [2021/04/27 15:53] – croft | impue4st9 [2023/04/14 13:46] (current) – steph.jorgensen | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Importing into UnrealEngine4 | + | ====== Importing into Unreal Engine |
- | SpeedTrees are supported in the [[https:// | + | SpeedTrees are supported in the [[https:// |
- | =====Differences from ST===== | + | ===== Version compatibility |
- | =====Pipeline | + | ^ **SpeedTree Modeler version** ^ **Unreal Engine version** ^ **SpeedTree model file type** ^ |
+ | | 9.x | Unreal Engine 4.27 and later (1)(2) | .st9 | | ||
+ | |:::| Unreal Engine 4.19.2 and later | .st | | ||
+ | | 8.x | Unreal Engine 4.19.2 and later | .st | | ||
+ | | 7.x | Unreal Engine 4.3 to 4.19.1 | .srt | | ||
+ | <WRAP indent> **Notes:** </ | ||
+ | - As of Unreal Engine 5.1, SpeedTree .st9 files work with [[https:// | ||
+ | - In Unreal Engine 5.0, SpeedTree models work with [[https:// | ||
- | 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 [[windgames|Games mode]] | + | =====Differences between |
- | If this is the first time exporting to UE4, be sure to pick one of the UE4 presets | + | The importer for the .st9 format |
- | {{ :: | + | [[#wind|Wind]] is also now done in the material editor and is fully computed on the GPU, rather than relying on CPU-side components as in previous versions. This makes it easy to tune wind parameters inside UE, optimize rendering, and even change wind effect nodes all from inside UE. Wind for .st9 files also has fewer instructions than .st wind and does not require multiple draw calls for wind effects |
- | On import in UE4, you will be presented with a few options, such as whether to include the [[collision_object|collision objects]] you have placed | + | |
- | It is recommended that you allow the importer | + | However, there may be times when you would still want to use the [[impue4|legacy |
- | > | + | |
+ | =====Pipeline to UE===== | ||
+ | |||
+ | Before exporting a tree for UE, be sure that your tree is set up for real-time use by using [[kcgameslod|LOD]]. Also ensure that wind is correctly set for UE by setting the fan to [[windgames|Games mode]] and tuning the wind effects, if necessary. For the .st9 format, be sure to set the wind strength to approximately what you want within UE, as that will be used as the basis for the wind parameters set on the [[# | ||
+ | |||
+ | If this is the first time exporting to UE, be sure to pick one of the Unreal Engine presets in the [[expgame|export mesh dialog]], to ensure all the export settings are correct for UE. Export an .st9 file to disk, then switch to UnrealEd and import the .st9 file there. The mesh and all textures should be found and imported into your UE project assets. | ||
+ | |||
+ | On import, material instances will be created for all of the [[# | ||
Line 26: | Line 39: | ||
{{: | {{: | ||
- | 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></ | <WRAP clear></ | ||
=====Wind===== | =====Wind===== | ||
- | Wind behavior is tuned inside of the SpeedTree | + | With .st9, you can wholly tune the wind effects |
- | > | + | > **Note:** If editing in UE, be sure to change all of the material instances of a tree to the same values or you may have separation. |
+ | |||
+ | However, editing in the Modeler does offer some benefits. The values are scaled into meaningful ranges so you can more easily copy values from tree to tree (rather than work in real-world units in UE). Also, the Modeler has wind curves that are used in conjunction with wind strength so you can dial up and down the wind effects easily, while in UE you are tuning the singular wind effect used on the tree. The wind strength at export time is "baked in" to the wind curves to find the wind parameter values set on the material instances. | ||
=====LOD===== | =====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. | + | Your [[kcgameslod|LOD behavior]] is set in the SpeedTree Modeler, but you can adjust when the LOD changes occur inside of UE. 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. |
+ | |||
+ | All smooth LOD transitions are done using UE's crossfaded LOD. | ||
=====Materials===== | =====Materials===== | ||
- | {{ :: | + | The materials created by the .st9 importer |
- | + | ||
- | The SpeedTree | + | |
- | + | ||
- | 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 | + | |
- | | 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 | + | |
- | Billboard | + | If you wish to edit SpeedTree |