mirror of
https://github.com/shinyobjectz/raea.git
synced 2026-12-01 12:44:11 -10:00
docs/bake.feature BK2 @done. raea-sys-lightbake starts: texels(glb, request) lays the model out over the atlas raea/wear's cause maps share (BK1's layout, no second raster), reads the layout's model back as world triangles into a parry3d BVH, moves each point off its surface by 1e-5 of the model's size (at least 10 microns), and marks the texels inside other geometry: 16 cosine-weighted rays each, inside when at least half meet a back face and more meet back than front. Tests: a slab with a block sunk 10 cm in and a box set by its node's translation (points on the world surface, the sunk part and the floor under the block marked, the open not); the same texels twice; a worn model's request gives its wear atlas. Measured at 64 texels a metre, debug build: table 1.55 M texels, 0.67% inside, 3.4 s with its layout; Cornell 232 k, 7.5%; window room 980 k, 9.8% (the bands where each wall box runs into the next wall and the slabs, the floor under the furniture's feet, the walls behind the window's piers); atelier 4.1 M, 4.9%, 70 s (41 s of it the layout, which a release raea does in 1.6 s). raea-sys-atlas (a facility) holds the atlas now: scene.rs, charts.rs and merge.rs moved from raea-sys-weathering as they were, its hidden-triangle step and shared samples from rays.rs, and Ask, the env fields an atlas is laid out for, parsed once for both. The light bake builds on it instead of sideways on another system, and weathering, at 1999 of 2000 lines, has room again. Weathering's bakes are the same: the table and window sets baked before and after the move gave the same keys and the same 12 files byte for byte, so no cached wear bake rebakes. Its 11 tests and raea-runtime-wear's pass; docs/wear.feature WR1's crate table says where each file is now.
23 lines
781 B
TOML
23 lines
781 B
TOML
[package]
|
|
name = "raea-sys-weathering"
|
|
version = "0.1.0"
|
|
edition = "2024"
|
|
license = "FSL-1.1-ALv2"
|
|
publish = false
|
|
description = "Cause maps baked from a glTF's geometry (rain, run-off, shelter, sun, damp, touch) for raea/wear"
|
|
|
|
[dependencies]
|
|
# triangle BVH and ray casts (Apache-2.0); in the tree already through rapier3d
|
|
parry3d = "0.31"
|
|
rayon = "1"
|
|
serde_json = "1"
|
|
sha2 = "0.10"
|
|
image = { version = "0.25", default-features = false, features = ["png"] }
|
|
raea-sys-runoff = { path = "../runoff" }
|
|
raea-sys-touch = { path = "../touch" }
|
|
raea-sys-exposure = { path = "../exposure" }
|
|
raea-sys-damage = { path = "../damage" }
|
|
raea-sys-glb = { path = "../glb" }
|
|
# the atlas the cause maps lie over (and the light bake's, docs/bake.feature BK1)
|
|
raea-sys-atlas = { path = "../atlas" }
|