tune(disk): align defaults to Gargantua visuals

Defaults retuned to match the Interstellar look now that the density
model drives appearance:

- disk_outer 15 → 25: Gargantua-like extent.
- disk_half_thickness semantics → H/R ratio, default 0.15 (was an
  absolute 0.3/0.2 world-space band). Standard thin-disk scale height.
- disk_color_mode default → Blackbody (was Gradient): the Novikov-Thorne
  radial temperature gradient × Kerr Doppler gives the smooth white-hot
  inner → deep-orange outer look the new density model is built around.
- disk_temp 10000 → 6500 K: tuned so the NT profile yields warm-white
  inner fading to deep orange at the edge.
- density_strength 1.0 → 1.2: the new model has no floor and decays to 0
  at the edges, so a slightly higher multiplier keeps the bulk opaque
  after per-step integration.

UI: "Half thickness" → "Thickness (H/R)" with a 0.02..=0.3 range
(thin-disk regime); "Outer radius" range widened to 6..=50.

BlackHoleUniforms::Default (material.rs) mirrors the same values so the
GPU default matches params.rs before the first mirror_params tick. Field
order/types/layout unchanged; no uniform-struct migration needed.
This commit is contained in:
xfy 2026-07-15 17:32:14 +08:00
parent 7130d0c6b2
commit b4f14b2f35
3 changed files with 25 additions and 13 deletions

View File

@ -110,7 +110,8 @@ pub struct BlackHoleParams {
pub exposure: f32,
pub bloom_quality: BloomQuality,
// Disk turbulence (Phase 3.1: volumetric disk)
pub disk_half_thickness: f32,
pub disk_half_thickness: f32, // H/R ratio (scale height / radius); NOT absolute
pub filament_freq: f32,
pub filament_sharpness: f32,
pub density_freq: f32,
@ -131,7 +132,7 @@ impl Default for BlackHoleParams {
Self {
rs: 1.0,
disk_inner: 3.0,
disk_outer: 15.0,
disk_outer: 25.0, // Gargantua-like extent (was 15.0)
disk_tilt: 0.45, // ~25.8 deg
disk_brightness: 1.0,
disk_rotation_speed: 1.2,
@ -150,17 +151,28 @@ impl Default for BlackHoleParams {
bloom_strength: 0.8,
exposure: 1.0,
bloom_quality: if cfg!(target_arch = "wasm32") { BloomQuality::Low } else { BloomQuality::High },
disk_half_thickness: if cfg!(target_arch = "wasm32") { 0.2 } else { 0.3 },
// H/R ratio (was an absolute world-space half-height). 0.15 = standard
// thin-disk scale height; the slab now scales with radius, so a ray
// through large r traverses a proportionally thicker disk.
disk_half_thickness: 0.15,
filament_freq: 1.0,
filament_sharpness: 2.0,
density_freq: 0.8,
density_strength: 1.0,
// Raised from 1.0: the new density model has no 0.55 floor and decays
// to 0 at the edges, so a slightly higher multiplier keeps the bulk
// opaque after per-step integration.
density_strength: 1.2,
arm_count: 2.0,
arm_tightness: 2.0,
arm_strength: 0.5,
disk_quality: if cfg!(target_arch = "wasm32") { DiskQuality::Low } else { DiskQuality::High },
disk_color_mode: DiskColorMode::Gradient, // keep prior look as the default
disk_temp: 10000.0,
// Blackbody: the Novikov-Thorne radial temperature gradient × Kerr
// Doppler gives the smooth white-hot inner → deep-orange outer look
// (closer to Gargantua than the hand-tuned Gradient mode).
disk_color_mode: DiskColorMode::Blackbody,
// 6500 K (was 10000): tuned so the NT profile yields a warm-white
// inner disk fading to deep orange at the outer edge.
disk_temp: 6500.0,
jets_enabled: true,
jets_strength: 1.0,
}

View File

@ -76,7 +76,7 @@ impl Default for BlackHoleUniforms {
_pad3: 0.0,
rs: 1.0,
disk_inner: 3.0,
disk_outer: 15.0,
disk_outer: 25.0,
disk_tilt: 0.45,
disk_brightness: 1.0,
disk_rotation_speed: 0.5,
@ -94,17 +94,17 @@ impl Default for BlackHoleUniforms {
bloom_strength: 0.8,
exposure: 1.0,
_pad5: 0.0,
disk_half_thickness: 0.3,
disk_half_thickness: 0.15,
filament_freq: 1.0,
filament_sharpness: 2.0,
density_freq: 0.8,
density_strength: 1.0,
density_strength: 1.2,
arm_count: 2.0,
arm_tightness: 2.0,
arm_strength: 0.5,
disk_quality: 3, // High
disk_color_mode: 0, // Gradient (preserves prior appearance)
disk_temp: 10000.0,
disk_color_mode: 1, // Blackbody (Novikov-Thorne + Kerr Doppler)
disk_temp: 6500.0,
jets_enabled: 1,
jets_strength: 1.0,
}

View File

@ -35,7 +35,7 @@ pub fn ui_system(
.default_open(true)
.show(ui, |ui| {
// disk_inner removed — now spin-derived (see Black Hole section).
ui.add(egui::Slider::new(&mut params.disk_outer, 6.0..=40.0).text("Outer radius"));
ui.add(egui::Slider::new(&mut params.disk_outer, 6.0..=50.0).text("Outer radius"));
ui.add(egui::Slider::new(&mut params.disk_tilt, 0.0..=std::f32::consts::PI).text("Tilt"));
ui.add(egui::Slider::new(&mut params.disk_brightness, 0.0..=3.0).text("Brightness"));
ui.add(egui::Slider::new(&mut params.disk_rotation_speed, 0.0..=3.0).text("Rotation speed"));
@ -68,7 +68,7 @@ pub fn ui_system(
});
params.disk_quality = q;
let on = q != DiskQuality::Off;
ui.add_enabled(on, egui::Slider::new(&mut params.disk_half_thickness, 0.05..=1.0).text("Half thickness"));
ui.add_enabled(on, egui::Slider::new(&mut params.disk_half_thickness, 0.02..=0.3).text("Thickness (H/R)"));
ui.add_enabled(on, egui::Slider::new(&mut params.filament_freq, 0.2..=4.0).text("Filament frequency"));
ui.add_enabled(on, egui::Slider::new(&mut params.filament_sharpness, 1.0..=6.0).text("Filament sharpness"));
ui.add_enabled(on, egui::Slider::new(&mut params.density_freq, 0.2..=3.0).text("Density frequency"));