public readonly record struct FoliageTypeOne kind of thing that gets painted onto a surface: what a .vxfoliage asset holds.
Remarks
The palette's unit — [docs/plan/31 § The palette]. A type carries the mesh, how densely it is painted, how far apart two of them may be, the ranges its randomness draws from, the filters that refuse a placement, how far it is drawn, and whether it collides.
⚠ Assets are named, not handled. This assembly has no device and no asset database — [§ D1] — and a handle names a slot in a world that issued it, while a .vxfoliage is read by a world that has not run yet. It is the same choice TerrainComponent and TerrainLayerDescription make.
⚠ Radius is a minimum spacing, not a size. It is what makes a painted forest look scattered rather than clumped, and it is the one setting an artist reaches for when a stroke produces a mat of overlapping trunks. The mesh's own size is the mesh's business.
Fields and properties (24)
public string NameWhat the type is called, which is what the palette lists it as.
public string MeshThe mesh or LOD group this places, by asset name.
public FoliageStorage StorageWhether its instances are stored or scattered from a rule.
public float DensityHow many instances a square metre of full-strength brush places.
public float RadiusHow close together two instances of this type may be, in metres.
public float MinScaleThe smallest uniform scale an instance is given.
public float MaxScaleAnd the largest.
public float AlignToNormalHow much an instance turns to face the surface normal, 0…1.
public float MaxPitchHow far an instance may be tilted at random, in radians.
public bool RandomYawWhether each instance is turned to a random heading.
public float MinSlopeThe shallowest ground this may be placed on, as a slope in radians from flat.
public float MaxSlopeAnd the steepest.
public float MinAltitudeThe lowest altitude this may be placed at, in metres.
public float MaxAltitudeAnd the highest.
public string LayerFilterA terrain layer this only spawns on, by name, or empty for anywhere.
public float LayerThresholdHow much of LayerFilter a place needs before this may spawn, 0…1.
public float StartCullDistanceHow far away instances start fading out, in metres.
public float EndCullDistanceAnd where they are gone.
public bool CastShadowsWhether instances cast shadows.
public string CollisionShapeThe collision shape an instance gets, by asset name, or empty for none.
public float ActivationRadiusHow close a physics-relevant entity has to be before an instance gets a body, in metres.
public FoliageEcology EcologyHow it behaves in a growth simulation, or None.
public bool CollidesWhether an instance of this type ever gets a physics body.
public bool NeedsSurfaceWeightWhether a placement has to ask what is painted underneath it.
Methods (3)
public static FoliageType Of(string name)A type with the settings a new one starts from.
public int CandidatesFor(float brushRadius)How many instances a stamp of this radius would place at full strength.
public string? Validate()Why this type cannot be used, or if it can.
Used by (29)
- FoliageBlockerTestsVixen.Rendering.Terrain.Tests
- FoliageCollisionVixen.Foliage
- FoliageCollisionTestsVixen.Foliage.Tests
- FoliageCullParityTestsVixen.Rendering.Terrain.Tests
- FoliageCullPassVixen.Rendering.Terrain
- FoliageCullPassTestsVixen.Rendering.Terrain.Tests
- FoliageGrowthVixen.Foliage
- FoliageGrowthTestsVixen.Foliage.Tests
- FoliageRendererVixen.Rendering.Terrain
- FoliageRendererTestsVixen.Rendering.Terrain.Tests
- FoliageScatterVixen.Foliage
- FoliageScatterTestsVixen.Foliage.Tests
- FoliageStoreVixen.Foliage
- FoliageStreamingTestsVixen.Rendering.Terrain.Tests
- FoliageVolumeVixen.Foliage
- FoliageVolumeTestsVixen.Foliage.Tests
- GrassCostsNothingTestsVixen.Foliage.Tests
- GrassTypeVixen.Foliage
- PaletteRemovalTestsVixen.Foliage.Tests
- TypeRegistrationVixen.Foliage
- TypesVixen.Foliage.Tests
- Vixen_Foliage_FoliageTypeSerializerVixen.Foliage
- AddFoliageTypeCommandVixen.Editor.Terrain
- FoliageEditVixen.Editor.Terrain
- FoliageModeVixen.Editor.Terrain
- FoliageModeTestsVixen.Editor.Terrain.Tests
- TerrainAssetImporterVixen.Editor.Assets
- TerrainModuleVixen.Editor.Terrain
- TerrainSessionTestsVixen.Editor.App.Tests