载入中...
搜索中...
未找到
FoliageCluster.h
浏览该文件的文档.
1#pragma once
2
3#include "procgen/MeshBuild.h"
4
5#include <cstdint>
6
7namespace eve::procgen {
8
26 std::uint32_t seed = 0;
28 float centerX = 0.f;
30 float centerY = 0.f;
32 float centerZ = 0.f;
34 float radius = 1.f;
36 float leafSize = 0.2f;
42 float leafSpacing = 0.9f;
44 int planes = 9;
49 int capPlanes = 2;
51 float tiltDegrees = 26.f;
53 float planeOffset = 0.18f;
55 float planeScaleVariation = 0.14f;
57 float leafJitter = 0.16f;
59 float leafScaleVariation = 0.25f;
67 float normalRounding = 1.f;
69 float uvMin = 0.52f;
71 float uvMax = 1.f;
77 bool doubleSided = true;
78};
79
92
93} // namespace eve::procgen
scene::NodeDesc desc
#define EVENGINE_API_DOMAINS
Definition Export.h:110
CPU triangle mesh from procedural mesh recipes (e.g. marching cubes). Positions/normals are xyz-packe...
Definition MeshBuild.h:19
int addFoliageCluster(MeshBuild &out, const FoliageClusterDesc &desc)
Append one blue-noise leaf cluster to a mesh.
Recipe for one stylized leaf cluster ("foliage card bundle").
float leafJitter
Per-leaf offset along the plane normal, in radius units; clamped to 0..0.5.
std::uint32_t seed
RNG stream seed; the same seed and inputs reproduce the same leaves.
float tiltDegrees
Maximum ring-plane tilt away from vertical, in degrees; clamped to 0..80.
float uvMax
End of the foliage band in the shared tree/bush atlas, on U.
float leafSize
Leaf length in world units; clamped to at least 1e-3.
float leafScaleVariation
Leaf size variation as a fraction of leafSize; clamped to 0..0.6.
float planeScaleVariation
Per-plane radius variation; clamped to 0..0.6.
float centerY
Cluster centre on Y, in world units.
bool doubleSided
Emit both windings per leaf. The engine's mesh3d pipelines cull back faces unless a Material opts int...
float centerZ
Cluster centre on Z, in world units.
float uvMin
Start of the foliage band in the shared tree/bush atlas, on U.
int capPlanes
Near-horizontal planes that close the cluster's top and bottom. A pure ring of vertical planes leaves...
float leafSpacing
Blue-noise centre distance, in leafSize units. Larger values spread the leaves out (sparser,...
float planeOffset
Per-plane translation inside the cluster, in radius units; clamped to 0..0.6.
float centerX
Cluster centre on X, in world units.
int planes
Leaf planes rotated around the cluster's Y axis; clamped to 1..24.
int maxLeavesPerPlane
Hard cap on leaves per plane; clamped to 1..256. When it binds, the sampler widens the blue-noise dis...
float radius
Cluster radius in world units; clamped to at least 1e-3.
float normalRounding
Blend from the flat plane normal (0) to the cluster sphere normal (1).