Giter VIP home page Giter VIP logo

raytracer's Introduction

Ray Tracer

This project includes 2 parts: Ray Tracer and Ray Caster. All demos use GLFW + GLAD as the front-end display.

Usage

Build

  • Clone this repository to the local.
  • Make 3rd/glfw a complete and valid repo from GLFW
  • Run CMake configuration.
    • To show the performance, use a Release config.

Input Arguments

DirectVolumeRenderDepthBoxVDB

This demo resamples the RAW volume into Depth-Box VDB or GVDB and performs Direct Volume Rendering on the volume.

Command Line Args

  • Example: Head (from GVDB)
[
  "-vt", "uint8",
  "-vol", "<Path to the volumetric data (RAW)>",
  "-dx", "128",
  "-dy", "256",
  "-dz", "256",
  "-tf", "<Path to the transfer function>",
  "-tx", "1",
  "-ty", "-3",
  "-tz", "-2",
  "-sx", "2.0",
  "-sy", "1.0",
  "-sz", "1.0"
]
[
    "-vt", "uint8",
    "-vol", "<Path to the volumetric data (RAW)>",
    "-dx", "1024",
    "-dy", "1024",
    "-dz", "795",
    "-tf", "<Path to the transfer function>"
]

Format of Transfer Function File

scalar r g b a
range [0, std::numeric_limits::max()] [0, 255] [0, 255] [0, 255] [0, 255]
  • Example: Head
0.000000 0.000000 0.000000 0.000000 0.000000
49.840766 0.000000 0.000000 0.000000 0.000000
60.016020 5.041094 3.602943 52.500004 0.579299
127.955641 255.000000 255.000000 255.000000 5.000000
183.914396 8.000000 255.000000 0.000000 8.000000
255.000000 255.000000 0.000000 0.000000 10.000000
  • Example: Kingsnake
0.000000 0.000000 0.000000 0.000000 0.000000
95.370346 0.000000 0.000000 0.000000 0.000000
125.946533 255.000000 255.000000 255.000000 20.000001
159.491972 255.000000 157.499998 0.000000 20.000001
232.292712 30.000000 0.000000 255.000000 100.000002
255.000000 255.000000 0.000000 0.000000 255.000000

raytracer's People

Contributors

kouek avatar

Watchers

 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.