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 | ||
expgame [2023/04/03 18:37] – steph.jorgensen | expgame [2023/11/07 09:31] (current) – steph.jorgensen | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ======Exporting to game formats====== | + | ======Games export options====== |
- | In game versions of the SpeedTree Modeler, you can export to a selection of game editor formats. | + | You can export to a selection of game editor formats. |
- | {{exportgamedialog.png? | + | To export a model for games, select **File** > **Export to mesh** then choose the Games export type. |
- | =====Formats===== | + | For command line export options, refer to [[export_from_the_command_line|Export from the command line]]. |
- | Currently, the exporters for [[impue4|Unreal Engine 4]], [[impunity|Unity]], | + | =====Export type===== |
- | =====Game presets===== | + | ^**Type**^**Description**^ |
- | You can choose a game preset to simplify the export process and make sure the export settings are correct for the format. You can also make your own presets by saving the dialog settings into the < | + | |**Games**|Export a model with options optimized for games.| |
+ | |**VFX**|Export a model with options optimized for VFX. Refer to [[expstaticmesh|VFX export options]].| | ||
+ | |||
+ | =====Preset===== | ||
+ | You can choose a game preset to simplify the export process and make sure the export settings are correct for the format. | ||
^**Preset**^**Description** ^ | ^**Preset**^**Description** ^ | ||
- | | **Standard** | Optimizes the export for the SpeedTree SDK or static mesh formats. | | ||
- | | **UE4** | Optimizes the export for Unreal Engine 4. | | ||
- | | **UE4 (one draw call)** | Optimizes the export for Unreal Engine 4 and limits it to one draw call. | | ||
| **Unity** | Optimizes the export for Unity. | | | **Unity** | Optimizes the export for Unity. | | ||
| **Unity (one draw call)** | Optimizes the export for Unity and limits it to one draw call. | | | **Unity (one draw call)** | Optimizes the export for Unity and limits it to one draw call. | | ||
+ | | **UnrealEngine (ST)** | Optimizes the export for Unreal Engine and exports the .st file type. | | ||
+ | | **UnrealEngine (ST9)** | Optimizes the export for Unreal Engine and limits it to one draw call. Exports the .st9 file type. | | ||
+ | | **SpeedTree SDK** | Optimizes the export for the SpeedTree SDK or static mesh formats. | | ||
+ | |**Generic FBX**| Export a generic FBX for use in any game engine or DCC application.| | ||
+ | |||
+ | ====Preset options==== | ||
+ | |||
+ | ^**Control**^**Description**^ | ||
+ | |**Save new preset**|Save the current export settings as a new preset.| | ||
+ | |**Edit preset name**|Edit the name of the current preset.| | ||
+ | |**Delete preset**|Delete the current preset.| | ||
+ | |**Load options**|Load previously saved export options from an .ini file.| | ||
+ | |**Save options**|Save the current export options to an .ini file.| | ||
+ | |||
+ | =====Show atlas===== | ||
+ | |||
+ | At export time, if you are not happy with the automatically-generated atlas layout, you can edit it by clicking the button in the top right of the export dialog. If multiple atlases are being exported, you can choose which one is being displayed. | ||
+ | |||
+ | {{edit_atlas.png? | ||
+ | |||
+ | The tools for editing are translate, rotate, scale uniformly, and scale non-uniformly. Once a tool is selected, simply click on a texture in the atlas and drag the mouse to perform the action. | ||
+ | |||
+ | > | ||
+ | |||
+ | =====Options===== | ||
+ | |||
+ | ====File type==== | ||
+ | |||
+ | You can choose a file type compatible with [[impue4|Unreal Engine 4]], [[impunity|Unity]], | ||
+ | |||
+ | > | ||
=====Combine===== | =====Combine===== | ||
Line 24: | Line 56: | ||
^**Property**^**Description**^^ | ^**Property**^**Description**^^ | ||
- | |**Combine all open models into the same atlas**|Export all open files in the Modeler and combine them into the same atlas. || | + | |**Combine all open trees**|Export all open files in the Modeler and combine them into the same atlas. || |
|**Atlas name**|Assign a root name to the exported atlases.|| | |**Atlas name**|Assign a root name to the exported atlases.|| | ||
|**Tree filenames**|Set a naming convention for the exported model files.|| | |**Tree filenames**|Set a naming convention for the exported model files.|| | ||
Line 30: | Line 62: | ||
| ::: |**Tree name**| All model files have the same name as their original .spm file. | | | ::: |**Tree name**| All model files have the same name as their original .spm file. | | ||
- | =====LOD===== | + | =====Grouping===== |
These options set which type of geometry from the tree to include: the fully 3d geometry LODs, the billboard LOD, or all of it. | These options set which type of geometry from the tree to include: the fully 3d geometry LODs, the billboard LOD, or all of it. | ||
Line 39: | Line 71: | ||
{{billboard_maps.png? | {{billboard_maps.png? | ||
- | |||
=====Include===== | =====Include===== | ||
- | This section of the dialog features options for extra things that may be included during export. | + | This section of the dialog features options for extra things that may be included during export. These options vary by the chosen file type. |
- | ==Variations== | + | ====Lightmap UVs==== |
- | [[toolmaterialsassetsbar|Variations]] may be set up in the material. This option enables the processing of variations on export. Instead of requiring the final game engine to have shader code that does the variation, the exporter will simply make new materials and textures with the variation information baked in. | + | |
- | > | + | Compute and include unique UVs for lightmapping. |
+ | |||
+ | Available for all options but OBJ. | ||
- | ==Vertex blends== | + | ====Vertex blends==== |
Vertex blending is used on small pieces of geometry that need to blend, such as the intersection of a branch to its parent or stitches to a parent mesh. This is done using vertex alphas to fade it out. If the engine does not support per-vertex alphas, or if z-buffer problems are causing the seam blends to flicker, then you may disable this. Even without per-vertex alphas (and thus a hard line where the material changes), the blend pieces usually add to the realism of the tree by hiding the actual branch intersection. | Vertex blending is used on small pieces of geometry that need to blend, such as the intersection of a branch to its parent or stitches to a parent mesh. This is done using vertex alphas to fade it out. If the engine does not support per-vertex alphas, or if z-buffer problems are causing the seam blends to flicker, then you may disable this. Even without per-vertex alphas (and thus a hard line where the material changes), the blend pieces usually add to the realism of the tree by hiding the actual branch intersection. | ||
+ | Available for all options but OBJ. | ||
- | ==Leaf references== | + | ====Vertex color==== |
- | Leaf References are null objects in the correct position and orientation for each leaf. These can be used to populate the leaves with higher quality meshes at runtime, or perhaps for use with mesh instancing. | + | |
- | ==Bones/ | + | Override the model’s vertex colors, including the alpha (transparency) value. |
- | Some formats, such as FBX, allow you to include bone weighting for further deformation. | + | |
+ | Available for all options but OBJ. | ||
- | =====Atlas===== | + | ====Bones/ |
+ | Some formats, such as FBX, allow you to include bone weighting for further deformation. | ||
- | Atlassing is the most important aspect of preparing a tree for real-time rendering. Putting multiple materials into the atlas allows the geometry that uses them to be merged, resulting in fewer draw calls. With aggressive merging, you can make an entire tree that renders in one draw call. | + | Available |
- | |None|This option does not make an atlas. Each material will export its textures separately| | + | =====Transform===== |
- | |Non-Wrapping|This option looks at the geometry using each material. If the UVs on the geometry fit within 0-1, then its material will be put into the atlas. Geometry that uses wrapping UVs or otherwise has UVs outside of 0-1, such as branches, will be exported as separate textures| | + | |
- | |Everything|This option puts every material in the entire tree into the atlas. Any geometry that has UVs outside 0-1 will be unwrapped before going into the atlas. Without being cognizant of this, you could end up with a suboptimal atlas layout. Enabling V-wrapping (see below) helps branches to not take up so much of the atlas when their UVs are outside 0-1.| | + | |
- | + | ||
- | ==Allow separate atlases== | + | |
- | If you have set materials | + | These options modify the output size and geometry of your model. You can keep the current scene unit, convert |
- | ==Allow V wrapping== | + | =====Textures===== |
- | When geometry has UVs outside 0-1, they need to be unwrapped in order to be placed in the atlas. If they aren' | + | These options deal with the creation |
- | This is where the V-Wrapping option can help. When enabled, anything that wraps in the V direction will get placed in the atlas such that its top and bottom edge touch the top and bottom of the atlas. Thus, V-wrapping UVs will work just fine and you keep much more of the texture resolution. You still need to be cognizant of U-wrapping, but since branches wrap a lot in V and not so much in U, this is a great feature when putting branches into an atlas. | + | ====Packing==== |
- | See the picture below for an example | + | Game exporting uses the concept |
- | {{tree_atlas.png? | + | ====Format==== |
- | ==Separate materials== | + | This option sets the format of the exported textures. For some game engines, this format defaults to the commonly-used format (usually PNG or TGA). |
- | When placing materials into an atlas, these materials get merged together. While they use the same textures, sometimes you may want to split the materials based on a number of factors. For example, a common situation is that leaves need to be two-sided but branches should cull backfaces. Enabling " | + | ====Size==== |
- | ==Ignore smooth LOD== | + | With the size options, you can set the size of the atlas, the size of the billboard atlas, and the max size of any other texture written. |
- | When exporting to formats that split the geometry | + | ====Include variations==== |
+ | [[toolmaterialsassetsbar|Variations]] may be set up in the material. This option enables the processing of variations on export. Instead | ||
+ | > | ||
- | =====Geometry===== | + | =====Atlas===== |
- | These options modify | + | Atlassing is the most important aspect of preparing a tree for real-time rendering. Putting multiple materials into the atlas allows the geometry that uses them to be merged, resulting in fewer draw calls. With aggressive merging, you can make an entire tree that renders in one draw call. |
- | For all file types except OBJ, there is an option | + | ^**Control**^**Description**^ |
+ | |**None**|This option does not make an atlas. Each material will export its textures separately| | ||
+ | |**Non-Wrapping**|This | ||
+ | |**Everything**|This option puts every material in the entire | ||
+ | |||
+ | ====Allow separate atlases==== | ||
- | {{packcolor.png? | + | If you have set materials to go into different atlases on the [[toolmaterialsassetsbar|material asset bar]], this option can let you enable or disable that functionality. |
- | In formats that support it, such as STSDK, this is also where you would supply the [[vertexpacker|vertex packer]] used on tree and billboard geometry. | + | ====Allow V wrapping==== |
- | =====Textures===== | + | When geometry has UVs outside 0-1, they need to be unwrapped in order to be placed in the atlas. If they aren' |
- | These options deal with the creation | + | This is where the V-Wrapping option can help. When enabled, anything that wraps in the V direction will get placed in the atlas such that its top and bottom edge touch the top and bottom |
+ | See the picture below for an example of a one-draw-call tree where everything has been placed into the atlas, utilizing V-Wrapping so as not to lose texture resolution on the branches. | ||
- | ==Format== | + | {{tree_atlas.png? |
- | This option sets the format of the exported textures. For some game engine, this format is locked to the commonly-used format (usually PNG or TGA). | + | ====Separate materials==== |
- | ==Size== | + | When placing materials into an atlas, these materials get merged together. While they use the same textures, sometimes |
- | + | ||
- | With the size options, you can set the size of the atlas, the size of the billboard atlas, and the max size of any other texture written. | + | |
- | ==Packing== | + | ====Ignore smooth LOD==== |
- | Game exporting | + | When exporting |
- | + | ||
- | + | ||
- | =====Atlas editing===== | + | |
- | + | ||
- | At export time, if you are not happy with the automatically-generated atlas layout, you can edit it by clicking the button in the top right of the export dialog. If multiple atlases are being exported, you can choose | + | |
- | + | ||
- | {{edit_atlas.png? | + | |
- | + | ||
- | The tools for editing are translate, rotate, scale uniformly, | + | |
- | + | ||
- | > | + | |
+ | =====Billboard===== | ||
- | =====Exporting from the command line===== | + | Determine how to treat billboards in the exported file. |
- | Full SpeedTree Games also has the option | + | ^**Control**^**Description**^^ |
+ | |**Faces**|Set how many faces to render on a billboard.|| | ||
+ | |**Top down**|Include top-down faces in the billboard.|| | ||
+ | |:::|**Top down height %**|Set where to put the top-down geometry in the billboard mesh (from bottom to top).| | ||
- | | | + | =====Format-specific===== |
- | | -export_game < | + | |
- | | -export_options < | + | |
- | | <any other file> | + | |
- | The export | + | When exporting an animation, different cache formats have options |
- | > | + | These options are available for USD and SpeedTree SDK exports. |
- | | cmd|start /WAIT <exe> < | + | =====Extra===== |
- | | PowerShell|Start-Process -Wait -FilePath <exe> -ArgumentList '< | + | |
+ | ^**Control**^**Description**^ | ||
+ | |**Show summary**|Shows a summary of the export settings when the export completes.| | ||
+ | |**Skip texture save**|Doesn' |