Questions tagged [signed-distance-field]

Filter by
Sorted by
Tagged with
1 vote
1 answer
176 views

How to implement skeletal animation for Signed Distance Field models?

When animating a 3D model, we want the surface of the model to remain continuous (such that, for instance, the limbs do not seem to slide on the torso, but stay attached at their position). In a ...
marked-off-topic's user avatar
0 votes
0 answers
96 views

How to calculate the world position of pixels in an HLSL script?

I want to make a simple ray marching loop in the fragment shader. I think the main issue is that I'm not giving the correct world position input. Here is my current attempt: ...
Nikhil Nair's user avatar
0 votes
0 answers
71 views

Comparison of SDFs with Normal Map Rendering for 2D Sprites

Prior note: I very drastically edited this question after understanding that SDFs and normal map rendering "do not solve the same problem." (Thank you, @DMGregory.) However, the question's ...
GPWR's user avatar
  • 101
1 vote
3 answers
602 views

Explain how Inigo Quilez calculates SDF box normals

Inigo Quilez's website has a page of 3D ray-surface intersectors, one of which is for a basic 3D box: ...
Nairou's user avatar
  • 584
0 votes
0 answers
44 views

Distance fields reacting to camera in a odd way

I have a material using distance fields that reacts in chunks as I bring the camera closer. It's almost as if it's reacting to a distance field with the camera but much larger and less gradual.This ...
Alexandria Hunsinger's user avatar
0 votes
1 answer
414 views

Get the closest point on an SDF

Is there a cheap and effective way to get the closest point on an SDF? (signed distance field). CodeParade made a video on a game he developed that uses SDF collisions with a sphere, how did he do it? ...
Creeper Cloud's user avatar
0 votes
1 answer
1k views

How to calculate SDF intersection for union and primitive?

First I union A1 and A2 (with min). A2 distance is closest. Then I do intersect (max) between the union A (min of a1 and a2) and B rectangle. Distance to A2 is result. But that doesn't help me to to ...
Janis Taranda's user avatar
0 votes
1 answer
143 views

How to send SDF equation to GPU shader?

I am working on a sandbox app that model stuff using SDF and its operators. I want to do the actual rendering on GPU. So once the SDF is defined (ex. box union with sphere, etc.) how do I push it to ...
trshmanx's user avatar
  • 171
0 votes
0 answers
44 views

How can I achieve this "stroked lines" effect?

I have a collection of arbitrary vertices and edges that are connected, but which do not necessarily form triangles. These vertices and edges mostly fall along a flat plane, but have some height ...
mklingen's user avatar
  • 591
0 votes
1 answer
305 views

How to construct a octree density from SDF for MC

It very clear how it works with a regular grid. 3 inner loops - x, y, z over some size. The smaller the cells, so will be the mesh more detailed. But how about octree. I know i can stich different ...
trshmanx's user avatar
  • 171
1 vote
0 answers
2k views

How can I generate mesh distance fields at runtime on a procedural mesh in unreal engine 4.26?

I am building a simulation game that and I that allows the player to create procedural buildings rather than placing static scenery items. If possible, I would like to write a shader that can take the ...
JronFrt's user avatar
  • 11
0 votes
0 answers
117 views

How are objects represented in raymarching shaders

How does one represent geometry in raymarching shader? Say I wanted to pass a tree of SDF primitive shaders. My current idea is to pass texture containing their positions as rgb and type as alpha ...
Jakub Rogacz's user avatar
0 votes
1 answer
86 views

Understanding arguments to a signed distance field function

I'm looking into drawing a box using Inigo Quilez's code: ...
Janis Taranda's user avatar
1 vote
2 answers
800 views

Raymarching signed distance function resulting in holes on surface - step size required?

I've been learning about raymarching and signed distance functions, and I implemented a raymarching fragment shader in Unity. It works fine for geometric shapes such as cubes and spheres, but when I ...
JasonCG's user avatar
  • 157
0 votes
1 answer
50 views

Indexing a point outside of a 3D signed distance field

I have a 3D signed distance field that is voxelized into a grid, surrounding an object. However, I would like to query the signed distance field to determine the shortest possible distance between ...
user117834's user avatar
3 votes
1 answer
5k views

Freetype: create Signed Distance Field based font

I am trying to implement Font Rendering in my OpenGL C++ game. I read many articles on the subject and got to know different methods, but I am still learning. Valve has published a paper for Signed ...
linux_lover's user avatar
2 votes
1 answer
142 views

SDF - indexing the folding space

I had been repetitively watching this part of the video just trying to understand his point: you can optionally use the return value as cell index ... as random seed to introduce some variation .....
sooon's user avatar
  • 155
3 votes
0 answers
832 views

Generate screen space distance field from depth buffer

I've been wanting to try out raymarching on real 3D scenes to implement effects like AO, soft-shadows and such. I pretty much know how to use signed distance functions (as described by Inigo Quilez) ...
CpCd0y's user avatar
  • 301
0 votes
0 answers
330 views

GLSL - Signed Distance Field vs normal Loop

I am fairly new in GLSL and only recently discover Signed Distance Field. I am trying to figure out how SDF can perform so well ...
sooon's user avatar
  • 155
5 votes
0 answers
258 views

Virtual infinite plane in shadow map

I have a WebGL deferred rendering pipeline, where I'm rendering shadow map with VSM technique. The goal is that the scene, or model, is hovering in space, and in addition to casting shadow on itself, ...
skrat's user avatar
  • 173
1 vote
1 answer
1k views

Text rendering techniques for games

I'm researching text rendering techniques for 3D applications, and I'm having a hard time finding information on the topic. Do you know of any other methods of text rendering that are actually used in ...
Detheroc's user avatar
  • 186
4 votes
2 answers
3k views

Signed Distance Fields: How are different colour channels used to improve output of sharp corners?

The naive approach to implementing signed distance field font rendering suffers quality issues where sharp corners get softened (either outward- or inward-facing corners, i.e. convex or concave ...
Engineer's user avatar
  • 29.4k
2 votes
0 answers
1k views

2D Distance Field as collision handler method

Pixeljunk Shooter has really cool fluid simulation. I found the dev's video explaining what they did. Here I understand that it is particle based simulation Smoothed Particle Hydrodynamic I can ...
Tofu_Craving_Redish_BlueDragon's user avatar
3 votes
2 answers
4k views

How to smooth mask texture edges correctly regardless it's size

I have a texture intended as a mask. The texture type is GL_R32F (32 bit float) and the data inside is a signed distance field (= value of each texel is distance to ...
wondra's user avatar
  • 4,910
1 vote
1 answer
694 views

Collision detection using distance field for a dynamic object

I am using a signed distance field for collision detection. The object I calculated the distance field for rotates between 0 and -30 degrees. The other object I want to check collision against is in a ...
Muhammad Omer's user avatar
2 votes
1 answer
1k views

How to calculate the viewing cone radius at a distance in raymarching?

I'm "raymarching distance fields" (proper lingo: sphere-tracing) in GLSL. To implement cone-marching atop of it (and also to minimize the number of raymarching steps regardless of whether cone-...
voxelizr's user avatar
  • 203
21 votes
1 answer
13k views

How can I generate signed distance fields (2D) in real time, fast?

In a previous question, it was suggested that signed distance fields can be precomputed, loaded at runtime and then used from there. For reasons I will explain at the end of this question (for people ...
TravisG's user avatar
  • 4,392