1. Scope
This renderer integrates light rays using a Schwarzschild geodesic model, then adds Kerr-like rotation effects as a controlled approximation for visual frame dragging and accretion-disk dynamics.
It is designed for plausible real-time visualization, not as a full GR solver for Kerr null geodesics.
2. Units and Coordinates
- Code units normalize the Schwarzschild radius to
r_s = 1. - Light speed is normalized (
c = 1) in integration logic. - The black-hole horizon is at
r = 1; photon-sphere behavior appears nearr ≈ 1.5. - Rays are integrated in a polar orbital-plane parameterization using
u = 1/rand anglephi.
3. Schwarzschild Geodesic Model
Null-ray dynamics are advanced with an ODE in the orbital plane:
d²u/dphi² + u = (3/2)u², where u = 1/r
Integration uses RK4 with adaptive angular step shrinkage near strong curvature, equatorial zones, and photon-sphere proximity to preserve image stability.
4. Kerr-like Approximation Layer (Rotation + Frame Dragging)
4.1 ISCO Shift
Disk inner radius is clamped against a prograde Kerr ISCO approximation
r_in = max(ACCRETION_MIN_R, r_isco(a*)).
4.2 Frame-Dragging Angular Rate
omega_fd(r) ∝ a* / r^3
This drives three separate visual effects: geodesic-plane twisting, disk-flow angular velocity offset, and procedural pattern advection.
4.3 Important Disclaimer
The ray geodesic itself remains Schwarzschild. Spin and frame-dragging terms are added as a Kerr-like approximation for rendering behavior and disk appearance.
5. Accretion-Disk Emission and Color Model
5.1 Plane Intersection
The disk is a tilted plane defined by a normal and tangent basis. Ray segments crossing this plane accumulate emission (non-opaque additive compositing).
5.2 Temperature Profile
T(r) ∝ r^-0.8 * (1 - sqrt(r_in / r))^0.35
5.3 Relativistic Frequency/Intensity Shift
delta = 1 / (gamma * (1 - v·n))g_gr = sqrt(1 - 1/r)g = delta * g_grT_obs = g * T_em, I_obs ~ g^p * I_em (p is shader-tuned)
Color is sampled through a precomputed black-body lookup texture using the shifted temperature.
6. Procedural Disk Density (Point-Field Approximation)
The disk uses a dense rotating point-field with:
- radial density taper (inner + outer),
- mass-biased settling toward inner radii,
- azimuthal/radial turbulence modulation,
- high-gain narrow ring boosts for visually sharp density bands.
This is a stylized emissivity structure for visual realism, not a particle MHD simulation.
7. Rendering Pipeline Summary
- Build camera ray per pixel (including optional aberration/beaming of observer motion).
- Integrate ray geodesic in Schwarzschild space with adaptive RK4.
- Apply Kerr-like frame-dragging twist to the local propagation basis.
- Accumulate emissive disk intersections with Doppler/gravitational shifts.
- If the ray escapes, sample lensed star/galaxy background.
- Output final radiance with observer-motion intensity correction.
8. Limitations
- No full Kerr metric geodesic integration (Schwarzschild core + Kerr-like overlays).
- No self-consistent GRMHD disk evolution or radiative transfer.
- Several constants are artistically tuned for stable, expressive real-time output.