Coder Social home page Coder Social logo

raystep's Introduction

RayStep

RayStep is a real-time 3D distance field modeling software. Its most immediate difference from traditional 3D modeling softwares is that it is not triangle-based. Even for the viewport rendering. It does not rely on the process of rasterization (the projection of geometry onto the camera's near frustum), and instead performs real time ray marching.

Demosceners and shader coders, as can be found in the shadertoy community for instance, know well this technique, as the primary way of rendering 3D using only a fragment shader. The winners of last summers' shadertoy contest's last round even wrote a nice illustration of the process (written itself using raymarching, so meta!) and a walkthrough tutorial about how to make a ray marcher.

Because of its nature being so fundamentally different from rasterized 3D graphics, ray marched models enable a lot of powerful effects. Things which are hard to do with triangles became basic, like boolean operations, and on the contrary some things which were easy with triangles may have become trickier or computationally more expensive.

You can check out the wonderful examples made by iq, and also many nice examples of landscapes that can be found here and there on shadertoy, featuring clouds and reflections and so on.

Since I wanted to play with all the nice possibilities that this enables, and also have non coders around me give it a shot, applying distortion with the mouse, structuring projects using distance field modeling, I started working on this GUI for ray marching rendering and associated modeling.

At this point, it is heavily based on Iñigo Quilez' demo Raymarching - Primitives, whose code has been released under the MIT license. It is more generally based on iq's work on distance functions and ray marching.

Current interface of RayStep

Build

Windows 64bit with Visual Studio 15 (2017)

Run build-msvc15.bat, then open build-msvc15/RayStep.sln.

Other

mkdir build
cd build
cmake .. # or e.g. cmake .. -G "MinGW" to use mingw
make # or open generated solution (Visual Studio, XCode, etc.)

Usage

It is still WIP. You can already play around and drag and drop items on the outliner panel, which describes the scene. You can select nodes in this tree and change their associated code (leaf nodes) or their associated operation (internal nodes, like Union and Difference). The source code of nodes relies on the predefined pos variable, the position at which the distance field is evaluated. It can also use variables from the Uniforms panel, whose value can be updated live. Whenever you edit the tree, you must press the Update button. Including the first time.

There is no load/save functionality. The current scene is hard-coded at the beginning of src/RayStep/SceneTreeModel.cpp. This is of course on of my major concerns, and why I do not consider this code as anything close to a release for now. I mainly share the code to show my interest.

raystep's People

Contributors

eliemichel avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

raystep's Issues

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.