GithubHelp home page GithubHelp logo

hassony2 / pyrender_sdf Goto Github PK

View Code? Open in Web Editor NEW
12.0 1.0 1.0 22 KB

Minimal rendering in python for shapes defined implicitely through signed distance functions

Python 100.00%
rendering signed-distance-field python ray-marching

pyrender_sdf's Introduction

Minimal Signed Distance Function Object pure python renderer

This repo was mostly done as an exercise to understand Signed-Distance-Function-based rendering.

It provides basic utilities to render silhouettes and normals of objects represented by their Signed Distance Function.

demo.py shows an example on a sphere.

No parallelization is operated, and (this is no surprise! :) ) the computation is slow! (~5seconds for the minimal sphere-rendering example)

Very simple ray-marching is used (for more details see ray-marching-signed-distance-functions)

Renderings

(Obtained by running demo.py)

Sphere silhouette rendering

silhouette sphere

Sphere normals rendering

silhouette sphere

(Normal coordinates are x,y,z are scaled to be in [0, 1], and respectively mapped to the R, G and B channels.

pyrender_sdf's People

Contributors

hassony2 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

nmme

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.