Skip to content

nschaievitch/sdf-editor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sdf-editor

A visual node-based editor for ray-marched Signed Distance Field scenes

About

This project is meant for pedagogical purposes and to play around with Signed Distance Fields. Any modern browser should be good to run it, but beware that touchscreen interaction is not great.

More information about the project can be seen in the slides. A live version is available in sdf.shaie.ar.

Some sample scenes are provided in the Sample Scenes folder. Import them from the frontend to see! (Click on the file selector on the lower-left corner, and then update on the lower-right).

Running the project

Make sure code-gen.wasm is present in the public/ directory of the frontend (this is provided in this repo). Otherwise, use go to build from the code gen module.

To run the frontend:

  • yarn install the dependencies in the frontend/ folder
  • yarn dev to run the development server

Alternatively, build the frontend with yarn install and yarn build, and open frontend/dist/ on a static server allowing CORS (otherwise the cubemaps won't be able to be loaded from the iframe). A simple way to do this is using the VS Code live server. NOTE: Open VS Code on the dist/ folder for serving! otherwise the browser will block the requests.

Acknowledgements

This was made as my final project for COSC077 - Computer Graphics at Dartmouth College. I want to thank Professor Yu-Wing Tai for this course and assistance.

The frontend makes extensive use of the DrawFlow library, and uses the GLSL template from the Shader Toy VSCode extension to bootstrap GLSL in a brower.

About

A visual node-based editor for ray-marched Signed Distance Field scenes

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors