Up to date

This page is up to date for Godot 4.2. If you still find outdated information, please open an issue.

Node type customization using name suffixes

여러번 씬을 편집할 때, 내보낸 후 해야 하는 일반적인 작업이 있습니다:

  • 오브젝트에 콜리전 감지를 추가하기.

  • 오브젝트를 내비게이션 메시로 설정하기.

  • Deleting nodes that are not used in the game engine (like specific lights used for modeling).

To simplify this workflow, Godot offers several suffixes that can be added to the names of the objects in your 3D modeling software. When imported, Godot will detect suffixes in object names and will perform actions automatically.

경고

All the suffixes described below are case-sensitive.

노드 삭제 (-noimp)

-noimp 접미사를 갖고 있는 오브젝트가 어떤 타입이든지 가져올 때 제거될 것입니다. 가져온 씬에서 나타나지 않습니다.

This is equivalent to enabling Skip Import for a node in the Advanced Import Settings dialog.

콜리전 생성 (-col, -convcol, -colonly, -convcolonly)

-col 옵션은 메시 오브젝트에만 적용됩니다. 만약 접미사가 감지되면 동일한 도형을 메시로 사용해 자식 정적 콜리전 노드가 추가됩니다. 이 옵션에서는 느리지만 충돌 감지가 정확한 삼각형 메시 콜리전 모양이 생성됩니다. 레벨 지형을 만드는데 적합한 옵션입니다 (하지만 하단의 -colony 또한 확인해보십시오).

The option -convcol will create a ConvexPolygonShape3D instead of a ConcavePolygonShape3D. Unlike triangle meshes which can be concave, a convex shape can only accurately represent a shape that doesn't have any concave angles (a pyramid is convex, but a hollow box is concave). Due to this, convex collision shapes are generally not suited for level geometry. When representing simple enough meshes, convex collision shapes can result in better performance compared to a triangle collision shape. This option is ideal for simple or dynamic objects that require mostly-accurate collision detection.

However, in both cases, the visual geometry may be too complex or not smooth enough for collisions. This can create physics glitches and slow down the engine unnecessarily.

To solve this, the -colonly modifier exists. It will remove the mesh upon importing and will create a StaticBody3D collision instead. This helps the visual mesh and actual collision to be separated.

The option -convcolonly works in a similar way, but will create a ConvexPolygonShape3D instead using convex decomposition.

With Collada files, the option -colonly can also be used with Blender's empty objects. On import, it will create a StaticBody3D with a collision node as a child. The collision node will have one of a number of predefined shapes, depending on Blender's empty draw type:

Choosing a draw type for an Empty on creation in Blender

Choosing a draw type for an Empty on creation in Blender

가능하다면 삼각형이나 볼록 다면체 대신 primitive 충돌 감지 형상을 사용해보십시오. Primitive 형상이 많은 경우 성능 및 안전성 면에서 더 뛰어납니다.

참고

For better visibility on Blender's editor, you can set the "X-Ray" option on collision empties and set some distinct color for them by changing Edit > Preferences > Themes > 3D Viewport > Empty.

If using Blender 2.79 or older, follow these steps instead: User Preferences > Themes > 3D View > Empty.

더 보기

모든 콜리전 형상을 확인하고 싶다면 :ref:`doc_collision_shapes_3d`을 참고하십시오.

Create Occluder (-occ, -occonly)

If a mesh is imported with the -occ suffix an Occluder3D node will be created based on the geometry of the mesh, it does not replace the mesh. A mesh node with the -occonly suffix will be converted to an Occluder3D on import.

내비게이션 생성 (-navmesh)

-navmesh 접미사를 가진 메시 노드는 내비게이션 메시로 변환되고 기존 메시 오브젝트는 import-time 때 삭제될 것입니다.

VehicleBody 만들기 (-vehicle)

A mesh node with the -vehicle suffix will be imported as a child to a VehicleBody3D node.

VehicleWheel 만들기 (-wheel)

A mesh node with the -wheel suffix will be imported as a child to a VehicleWheel3D node.

리지드 바디 (-rigid)

A mesh node with the -rigid suffix will be imported as a RigidBody3D.

애니메이션 루프 (-loop, -cycle)

Animation clips in the source 3D file that start or end with the token loop or cycle will be imported as a Godot Animation with the loop flag set. Unlike the other suffixes described above, this does not require a hyphen.

In Blender, this requires using the NLA Editor and naming the Action with the loop or cycle prefix or suffix.