GithubHelp home page GithubHelp logo

upf-gti / volume-shader-graph Goto Github PK

View Code? Open in Web Editor NEW
1.0 3.0 0.0 57.42 MB

Web-Based Shader Graph

Home Page: https://upf-gti.github.io/Volume-Shader-Graph/

License: MIT License

CSS 4.68% HTML 2.34% JavaScript 91.42% GLSL 1.56%
volume-rendering shader-graph

volume-shader-graph's Introduction

Node-Based Shader Editor

This is the result of my final degree project, which consist on a node-based shader editor implemented on web. The framework is based mainly on the usage of this libraries:

  • Litegl.js - A JavaScript library that contains several classes for managing different items (like Buffer, Mesh, Texture, Shader) for WebGL applications. It was originally created for WebGLStudio, a 3D graphics suite for browser.
  • Litegraph.js - Complementary to LiteGL, this one is used to manage graphs in the browser. It also includes an editor to construct and tests the graphs. Like the previous one, it is also used in WebGLSudio, by the same author.

Functionalities

This is the list of the most important functionalities of the application.

  • Manipulation of the Volume Render algorithm via nodes.
  • Load and visualization of Dicom datasets. In the case you don't have any but you want to try it, I uploaded an anonymized dataset in the repository. More info here.
  • Manipulation of the datasets by editing the transfer function.
  • Download of the Vertex Shader and Fragment Shader createds by the graph editor.
  • Try an online demo here.

List of Nodes

This is the list of the nodes currently available. There are more comming soon, so stay tunned.

  • Input: Number, Color, Coordinates.
  • Texture: Gradient, Noise, Dicom, Transfer Function.
  • Operator: Math, MixRGB, ColorRamp, Translate, Scale, Rotate, Separate, Combine.
  • Shader: Volume.
  • Output: Material Output.
Node Type Inputs Outputs
Input
Number - Factor: value
Color - Color: vec3
Coordinates - Generated: vec3
Normal: vec3
UV: vec3
Object: vec3
Camera: vec3
Texture
Gradient Vector: vec3 Color: vec4
Factor: value
Noise Vector: vec3 Color: vec4
Factor: value
Dicom - Density: value
Transfer Function - Color: vec4
Operator
Math Value A, Value B Result (=)
MixRGB Factor
Color A, Color B
Color: vec4
Factor: value
ColorRamp Value Color: vec4
Factor: value
Translate Vector: vec3 Vector: vec3
Scale Vector: vec3 Vector: vec3
Rotate Vector: vec3 Vector: vec3
Separate RGBA: vec4 R: red value
G: green value
B: blue value
A: aplha value
Combine R: red value
G: green value
B: blue value
A: aplha value
RGBA: vec4
Shader
Volume Color: vec4
Density:value
Volume: algorithm that calculates the final color of the pixel
Output
Material Output Frag Color: code that computes the final color of the pixel -

Other libraries used

  • Daikon.js - A pure JavaScript DICOM reader.
  • Gl-Matrix.js - A library to perform vector and matrix operations really fast.
  • JQuery.js - It makes things like HTML document manipulation and event handling much simpler.
  • JsColor.js - Color picker widget for web.
  • Rendeer.js - A 3D scene graph library for 3D web apps and games. It has some classes for handle the scene (like Scene, SceneNode, Camera).
  • Volume-base.js - Class that describes a 3D dataset.
  • Volume-loader.js - This library has functions to parse Dicom, Nifti and VL files. It requires Volume-base file.
  • W2ui.js - A modern and intuitive JavaScript UI library for web applications.

Examples

Clouds Modeling alt text

Dicom Visualization alt text

volume-shader-graph's People

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

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.