创建和导入资产
Not all content for your UNIGINE project can be created within UnigineEditor. Most assets are created externally, using Digital Content Creation tools, such as 3ds Max, Maya, Photoshop, and others.不能在 UnigineEditor 中创建UNIGINE项目的所有内容。大多数资产是使用数字内容创建工具(例如3ds Max, Maya, Photoshop等)在外部创建的。
In the table below you can see a very general breakdown of the types of assets that can be created in UnigineEditor and those that are created using external Digital Content Creation (DCC) tools. 在下表中,您可以大致了解可在UnigineEditor中创建的资产类型以及使用外部数字内容创建(DCC)工具创建的资产类型。
在UnigineEditor中创建的资产 | 使用外部应用程序创建的资产 |
---|---|
|
To use assets created in a third-party Digital Content Creation tool in your UNIGINE project you should export them in a way that would not alter their dimensions, transforms, etc. when you import them to UNIGINE.
要在UNIGINE项目中使用在第三方“数字内容创建”工具中创建的资产,应在导入到UNIGINE时以不会改变其尺寸,变换等的方式导出它们。
Exporting Assets from Content Creation Tools从内容创建工具导出资产#
Before exporting assets from Digital Content Creation tools, check the following general recommendations:从“数字内容创建”工具导出资产之前,请检查以下一般建议:
- Check the working units used in you tool because scales in your tool and in UNIGINE may differ, and adjust, if needed. In UNIGINE 1 unit = 1 meter.检查工具中使用的工作单位,因为工具和UNIGINE中的比例可能会有所不同,并根据需要进行调整。在UNIGINE 1 unit = 1 meter中。
- Align your model along to the front axis and check that Y+ points forward at the export.将模型与前轴对齐,并检查Y+指向出口的前方。
- Reset all transformations to avoid any misplacement issues after the model import.重置所有转换,以避免模型导入后出现任何放错位置的问题。
- Prepare materials. Keep in mind that surfaces and meshes of the imported model are named after the materials.准备材料。请记住,导入模型的曲面和网格是根据材质命名的。
In addition to the general recommendations, there are guidelines for export from the most commonly used Digital Content Creation tools:除了一般建议之外,还有一些最常用的“数字内容创建”工具中的导出准则:
- Exporting 3D Models From Blender从Blender导出3D模型
- Exporting 3D Models From Autodesk Maya从Autodesk Maya导出3D模型
- Exporting 3D Models From Autodesk 3ds Max从Autodesk 3ds Max导出3D模型
- Exporting 3D Models From Maxon Cinema 4D从Maxon Cinema 4D导出3D模型
If you export your model from any other tool, check the guidelines and try to follow the general recommendations.如果从任何其他工具导出模型,请查看准则并尝试遵循一般建议。
Importing Assets导入资产#
You can import the content for your project in several ways:您可以通过多种方式导入项目的内容:
- Drag the file(s) from the standard file browser of your operating system into the Asset Browser window.将文件从操作系统的标准文件浏览器拖到资产浏览器窗口中。
-
Click the Import button in the Asset Browser and choose a file (or several files) in the file browser window that appears.单击资源浏览器中的Import按钮,然后在出现的文件浏览器窗口中选择一个文件(或多个文件)。
In case if a single asset is imported, an import settings dialog window will be displayed (available for certain asset types). Otherwise, all assets will be imported with default settings, that can be changed later if necessary.如果导入单个资产,将显示一个导入设置对话框窗口(某些资产类型可用)。否则,将使用默认设置导入所有资产,以后可以根据需要进行更改。 - You can also put your resources to the data folder of your project directly using the functions of your operating system. Then, as you open UnigineEditor, it will try to create all possible asset types with default settings. You can change these settings later if necessary.您还可以直接使用操作系统的功能将资源放置到项目的data文件夹中。然后,当您打开UnigineEditor时,它将尝试使用默认设置创建所有可能的资产类型。如有必要,您可以稍后更改这些设置。
If your asset was imported successfully, a *.meta metafile will be created for it in the same folder and, if it is not a native asset, corresponding runtime file(s) will be generated in the data/.runtimes folder of your project.如果成功导入了资产,则将在同一文件夹中为其创建一个*.meta图元文件;如果它不是本机资产,则将在以下目录的 data/.runtimes 文件夹中生成相应的运行时文件。您的项目。
Import Settings导入设置#
Some types of assets supported by UNIGINE have a set of adjustable import settings, which determine asset's appearance and behavior. These settings are displayed in a window that appears when you import a single asset.UNIGINE支持的某些类型的资产具有一组可调整的导入设置,这些设置可确定资产的外观和行为。这些设置显示在导入单个资产时出现的窗口中。
For example, the import settings for an image will allow you to choose the type of texture, image format, size, etc. The import settings for an FBX file allow you to adjust the scale, decide whether you want to import materials and lights or use animation defined in the file.例如,图像的导入设置将允许您选择纹理的类型,图像格式,大小等。 FBX文件的导入设置使您可以调整比例,决定是否选择图像。想要导入材料和灯光或使用文件中定义的动画。
You can change import settings for a particular asset when necessary. To do so, select it in the Asset Browser, the available settings will appear in the Parameters window. The options that are displayed will vary depending on the type of the selected asset.您可以在必要时更改特定资产的导入设置。为此,请在Asset Browser中选择它,可用的设置将出现在 Parameters 窗口中。显示的选项将根据所选资产的类型而有所不同。
Here you can also specify whether an asset will be used "as is" or a runtime file will be generated for it. This option is available only for some types of assets.在这里,您还可以指定是“按原样”使用资产还是将为其生成运行时文件。此选项仅适用于某些类型的资产。
After changing import settings click Apply to reimport the asset with new settings or click Revert to discard your changes.更改导入设置后,单击Apply以使用新设置重新导入资产,或单击Revert放弃更改。
Real-Time Tracking of Changes实时跟踪变化#
You can modify your assets at any time after importing, UnigineEditor will notice when you save new changes to the source file and will re-import it as necessary.您可以在导入后随时修改资产,UnigineEditor会在您将新更改保存到源文件时通知您,并将在必要时重新导入。
Creating Assets in UnigineEditor在UnigineEditor中创建资产#
Any time you create a new world, save presets, inherit a new material or a property, create a node reference or export a node to an FBX file in UnigineEditor an asset of the corresponding type is created.每当您创建新的世界,保存预设,继承新的 material 或属性,创建节点引用或将节点导出到UnigineEditor中的FBX文件会创建相应类型的资产。
You can also create assets of certain types (e.g., a material or a property) in the Asset Browser using the Create button. To do so, click Create and select the desired type of asset from the dropdown list. A new asset will be created at the current folder of you project. You can move the new asset to another location if necessary.您还可以使用Create按钮在资产浏览器中创建某些类型的资产(例如,材料或属性)。为此,请单击Create,然后从下拉列表中选择所需的资产类型。将在项目的当前文件夹中创建一个新资产。如有必要,您可以将新资产移动到另一个位置。