创建和导入资源
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 your 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. In this case, the dragged file(s) will be copied to the data project folder.
将文件从操作系统的标准文件浏览器拖到资源浏览器窗口中。To import composite assets (e.g. a material requiring a texture, or a node that requires several materials linked to plenty of textures) stored in Asset Packages (*.upackage), follow this guide.
-
In the Asset Browser, go to the folder where you want to import the file(s) to, right-click and select Import New Asset in the context menu.在Asset Browser中,转到要将文件导入到的文件夹,右键单击并在上下文菜单中选择 Import New Asset。
Choose a file (or several files) in the file browser window that appears. The selected files will be copied to the project folder.在出现的文件浏览器窗口中选择一个文件(或多个文件)。 选定的文件将被复制到项目文件夹中。
如果导入单个资源,将显示一个导入设置对话框窗口(某些资源类型可用)。否则,将使用默认设置导入所有资源,以后可以根据需要进行更改。 - 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 the last used import 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 the 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 the import settings click Reimport to reimport the asset with new settings or click Cancel to discard your changes.更改导入设置后,单击Reimport以使用新设置重新导入资源,或单击Cancel放弃更改。
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 option. To do so, right-click in the Asset Browser to open the context menu, select Create and the desired type of asset from the 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和所需的资源类型。将在项目的当前文件夹中创建一个新资源。如有必要,您可以将新资源移动到另一个位置。