DEKI/ENGINE 문서
deki-3d 0.19.0
Deki 패키지 레퍼런스
deki-3d

렌더 패스로 동작하는 소프트웨어 래스터화 3D: 메시, 원근 카메라, .obj 임포트를 제공하며 2D와 하나의 프레임 버퍼를 공유합니다.

저장소: github.com/dekiengine/deki-3d · 최신 릴리스: 0.19.0 · 엔진 0.19.0 이상 필요 · 의존: deki-rendering

DekiEditor --packages-add deki-3d <project> 또는 패키지 관리자로 설치합니다. 엔진 자체의 컴포넌트와 C++ API는 Deki 문서에 있습니다.

에디터에는 3D(으)로 표시됩니다.

컴포넌트

컴포넌트 카테고리 설명
Mesh3DSettings 3D 3D 패스의 그리기 방식입니다. 타일, 텍스처와 버텍스 옵션, 라이트, 스레드를 설정합니다.
MeshComponent 3D 3D 메시를 그립니다. 오브젝트의 트랜스폼이 위치를 정하며, 메시를 보려면 씬 카메라가 원근이어야 합니다.

기능 플래그

빌드에서 뺄 수 있는 부분입니다. define이 있는 기능은 그 define으로 켜고 끄며, 나머지는 컴포넌트와 함께 제거됩니다.

기능 define 기본값
Software rasteriser DEKI_FEATURE_3D_SOFTWARE 켜짐

컴포넌트 레퍼런스

Mesh3DSettings

3D 패스의 그리기 방식입니다. 타일, 텍스처와 버텍스 옵션, 라이트, 스레드를 설정합니다.

인스펙터 이름: Mesh3D 설정 · 카테고리: 3D · 유형: Deki3D::Mesh3DSettings

속성 유형 기본값 제약 설명
tileSize int32 32 8~512 타일 한 변의 길이(픽셀)입니다. 깊이 버퍼는 타일 하나 크기이므로 32는 2 KB로 마이크로컨트롤러에 적합하며, 데스크톱은 128 이상도 쓸 수 있습니다.
perspectiveCorrect bool true 텍스처 원근을 보정합니다. 끄면 PlayStation 시대 하드웨어처럼 텍스처가 일그러지고, 채우기 비용이 약 10분의 1 줄어듭니다.
vertexSnap bool false 투영된 버텍스를 정수 픽셀로 반올림하여, 고정 소수점 시대 하드웨어의 떨림을 냅니다.
lightYaw float -25 -180~180 씬 라이트가 들어오는 방향을 수직축을 중심으로 한 각도로 지정합니다. 0이면 카메라 뒤, 90이면 오른쪽입니다.
lightPitch float 55 -90~90 씬 라이트의 높이입니다. 90은 바로 위, 0은 지평선과 같은 높이입니다.
ambient float 0.25 0~1 라이트 반대쪽을 향한 면이 얼마나 밝게 남는지 지정합니다. 0이면 완전히 검게 되어 극적인 느낌이 나고, 높일수록 음영이 평평해집니다.
fillThreads int32 1 1~16 장치나 시뮬레이터 빌드에서 화면을 채우는 스레드 수입니다. 타일은 서로 독립적이므로 코어 수에 따라 빨라지는 유일한 부분입니다. 1이면 스레드를 전혀 시작하지 않고, 2는 듀얼 코어 보드에 적합하며, 코어 수를 넘기면 더 이상 도움이 되지 않습니다. 에디터는 패키지를 언로드 가능한 DLL로 로드하므로 항상 스레드 하나로 미리 보기합니다. 어느 쪽이든 그림은 같습니다.

MeshComponent

3D 메시를 그립니다. 오브젝트의 트랜스폼이 위치를 정하며, 메시를 보려면 씬 카메라가 원근이어야 합니다.

인스펙터 이름: 메시 컴포넌트 · 카테고리: 3D · 유형: Deki3D::MeshComponent

속성 유형 기본값 제약 설명
mesh AssetRef (MeshAsset) "" 컴파일된 메시 에셋입니다. 임포트한 모델을 여기에 할당합니다. 비워 두면 대신 아래의 프리미티브를 그립니다.
primitive enum "Cube" Cube, Quad, Pyramid 메시 에셋이 할당되지 않았을 때 그릴 내장 도형입니다.
tintColor Color "#000000FF" 메시 자체의 색상에 곱해집니다. 흰색이면 그대로 표시됩니다.
shading enum "VertexLit" Unlit, VertexLit, Flat 언릿은 단색입니다. 버텍스 릿은 씬 라이트를 기준으로 버텍스마다 음영을 줍니다. 플랫은 삼각형 전체에 음영을 주어 각진 면이 드러나는 모습이 됩니다.
doubleSided bool false 메시의 바깥쪽뿐 아니라 안쪽도 그립니다. 채우기 비용이 약 두 배가 됩니다.

RendererComponent에서 sortingOrder, ignoreClip, pixelSnap, alphaMode을(를) 상속합니다.

변경 내역

변경 내역은 영어로 되어 있습니다.

0.19.0

Changed

  • minEngine 0.19.0: built against engine 0.19.0, whose component metadata records the package each class is in. A build of this package from before does not load and is rebuilt.

Added

  • Japanese, Simplified Chinese and Korean: editor/lang/ja.json, zh.json and ko.json translate the names, tooltips and enum values this package's components show in the Inspector.
  • The package's editor text goes through the editor's translation (Tr), so it shows in the editor's language. Needs the editor release that adds Localization.h; raise minEngine to it when releasing.

0.18.0

Changed

  • minEngine 0.18.0. Reflection ABI 21: the package must be rebuilt.
  • Names follow the code style (deki-engine/docs/codestyle): types, functions and enum values are PascalCase, constants kPascalCase, members m_PascalCase, locals and parameters camelCase. The code is formatted with clang-format 22.
  • The functions the editor finds by name are PascalCase: Deki3DRegisterComponents, Deki3DGetAutoComponentCount, Deki3DEnsureRegistered and the rest. Built against engine ABI 21; a build of this package from before does not load and is rebuilt.
  • Renamed: MeshAttribute_Position and the other mesh flags are MeshAttributePosition, ...; MeshMaterial_AlphaTest is MeshMaterialAlphaTest; AssetTypeName is kAssetTypeName.

Removed

  • Reading version 3 mesh files (before 0.17.0). The editor builds them again.
  • The loader for Camera3DComponent, the 3D camera of scenes saved before 0.17.0. Open and save such a scene with 0.17 first.
  • The former names from before 0.16.0 (bare class names, and deki-gpio's DekiEsp32::ESP32PinSetup). A scene that old is upgraded with 0.17 first.

이전 릴리스: CHANGELOG.md


패키지의 리플렉션 데이터에서 생성했습니다(엔진 0.19.0). 속성 이름은 씬 파일에서 쓰는 키입니다. 이름을 바꿔도 별칭이 유지됩니다(호환성).