Kategorie: Wszystkie - volume - distance

przez Mike Ton 9 lat temu

497

Rendering

Rendering

Rendering

Volumetric

Signed Distance Function
// Returns distance in sphere

// This now belongs to a family of functions called signed distance functions

0 == sphere surface

negative == inside sphere

positive == outside sphere

float sphereHit (float3 p) { ... }

return distance(p,_Centre) - _Radius;

// Checks if point is in sphere

bool sphereHit (float3 p) { ... }

return distance(p,_Centre) < _Radius;

An in depth discussion on the mathematical tools that allow us to generate and combine arbitrary volumes
RayMarching
Volume Raycasting

A variant of raymarching that can render semitransparent surfaces such as fog and smoke.

Focuses on the the implementation of distance-aided raymarching, the de-fact standard technique to render volumes
http://www.alanzucconi.com/2016/07/01/volumetric-rendering/