Code Monkey home page Code Monkey logo

scatter's Introduction

A ray tracer written in Rust.

Compile and run using cargo the Rust package manager and build tool.

scatter's People

Contributors

acolley avatar

Stargazers

tyoc213 avatar

Watchers

tyoc213 avatar James Cloos avatar  avatar

scatter's Issues

Asset Store

Create an asset store/cache for loading generic assets (e.g. images, meshes) and keeping a single copy in memory.

This will have to support storing the assets under an Arc as they will be accessed concurrently.

Area Lights

Add support for Area Lights, which should be represented by a mesh and emit light from its surface. Might be worth extending the Light trait to support the sample_f function from pbrt in order to sample a direction from the light.

Scene Serialize and Deserialize

Implement the necessary traits to automatically Serialize and Deserialize a Scene using serde. This also allows us to use all of the serde backends as serialization targets in the future.

Add Lua scripting

Add support for Lua scripting for defining the Scene and the options of the ray tracer using https://crates.io/crates/hlua.

This will involve exposing various structures and associated methods for use across the Lua->Rust interface.

Features required:

  • Allow Scene to be constructed and populated with SceneNodes.
  • Allow Renderer to be constructed and be customised.
  • Allow creation of arbitrary SceneNodes and their properties
    • Primitive type (Sphere, Box, Triangle Mesh etc.)
    • Material
    • Transform (Position and Rotation in world space)
  • Run the ray tracer with given Renderer and Scene
  • Output result of tracing to various formats (image or otherwise)

Better sampling

Implement better sampling methods that can be used to sample the camera rays and sampling for light transport algorithms.

Transmittance

Implement transmittance which is a model of how much light along the length of a ray is scattered/absorbed by the medium in which it's travelling.

This can be very simple with a constant absorption defined for the world, or complex with geometric volumes defined for simulating smoke/fog etc.

Add triangle mesh support

Add support for triangle meshes to be intersected against, normal calculations and support uv mapping for texturing.

Rendering time estimate feedback

This could be a progress bar made using ncurses in the terminal.

Later it could be a visualisation of the image as it is being rendered.

Materials

Add a Material struct that allows interesting surface shaders to be described using a simple interface.

LOD Support

Support LOD reduction for longer viewing distances where high polygon counts are wasted.

This can either be done procedurally or with a number of lower detail meshes for high polygon meshes.

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.