<commit_before>
# volsample

Research on sampling methods for real-time volume rendering.

![Teaser](https://raw.githubusercontent.com/huwb/volsample/master/img/teaser.jpg)

Shadertoy volume rendering demo: [Mt3GWs](https://www.shadertoy.com/view/Mt3GWs)  
Shadertoy sampling diagram: [ll3GWs](https://www.shadertoy.com/view/ll3GWs)

Contacts: <NAME> (huw dot bowles at gmail dot com), <NAME> (daniel dot zimmermann at studiogobo dot com), <NAME> (beibei dot wang at gmail dot com)


## Intro

Volume rendering in real-time applications is expensive, and sample counts are typically low. When the camera is inside the volume, the volume samples typically move around with the camera which can cause severe aliasing. This repository provides a new, fast, efficient and simple algorithm for eliminating aliasing for this camera-in-volume case.

This repos started as the source code for the course titled *A Novel Sampling Algorithm for Fast and Stable Real-Time Volume Rendering*, in the *Advances in Real-Time Rendering in Games* course at SIGGRAPH 2015 [1]. The full presentation PPT is available for download from the course page [here][ADVANCES2015]. While this is useful reading, the latest implementation takes a new approach which completely replaces most of the approaches introduced in the talk.

The latest approach, Structured Sampling, works by placing samples on grid lines, constraining their motion to one dimension which is densely sampled by the set of pixel rays and robust against aliasing. Right now We are in the process of working out the details, extending the method to 3D, and writing up an article. 

Shadertoy volume rendering demo: [Mt3GWs](https://www.shadertoy.com/view/Mt3GWs)  
Shadertoy sampling diagram: [ll3GWs](https://www.shadertoy.com/view/ll3GWs)


## Running

This is implemented as a Unity 5 project (last run on 5.3.5) and should "just work" without requiring any set up steps.

The main scene is *CloudsStructured.unity*. The cloud render should already work in the editor. Press play and the Animator component on the camera will play our test animation if it is enabled.

There is also a ShaderToy running here: https://www.shadertoy.com/view/Mt3GWs


## Algorithm

Article coming soon.

In the meantime there is a diagram shader here: https://www.shadertoy.com/view/ll3GWs


## Troubleshooting<commit_msg>Additional readme tweaks and polish<commit_after>
# volsample

Research on sampling methods for real-time volume rendering.

![Teaser](https://raw.githubusercontent.com/huwb/volsample/master/img/teaser.jpg)

Shadertoy volume rendering demo: [Mt3GWs](https://www.shadertoy.com/view/Mt3GWs)  
Shadertoy sampling diagram: [ll3GWs](https://www.shadertoy.com/view/ll3GWs)

Contacts: <NAME> (@hdb1, huw dot bowles at gmail dot com), <NAME> (daniel dot zimmermann at studiogobo dot com), <NAME> (beibei dot wang at gmail dot com)


## Intro

Volume rendering in real-time applications is expensive, and sample counts are typically low. When the camera is inside the volume, the volume samples typically move around with the camera which can cause severe aliasing. This repository provides a new, fast, efficient and simple algorithm for eliminating aliasing for this camera-in-volume case.

This repos started as the source code for the course titled *A Novel Sampling Algorithm for Fast and Stable Real-Time Volume Rendering*, in the *Advances in Real-Time Rendering in Games* course at SIGGRAPH 2015 [1]. The full presentation PPT is available for download from the course page [here][ADVANCES2015]. While this is useful reading, the latest implementation takes a new approach which completely replaces most of the approaches introduced in the talk.

The latest approach, Structured Sampling, works by placing samples on a set of world-space planes, constraining their motion and eliminating noticeable aliasing. Right now we are in the process of working out the details, extending the method to 3D (as opposed to flatland 2D), and writing up an article. 

Shadertoy volume rendering demo: [Mt3GWs](https://www.shadertoy.com/view/Mt3GWs)  
Shadertoy sampling diagram: [ll3GWs](https://www.shadertoy.com/view/ll3GWs)


## Running

This is implemented as a Unity 5 project (last run on 5.3.5) and should "just work" without requiring any set up steps.

The main scene is *CloudsStructured.unity*. The cloud render should already work in the editor. Press play and the Animator component on the camera will play our test animation if it is enabled.

There is also a ShaderToy running here: https://www.shadertoy.com/view/Mt3GWs


## Algorithm

Article coming soon.

In the meantime there is a diagram shader here: https://www.shadertoy.com/view/ll3GWs

Uncomment the DIAGRAM_OVERLAY define in *CloudsStructured.shader* to see the diagram overlaid onto the render.


## Troubleshooting
{'fraction_non_alphanumeric': 0.06691526828257717, 'fraction_numerical': 0.010358400662937643, 'mean_word_length': 4.782035928143713, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 14, 'lorem ipsum': 0, 'www.': 12, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2290809', 'n_tokens_mistral': 1413, 'n_tokens_neox': 1344, 'n_words': 631}