PANDUAN AI Visual
Fungsi Jarak yang Ditandatangani
A signed distance function (SDF) describes a shape by giving, for any point in space, the distance to the nearest surface, with a sign that says whether the point is inside or outside.
Dengarkan panduan iniDiceritakan oleh AI · ~9 min
Di halaman ini10 min read
Ikhtisar
The surface is wherever the value is zero. SDFs drive real-time ray-marched graphics, depth-camera 3D scanning and neural 3D reconstruction methods such as DeepSDF and NeuS.
Poin-poin utama
- A signed distance function returns the distance to the nearest surface, negative inside and positive outside by the DeepSDF convention.
- The surface of an SDF is its zero level set, and its gradient at the surface gives the normal.
- Sphere tracing, described by John C. Hart in 1996, renders SDFs by stepping along each ray by the distance value.
- Union of two SDFs is min(a, b), while intersection and subtraction produce distance bounds rather than exact distances.
- Curless and Levoy's 1996 SIGGRAPH paper fused up to 70 range scans into a cumulative weighted signed distance volume.
- DeepSDF in 2019 represented a whole category of ShapeNet shapes with a single 7.4 MB neural network.
Menyelam Lebih Dalam
A signed distance function, usually shortened to SDF, is a rule that takes any point in space and returns one number: how far that point is from the nearest surface of a shape. The sign carries extra information. By the most common convention, used in the DeepSDF paper, points inside the shape get negative values and points outside get positive values. The surface itself is the set of points where the function equals zero, called the zero level set. A sphere of radius r centered at the origin is the simplest example: its SDF is the length of the point's position vector minus r. A point 3 units from the center of a sphere of radius 1 has a value of 2, and the center has a value of -1. Because the description is a function rather than a list of triangles, it is called an implicit representation of the surface.
An SDF can come from three places. It can be written as a formula, as shader programmers do for spheres, boxes, capsules and tori. It can be stored as samples on a 3D grid of voxels, small cubes of space, with values between grid points interpolated. Or it can be learned by a neural network that takes a 3D coordinate as input and outputs the distance. In every case the same two operations matter: evaluating the distance at a point, and finding where the value crosses zero.
Rendering an SDF directly uses a technique called sphere tracing, described by John C. Hart in The Visual Computer in 1996. A ray leaves the camera. At each step the renderer evaluates the SDF at the current point. That value is the radius of a sphere guaranteed to contain no surface, so the ray can safely jump forward by exactly that much. Steps are long in empty space and shrink as the ray approaches a surface, and the loop stops when the value falls below a small threshold. The guarantee holds when the function never overstates the true distance, a property the paper ties to the Lipschitz condition, which limits how fast the function can change. The gradient of the SDF at the hit point gives the surface normal for lighting.
Combining shapes is where SDFs become a modeling tool. Given two SDFs a and b, the union of the shapes is min(a, b), the intersection is max(a, b), and subtracting a from b is max(-a, b). Smooth versions replace min and max with blended functions controlled by a radius k, producing organic joins without seams. Inigo Quilez's widely used reference of distance functions makes an important distinction: basic primitives such as the sphere and box are exact, while subtraction, intersection, smooth blends and non-uniform scaling produce bounds, values that are never larger than the true distance but may be smaller. Bounds still render correctly with sphere tracing but need more steps, and they can break effects that rely on true distances, such as soft shadows.
SDFs also became the standard way to merge real scans. In 1996 Brian Curless and Marc Levoy presented a volumetric method at SIGGRAPH that adds each range image into a cumulative weighted signed distance function stored on a grid, then extracts the zero isosurface. They showed the result is least-squares optimal under certain assumptions, integrated up to 70 range images, and produced models of about 2.6 million triangles. The DeepSDF authors credit that work and KinectFusion (Newcombe and colleagues, 2011) as the pioneers of truncated SDF fusion, in which distances are stored only near the surface. KinectFusion applied the idea in real time with a moving Kinect depth camera.
Neural SDFs arrived in 2019. DeepSDF, from researchers at the University of Washington, MIT and Facebook Reality Labs, trained an eight-layer fully connected network with 512-unit layers to output the SDF of a shape given a 3D point and a latent code, a short vector identifying which shape. Training samples 500,000 points per ShapeNet mesh, concentrated near the surface, and clamps distances to 0.1 so capacity is spent near the surface. One network represented an entire shape category in 7.4 MB, and the paper reports state-of-the-art shape reconstruction and completion from partial, noisy scans. In 2020 Implicit Geometric Regularization (IGR) showed that a network could be fit to raw point clouds with a loss that makes the function vanish on the points and keeps its gradient at unit length. In 2021 NeuS learned SDFs from photographs by deriving a volume-rendering formulation that is unbiased to first order at the surface, and reported better Chamfer distance than IDR and NeRF on the DTU benchmark.
Compared with the alternatives, SDFs trade explicitness for convenience. Triangle meshes are what graphics hardware draws fastest, but they make topology changes and inside-outside queries awkward. Occupancy fields store only inside or outside, which loses the distance information that sphere tracing and collision tests use. Point clouds have no surface at all. Density fields such as the original NeRF render well, but the NeuS authors note that extracting high-quality surfaces from them is difficult because the representation has too few surface constraints. An SDF gives a well-defined surface, cheap inside tests, smooth normals from the gradient, and arbitrary topology, and a mesh can always be extracted with Marching Cubes when one is needed.
The limitations are concrete. A sign requires a closed shape; the DeepSDF authors note that human-made meshes are often not watertight and contain internal structures that must be cleaned before distances can be computed. Grid SDFs grow with the cube of resolution, which is why fusion systems truncate them. Neural SDFs are limited by the number of sample points and the network's capacity, and they must be evaluated many times per ray. Learned functions are not guaranteed to be true distances everywhere, which is why IGR and NeuS add an Eikonal term that pushes the gradient length toward one. Optimization can also be slow: NeuS trained each scene for 300,000 iterations, about 14 to 16 hours on a single NVIDIA RTX 2080 Ti GPU.
In practice the cost depends on the representation. Analytic SDFs cost almost nothing to store and run in real time in a fragment shader. Voxel SDFs need memory proportional to the grid size but allow constant-time lookups. Neural SDFs compress shapes well, as DeepSDF's 7.4 MB category model shows, but each query is a full network evaluation, so rendering and mesh extraction need a GPU and careful sampling.
04Contoh yang berhasil
Sphere tracing a ray against a sphere SDF
Define the scene as a sphere of radius 1 at the origin, so f(p) = length(p) - 1.
Start a ray at o = (0, 0, -5) pointing along d = (0, 0, 1), with t = 0 and a hit threshold of 0.001.
Evaluate f at (0, 0, -5): the distance is 5 - 1 = 4, so advance t to 4.
Evaluate f at (0, 0, -1): the distance is 1 - 1 = 0, which is below the threshold, so report a hit at t = 4.
Compute the normal as the normalized gradient of f at the hit point, which for a sphere is the hit position divided by its length, (0, 0, -1).
Repeat with a ray offset sideways, such as o = (0.9, 0, -5), and count how many steps it takes as the ray grazes the sphere.
Apa yang ditunjukkannya
A hit at distance 4 with normal pointing back toward the camera, found in two evaluations. Check it against the analytic ray-sphere intersection, which gives the same t = 4, and note that the grazing ray needs noticeably more steps because the distance values stay small near the silhouette.
Implementasi Dunia Nyata
Shader artists build entire scenes from exact SDF primitives and combine them with min and max operators; Inigo Quilez's reference page lists the formulas and notes which operations keep distances exact.
Curless and Levoy's 1996 SIGGRAPH method merged up to 70 laser range scans into a cumulative weighted signed distance volume and extracted models of about 2.6 million triangles.
Microsoft Research's KinectFusion project, established in 2011, tracked a handheld depth camera and fused its frames into a 3D surface in real time, building on truncated SDF fusion.
DeepSDF (2019) trained one neural network to represent thousands of ShapeNet chair models in 7.4 MB, less than half the size of a single uncompressed 512-cubed voxel grid.
NeuS (2021) reconstructs object surfaces from ordinary photos by learning a neural SDF through volume rendering, evaluated on 15 DTU scenes with 49 or 64 images each.
Masa Depan Fungsi Jarak Bertanda Tangan
Research since DeepSDF in 2019 has focused on making learned SDFs more accurate, faster and easier to train from ordinary data. IGR (2020) showed that a simple Eikonal regularizer can recover smooth surfaces from raw point clouds, and NeuS (2021) showed that photographs alone, without foreground masks, can supervise a neural SDF. Open problems named or implied in these papers include thin structures, non-watertight inputs, per-scene training times measured in hours, and the cost of evaluating a network many times along each ray. In graphics practice, analytic SDFs remain a staple of shader programming, and Inigo Quilez's reference continues to document which operators preserve exact distances. In scanning, the truncated SDF fusion approach that Curless and Levoy introduced in 1996 and KinectFusion ran in real time in 2011 remains a common baseline for depth-camera reconstruction. Whether future systems favor SDFs, density fields or explicit primitives for a given task is an active research question, and published benchmark results such as Chamfer distance on DTU are the reliable way to compare them.
Mempraktikkannya
Mengapa itu penting
- Kecepatan dan skala. Visual AI dapat mengotomatiskan tugas inspeksi, deteksi, dan penandaan dalam skala besar.
- Pilihan Build. Tim kreatif dapat membuat prototipe konsep lebih cepat dengan lebih sedikit revisi manual.
- Tim dan alur kerja. Pengoperasiannya dapat menggunakan sinyal gambar dan video yang sebelumnya sulit diproses.
Hati-hati
- Hak citra dan persetujuan dapat menjadi risiko hukum jika asal usulnya tidak jelas.
- Performa model dapat bervariasi berdasarkan pencahayaan, demografi, dan lingkungan.
- Positif palsu mungkin tidak diketahui kecuali ambang batas keyakinan dipantau.
Langkah selanjutnya
- Tentukan kriteria penerimaan untuk biaya presisi, penarikan kembali, dan kesalahan.
- Uji dengan data yang sesuai dengan kondisi produksi sebenarnya.
- Tambahkan tinjauan manusia untuk prediksi dengan tingkat keyakinan rendah atau dampak tinggi.
- Lacak penyimpangan model dan validasi ulang setelah kamera atau kumpulan data berubah.
Sumber dan bacaan lebih lanjut
- The Visual Computer (Springer)Sphere tracing: a geometric method for the antialiased ray tracing of implicit surfaces
- ACM SIGGRAPH History ArchiveA volumetric method for building complex models from range images
- Microsoft ResearchKinectFusion Project Page
- arXiv (Facebook Reality Labs)DeepSDF: Learning Continuous Signed Distance Functions for Shape Representation
- arXiv (ICML 2020)Implicit Geometric Regularization for Learning Shapes
- arXiv (NeurIPS 2021)NeuS: Learning Neural Implicit Surfaces by Volume Rendering for Multi-view Reconstruction
- Inigo QuilezDistance functions
Terus Menjelajah
Buletin gratis
Dapatkan pengarahan AI harian
Tiga cerita AI terverifikasi setiap pagi hari kerja, ditulis dalam bahasa Inggris sederhana. Gratis selamanya, tanpa iklan.
Satu email setiap hari kerja. Berhenti berlangganan dalam satu klik. Kami tidak pernah menjual atau membagikan alamat Anda.
Uji diri Anda sendiri
Take the Signed Distance Functions quiz
Umpan balik instan untuk setiap jawaban, dan sertifikat yang dapat dibagikan dengan ID yang dapat diverifikasi setelah Anda lulus kursus.
Mendukung pendidikan AI gratis. AI Understanding adalah organisasi nirlaba 501(c)(3) — tanpa iklan, tanpa paywall, selamanya. Berikan sumbangan
Pertanyaan yang sering diajukan
What is Signed Distance Functions?
A signed distance function (SDF) describes a shape by giving, for any point in space, the distance to the nearest surface, with a sign that says whether the point is inside or outside. The surface is wherever the value is zero. SDFs drive real-time ray-marched graphics, depth-camera 3D scanning and neural 3D reconstruction methods such as DeepSDF and NeuS.
Apa yang dihasilkan oleh fungsi jarak bertanda untuk titik 3D tertentu?
SDF memetakan titik mana pun berdasarkan jaraknya dari permukaan terdekat; tandanya menunjukkan apakah titik tersebut berada di dalam (negatif) atau di luar (positif).
Di manakah lokasi sebenarnya permukaan SDF?
Permukaan adalah himpunan titik-titik yang jarak tandanya tepat nol, batas antara bagian dalam dan bagian luar.
Where does a true signed distance function satisfy the unit-gradient eikonal condition?
A true SDF has gradient magnitude one where it is differentiable, which holds almost everywhere; at nonsmooth points such as the medial axis, the gradient may be undefined.
Bagaimana penelusuran bola menggunakan nilai SDF?
Karena SDF memberikan jarak ke permukaan terdekat, sinar dapat bergerak dengan aman sebesar itu tanpa melampaui batas, mengulanginya hingga mencapai nol.
Apa yang digunakan DeepSDF untuk mewakili bentuk tertentu?
DeepSDF mengkodekan setiap bentuk sebagai vektor laten berdimensi rendah yang mengkondisikan jaringan untuk memprediksi SDF, sehingga memungkinkan bentuk yang ringkas dan berkelanjutan.
Teruslah belajar
Panduan terkait
Panduan lainnya dipilih untuk topik ini