GPU 3D signed distance field generator, written with DirectX 11 compute shader

Overview

GPU SDF Generator

GPU 3D signed distance field generator, written with DirectX 11 compute shader

Building

git clone --recursive https://github.com/AirGuanZ/SDFGenerator.git
cd SDFGenerator
mkdir build
cd build
cmake ..

Options

OPTION(D3D11SDF_BUILD_SAMPLE "build SDF sample"   ON)
OPTION(D3D11SDF_BUILD_CLI    "build SDF cli tool" ON)

Usage

./SDF-CLI.exe -i "./mesh.obj" -o "./output.txt" -r 128,128,128 -q 16 -s -50,-50,-50 -l 50,50,50 -g true
  • -i Input mesh filename (.obj, .stl, .ply)
  • -o Output text filename
  • -s Min point in SDF bounding box. format: x,y,z, or a single floating point value specifying all of them
  • -l Max point in SDF bounding box. format: x,y,z, or a single floating point value specifying all of them
  • -g (Optional) Use gpu or not. default value is true
  • -r (Optional) SDF resolution. format: width,height,depth, or a single integer specifying all of them. default value is 64
  • -q (Optional) Quality. number of rays for determining value sign. default value is 12

Output format

SDF-CLI writes generated values into a text file, using the following pseudocode:

file.write(width)  file.write(" ")
file.write(height) file.write(" ")
file.write(depth)  file.write(" ")
for z in [0, depth):
	for y in [0, height):
		for x in [0, width):
			file.write(SDF[x][y][z])
			file.write(" ")

SDF-Sample

A demo program using ray marching to visualize generated SDF.

You might also like...
Implementation of bounded Levenshtein distance (Ukkonen)

ukkonen Implementation of bounded Levenshtein distance (Ukkonen) port this is a port of ukkonen from javascript to c++ / python via cffi. installation

Distance matching plugin

Distance Matching This plug-in is custom implementation of the Distance Matching technique which was shown by Laurent Delayen at Nucl.ai 2016. In two

Project in the field of Advanced Programming Techniques by prof. Brian Kernighan, inspired by real event that made Ken Thompson invent grep command

ed_to_grep Project in the field of Advanced Programming Techniques by prof. Brian Kernighan, inspired by real event that made Ken Thompson invent grep

ESP32 + GitHub Actions + Husarnet. A boilerplate project for ESP32 allowing in-field firmware update using GitHub Actions workflow.

esp32-internet-ota ESP32 + GitHub Actions + Husarnet. A boilerplate project for ESP32 allowing in-field firmware update using GitHub Actions workflow.

Finite Field Operations on GPGPU

ff-gpu Finite Field Operations on GPGPU Background In recent times, I've been interested in Finite Field operations, so I decided to implement few fie

ESP Insights is a remote diagnostics solution that allows users to remotely monitor the health of ESP devices in the field.
ESP Insights is a remote diagnostics solution that allows users to remotely monitor the health of ESP devices in the field.

ESP Insights is a remote diagnostics solution that allows users to remotely monitor the health of ESP devices in the field.

Gramado Field - It is a 64bit operating system.

Welcome to Gramado OS - Codename 'Field' This repository has the source code for: Gramado boot loader Gramado kernel Gramado Window Server Application

The whole design is modular, parametric (cost and others), field repairable, and super extensible
The whole design is modular, parametric (cost and others), field repairable, and super extensible

Easy-Transceiver The whole design is modular, parametric (cost and others), field repairable, and super extensible. It is almost trivial to add suppor

A field war simulator in console with C language, inspiring from BattleField 1.

CBattleField 一个基于C语言的在控制台上的战争模拟器。其灵感来源于游戏《战地1》 A field war simulator in console with C language, inspiring from BattleField 1. 你可以在这里查看演示。 You could w

Owner
Z Guan
Student
Z Guan
Signed - a 3D modeling and construction language based on Lua and SDFs. Signed will be available for macOS and iOS and is heavily optimized for Metal.

Signed - A 3D modeling language Abstract Signed is a Lua based 3D modeling language, it provides a unique way to create high quality 3D content for yo

Markus Moenig 90 Nov 21, 2022
R integration for edlib, a C/C++ library for pairwise sequence alignment using edit distance (Levenshtein distance).

edlibR Introduction Main Features Usage Background Alignment Methods Algorithmic Design Installation References edlibR: R integration for edlib The R

null 5 Mar 2, 2022
DirectX 11 library that provides convenient access to compute-based triangle filtering (CTF)

AMD GeometryFX The GeometryFX library provides convenient access to compute-based triangle filtering (CTF), which improves triangle throughput by filt

GPUOpen Effects 218 Dec 15, 2022
EDRSandBlast is a tool written in C that weaponize a vulnerable signed driver to bypass EDR detections and LSASS protections

EDRSandBlast is a tool written in C that weaponize a vulnerable signed driver to bypass EDR detections (Kernel callbacks and ETW TI provider) and LSASS protections. Multiple userland unhooking techniques are also implemented to evade userland monitoring.

Wavestone - Cybersecurity & Digital Trust 846 Jan 2, 2023
A cross platform shader language with multi-threaded offline compilation or platform shader source code generation

A cross platform shader language with multi-threaded offline compilation or platform shader source code generation. Output json reflection info and c++ header with your shaders structs, fx-like techniques and compile time branch evaluation via (uber-shader) "permutations".

Alex Dixon 286 Dec 14, 2022
Shader Playground is a website for exploring shader compilers.

Shader Playground is a website for exploring shader compilers. Visit website Supported backends Compilers ANGLE Clspv DXC FXC Glslan

Tim Jones 445 Dec 30, 2022
Shader cross compiler to translate HLSL (Shader Model 4 and 5) to GLSL

XShaderCompiler ("Cross Shader Compiler") Features Cross compiles HLSL shader code (Shader Model 4 and 5) into GLSL Simple to integrate into other pro

Lukas Hermanns 345 Dec 9, 2022
SinMapper - usermode driver mapper that forcefully loads any signed kernel driver

usermode driver mapper that forcefully loads any signed kernel driver (legit cert) with a big enough section (example: .data, .rdata) to map your driver over. the main focus of this project is to prevent modern anti-cheats (BattlEye, EAC) from finding your driver and having the power to hook anything due to being inside of legit memory (signed legit driver).

null 170 Dec 29, 2022
multispectral monitoring of a sourdough starter; esp32 eink module, scd30 co2 sensor, vl6180 distance sensor

EINK STARTER MONITOR See full blogpost here Tracks height of starter with a VL6180 i2c distance sensor, and CO2/temperature/humidity with an SCD30. A

AKA 15 Feb 16, 2022
Example program demonstrating the Meijster's distance transform algorithm.

Distance Transform The distance transform operation consist in finding the shortest distance of a black pixel to a white one. This project demonstrate

Code In Colors 1 Nov 15, 2021