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 | ||
impunity [2021/03/16 12:52] – croft | impunity [2023/04/14 13:44] (current) – steph.jorgensen | ||
---|---|---|---|
Line 1: | Line 1: | ||
======Importing into Unity====== | ======Importing into Unity====== | ||
- | SpeedTrees are supported in the [[https:// | + | SpeedTrees are supported in the [[https:// |
- | SpeedTrees work in the standard rendering pipeline, and shaders can be switched to work in the High Definition Render Pipeline (HDRP) and Universal Render Pipeline (URP). | + | SpeedTrees work in the standard rendering pipeline, and shaders can be switched to work in the High Definition Render Pipeline (HDRP) and Universal Render Pipeline (URP). |
+ | ===== Version compatibility ===== | ||
+ | |||
+ | ^**SpeedTree Modeler version** ^ **Unity version** ^ **SpeedTree model file type** ^ | ||
+ | | 9.x | Unity 2018.3 and later (1) | .st | | ||
+ | | 8.x | Unity 2018.3 and later (1) | .st | | ||
+ | | 7.x | Unity 5.0 to Unity 2018.2.21 | .spm | | ||
+ | <WRAP indent> **Notes:** </ | ||
+ | - Shader functionality improves substantially in Unity 2021.2.0a17 and later. See [[impunity# | ||
=====Pipeline to Unity===== | =====Pipeline to Unity===== | ||
- | {{ :: | + | {{ :: |
Before exporting a tree for Unity, be sure that your tree is set up for real-time use by using [[kcgameslod|LOD]]. Also ensure that wind is correctly set for Unity by setting the fan to [[windlegacy|Legacy UE4/Unity mode]] and tuning the wind effects, if necessary. | Before exporting a tree for Unity, be sure that your tree is set up for real-time use by using [[kcgameslod|LOD]]. Also ensure that wind is correctly set for Unity by setting the fan to [[windlegacy|Legacy UE4/Unity mode]] and tuning the wind effects, if necessary. | ||
- | If this is the first time exporting to Unity, be sure to pick one of the Unity presets in the [[expgame|export mesh dialog]], to ensure all the export settings are correct for Unity. Export an .ST file directly into the Assets directory of your Unity project. Be sure to wait until the export process is complete before switching back to Unity for the import. You can also export it to another directory and copy it into your Unity assets, but be sure to copy the mesh and all of the textures at the same time before switching back into Unity. Otherwise, the importer will not be able to find the textures. You may be prompted to fix normal maps after import, so select “Fix now” and the import process will continue. | + | If this is the first time exporting to Unity, be sure to pick one of the Unity presets in the [[expgame|export mesh dialog]], to ensure all the export settings are correct for Unity. Export an .st file directly into the Assets directory of your Unity project. Be sure to wait until the export process is complete before switching back to Unity for the import. You can also export it to another directory and copy it into your Unity assets, but be sure to copy the mesh and all of the textures at the same time before switching back into Unity. Otherwise, the importer will not be able to find the textures. You may be prompted to fix normal maps after import, so select “Fix now” and the import process will continue. |
Unity will create a SpeedTree prefab you can use as a GameObject, on the terrain, or in other places inside Unity. | Unity will create a SpeedTree prefab you can use as a GameObject, on the terrain, or in other places inside Unity. | ||
- | > | + | > |
Line 28: | Line 36: | ||
- | =====Wind | + | =====Wind===== |
Wind behavior is tuned inside of the SpeedTree Modeler. To see the animation in Unity, you must add a [[https:// | Wind behavior is tuned inside of the SpeedTree Modeler. To see the animation in Unity, you must add a [[https:// | ||
Line 35: | Line 43: | ||
- | =====Changing the LOD===== | + | =====LOD===== |
- | + | ||
- | {{ :: | + | |
Your [[kcgameslod|LOD behavior]] is set in the SpeedTree Modeler, but you can adjust when the LOD changes occur inside of Unity. The SpeedTree prefab includes a [[https:// | Your [[kcgameslod|LOD behavior]] is set in the SpeedTree Modeler, but you can adjust when the LOD changes occur inside of Unity. The SpeedTree prefab includes a [[https:// | ||
Line 44: | Line 50: | ||
=====HDRP and URP===== | =====HDRP and URP===== | ||
- | After import, the SpeedTree meshes will have materials attached to them for the standard rendering pipeline. They will appear pink (ie shader error) | + | When using the Universal Render Pipeline (URP), there is a built-in shader for SpeedTrees that should work automatically as in the standard pipeline, though it is missing features like subsurface. With the High Definition Render Pipeline (HDRP), the SpeedTree meshes will have materials attached to them for the standard rendering pipeline. They will appear pink (ie shader error). You can switch to the standard Lit shader, |
- | Starting in Unity 2021, new shaders are available for SpeedTrees. Using the GUI on the SpeedTree prefab, extract the materials, and switch them to the new shaders: SpeedTree/ | + | Starting in Unity 2021.2.0a17, new shaders are available for SpeedTrees. Using the GUI on the SpeedTree prefab, extract the materials, and switch them to the new shaders: SpeedTree/ |
These new shaders are created in Unity' | These new shaders are created in Unity' | ||