mirror of
https://github.com/storytold/texturecraft.git
synced 2026-11-28 17:19:24 +01:00
Bake: thickness max occluder distance defaults to 0.1
Thickness is the mean hit distance divided by the max occluder distance, so the old shared default of 0.25 of the bounding box diagonal turned most thin parts of a model nearly black, and long rays reached geometry behind single-sided parts. 0.1 is the default in Adobe's public baker documentation. AO and bent normals keep 0.25. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3fac2b1482
commit
8a281d7f2c
2 files changed
+3
-2
No files matched your search
@@ -230,7 +230,8 @@ impl Default for BakeSettings {
|
||||
ao: RaySettings::default(),
|
||||
ao_ignore_backface: false,
|
||||
ao_self_occlusion: SelfOcclusion::Always,
|
||||
thickness: RaySettings::default(),
|
||||
// Thickness is hit distance / max distance: long rays turn thin parts almost black.
|
||||
thickness: RaySettings { max_distance: 0.1, ..RaySettings::default() },
|
||||
bent_normal: RaySettings::default(),
|
||||
curvature_strength: 1.0,
|
||||
curvature_from_normal: false,
|
||||
|
||||
@@ -143,7 +143,7 @@ fn per_map_ray_settings_round_trip() {
|
||||
let b = s.doc.project.texture_sets[0].bake.clone();
|
||||
assert_eq!(b.ao, RaySettings { rays: 48, max_distance: 0.5, spread: 90.0, distribution: RayDistribution::Uniform });
|
||||
assert!(b.ao_ignore_backface && b.ao_self_occlusion == SelfOcclusion::SameMeshName);
|
||||
assert_eq!((b.thickness.rays, b.thickness.spread, b.thickness.max_distance), (12, 45.0, 0.25));
|
||||
assert_eq!((b.thickness.rays, b.thickness.spread, b.thickness.max_distance), (12, 45.0, 0.1));
|
||||
assert_eq!((b.bent_normal.rays, b.bent_normal.max_distance, b.bent_normal.spread), (6, 0.1, 180.0));
|
||||
assert_eq!((b.curvature_radius, b.position_mode, b.direction_mode), (3, PositionMode::BoundingSphere, DirectionMode::Positive));
|
||||
assert_eq!(r[0]["settings"]["ao"]["selfOcclusion"], "sameMeshName");
|
||||
|
||||
Reference in new issue
Block a user