载入中...
搜索中...
未找到
TerrainImporter.h
浏览该文件的文档.
1#pragma once
2#include "common/Export.h"
3
10
11#include <array>
12
13namespace eve::asset_import {
14
17 std::string name;
18 std::string diffuseSource;
19 std::string normalSource;
20 std::string weightSource;
21 std::string maskSource;
23 std::string normalConvention = "opengl";
24 float tileSizeMeters = 1.0f;
25 std::array<float, 2> tileScaleMeters{1.f, 1.f};
26 std::array<float, 2> tileOffsetMeters{};
27 std::array<float, 4> maskRemapMinimum{};
28 std::array<float, 4> maskRemapMaximum{1.f, 1.f, 1.f, 1.f};
29 std::array<float, 4> specular{};
30 float metallic = 0.f;
31 float normalScale = 1.f;
32 float smoothness = 0.f;
33};
34
37 std::string id;
38 std::string prototype;
39 std::string layer;
41 float minimumSlopeRadians = 0.0f;
42 float maximumSlopeRadians = 1.57079632679f;
43 std::uint64_t seed = 0;
44};
45
48 std::string prototype;
49 float position[3] = {};
50 float rotation[4] = {0, 0, 0, 1};
51 float scale[3] = {1, 1, 1};
52};
53
56 std::string prototype;
57 std::string renderMode;
58 bool usePrototypeMesh = false;
59 bool useInstancing = false;
60 float minWidth = 1.f;
61 float maxWidth = 1.f;
62 float minHeight = 1.f;
63 float maxHeight = 1.f;
64 std::int64_t noiseSeed = 0;
65 float noiseSpread = .1f;
66 float density = 1.f;
67 float alignToGround = 0.f;
68 float positionJitter = 0.f;
69 std::string resourceAsset;
70 std::array<float, 4> healthyColor{1.f, 1.f, 1.f, 1.f};
71 std::array<float, 4> dryColor{1.f, 1.f, 1.f, 1.f};
72 float bendFactor = 0.f;
73 float holeEdgePadding = 0.f;
74 bool useDensityScaling = true;
75};
76
79 std::uint32_t width = 0;
80 std::uint32_t height = 0;
81 float spacingX = 1.0f;
82 float spacingZ = 1.0f;
83 std::vector<float> heightsMeters;
84 std::vector<CanonicalTerrainLayer> layers;
85 std::string holesSource;
86 std::string holesAsset;
87 std::array<std::string, 4> controlSources;
88 std::array<std::string, 4> controlAssets;
89 float boundsMultiplier = 1.f;
90 bool hasWavingGrass = false;
91 float wavingGrassAmount = 0.f;
92 float wavingGrassSpeed = 0.f;
94 std::array<float, 4> wavingGrassTint{1.f, 1.f, 1.f, 1.f};
95 std::vector<CanonicalScatterRule> scatterRules;
96 std::vector<CanonicalTerrainDetailPrototype> detailPrototypes;
97 std::vector<CanonicalTerrainInstance> instances;
99};
100
110 const ImportPackageIdentity& package, const CanonicalTerrainInput& terrain, std::string_view importer,
111 const AssetImportLimits& limits = {});
112
113} // namespace eve::asset_import
std::string terrain
Tool-side image and glTF importers producing canonical .eva candidates.
#define EVENGINE_API_PLATFORM
Definition Export.h:107
const AssetImportLimits & limits
Move-only operation result carrying either a value or Status.
Definition Result.h:155
std::map< std::string, Value > Object
Definition Value.h:34
Result< PreparedAssetImport > prepareCanonicalTerrainImport(const ImportPackageIdentity &package, const CanonicalTerrainInput &terrain, std::string_view importer, const AssetImportLimits &limits)
Build eve.terrain, terrain material, PCG and instance assets from canonical input.
Parser and allocation budgets applied to untrusted importer inputs.
One deterministic terrain scatter rule, independent of source engine nodes.
One source vegetation prototype shared by baked terrain instances.
Fully parsed source terrain ready for canonical archive construction.
std::array< std::string, 4 > controlAssets
std::array< std::string, 4 > controlSources
std::vector< CanonicalTerrainDetailPrototype > detailPrototypes
std::vector< CanonicalTerrainInstance > instances
std::vector< CanonicalScatterRule > scatterRules
std::vector< CanonicalTerrainLayer > layers
One baked instance in canonical right-handed metre coordinates.
One canonical terrain material layer after source-engine mapping.
Common stable package metadata supplied by an import transaction.