Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to main content

Crate farthing

Crate farthing 

Source
Expand description

§farthing

Mesh LOD for real-time 3D, engine-agnostic: farthing works on geometry and opaque material slots, and reaches real materials only through the host::RenderHost boundary.

The data model lives at the crate root:

  • Mesh — an indexed triangle mesh whose vertices are wedges: one vertex per unique attribute set, so a UV seam is two vertices at one position (the GPU layout).
  • Scene — meshes, instances with world transforms, skeletons and opaque material slots. farthing never knows what a material looks like.
  • host::RenderHost — the boundary to the engine. Anything that needs real materials (baking, impostor captures, alpha-aware visibility, image metrics) goes through it.
  • bvh::Bvh — binned-SAH bounding volume hierarchy for ray casts and closest-point queries.
  • image::Image, metrics — float images and quality metrics.

The processors are modules:

  • reduce — attribute-aware quadric edge-collapse reduction, repair, vertex-cache optimization.
  • uv — chart-based UV parameterization and atlas packing.
  • bake — material casting from a source to a target surface through the host.
  • aggregate — many meshes and materials into one mesh with one atlas.
  • cluster — Nanite-style cluster DAGs for per-cluster LOD selection at run time.
  • hlod — many objects into one distant proxy: hidden-surface removal, merge, reduce, bake; or a whole level into a tree of nested cells with per-node switch distances.
  • voxel — voxel remeshing (watertight proxies) and conservative occluders.
  • visibility — camera-sampled visibility culling and texel budgets.
  • impostor — octahedral, flipbook, single-view and billboard-cloud impostors.
  • bones — skinning LOD: influence limiting and bone removal.
  • anim — skeletal animation: sampling clips, and baking them into a GPU pose palette that a vertex shader plays back for crowds of units without the CPU.
  • io — glTF 2.0 and OBJ import/export (feature io, on by default).

Re-exports§

pub use anim::Animation;
pub use error::Error;
pub use error::Result;
pub use math::Aabb;
pub use mesh::Mesh;
pub use mesh::MorphTarget;
pub use mesh::Skin;
pub use scene::Instance;
pub use scene::Joint;
pub use scene::MaterialId;
pub use scene::MaterialSlot;
pub use scene::Scene;
pub use scene::Skeleton;
pub use scene::Transform;
pub use glam;

Modules§

aggregate
Scene aggregation: merge instances into one mesh with a shared, repacked atlas.
anim
Skeletal animation.
bake
Material baking: transfer a source surface’s appearance onto a proxy’s UVs.
bones
Bone reduction: influence limiting and skinned-error bone removal.
bvh
Binned-SAH bounding volume hierarchy over triangles.
cluster
Cluster LOD: a DAG of small triangle clusters for per-cluster detail selection at run time (the scheme Nanite made popular, Karis 2021).
error
hlod
Hierarchical LOD proxies: many objects in, one mesh with one baked material out.
host
The engine boundary.
image
Images: Image, linear float RGBA for work in progress (bakes, captures, metrics), and Texture, compact shared 8-bit RGBA for material textures as they are stored, which Texture::downsample shrinks with a choice of Downsample filter.
impostor
Impostors: octahedral and flipbook captures, billboard clouds and surfel proxies.
io
glTF and OBJ import and export (feature io, on by default).
math
Small geometric helpers.
mesh
Indexed triangle meshes with per-vertex (“wedge”) attributes.
metrics
Quality metrics: surface distance between meshes and image difference.
quad
Pure-quad meshes, for quad-aware reduction.
raster
CPU reference renderer for triangle-ID buffers (the default crate::host::RenderHost::render_ids).
reduce
Mesh reduction: triangle and quad simplification, LOD chains, repair and vertex-cache ordering.
rng
Tiny deterministic PCG32 generator, so results are reproducible without extra dependencies.
scene
Scenes: meshes, instances, skeletons and opaque material slots.
uv
UV parameterization (LSCM, ARAP, planar) and atlas packing.
visibility
Camera-sampled visibility: cull hidden triangles and weight the visible ones.
voxel
Voxel remeshing and occluder generation.