This page has been translated automatically.
视频教程
界面
要领
高级
实用建议
专业(SIM)
UnigineEditor
界面概述
设置和首选项
项目开发
调整节点参数
Setting Up Materials
设置属性
照明
Sandworm
使用编辑器工具执行特定任务
如何擴展編輯器功能
嵌入式节点类型
Nodes
Objects
Effects
Decals
光源
Geodetics
World Nodes
Sound Objects
Pathfinding Objects
Players
编程
基本原理
搭建开发环境
使用范例
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Plugins
File Formats
Materials and Shaders
Rebuilding the Engine Tools
GUI
双精度坐标
应用程序接口
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
IG Plugin
CIGIConnector Plugin
Rendering-Related Classes
创建内容
内容优化
Materials
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Tutorials
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

创建和导入资产

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:除了一般建议之外,还有一些最常用的“数字内容创建”工具中的导出准则:

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 in the context menu.Asset Browser中,转到要将文件导入到的文件夹,右键单击并在上下文菜单中选择 Import

    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 文件夹中生成相应的运行时文件。您的项目。

注意
You can modify your assets at any time after importing, UnigineEditor will notice when you save new changes to the file and will re-import it as necessary.您可以在导入后随时修改资产,UnigineEditor会在您将新更改保存到文件时通知您,并将在必要时重新导入。

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.在这里,您还可以指定是“按原样”使用资产还是将为其生成运行时文件。此选项仅适用于某些类型的资产。

Clicking on an image asset in the Asset Browser shows the import settings in the Parameters window.在资源浏览器中单击图像资产会在Parameters窗口中显示导入设置。

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会在您将新更改保存到源文件时通知您,并将在必要时重新导入。

注意
The asset will be reimported automatically only when you modify its source file, stored inside the data folder of your project, either by direct editing or by replacing it with an updated version with the same name.仅当您修改资产的源文件(通过直接编辑或将其替换为具有相同名称的更新版本)存储在项目的data文件夹中时,该资产才会自动重新导入。

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和所需的资产类型。将在项目的当前文件夹中创建一个新资产。如有必要,您可以将新资产移动到另一个位置

警告
Creating user's folders with reserved names (e.g. core, scripts, editor2) in the root of the data/ or a mounted folder is forbidden. If such a folder is created via Explorer, it won't be displayed in the Asset Browser. Inside subfolders of the data folder, no name restrictions are applied and such folders will be displayed by the Asset Browser properly. 禁止在data/的根目录中创建具有保留名称(例如core, scripts, editor2)的用户文件夹或已安装的文件夹。如果通过资源管理器创建了这样的文件夹,则该文件夹不会显示在资源浏览器中。在数据文件夹的子文件夹内,没有名称限制,资产浏览器将正确显示这些文件夹。
最新更新: 2022-11-18
Build: ()