FAQ
Cover
This is the archive Discourse for the Processing (ALPHA) software.
Please visit the new Processing forum for current information.

   Processing 1.0 _ALPHA_
   Topics & Contributions
   Responsive Form, Games
(Moderator: REAS)
   voxels - raymarching demo
« Previous topic | Next topic »

Pages: 1 
   Author  Topic: voxels - raymarching demo  (Read 1663 times)
toxi

WWW
voxels - raymarching demo
« on: Sep 12th, 2003, 7:21pm »

below is in addition to my post about my volumetric renderer in this thread.
i just found it more suitable to start a new one instead of hijacking one...
 
oki, so i've spent the afternoon cleaning up the code and you can download the sketch folder from here:
 
http://www.toxi.co.uk/p5/voxels/volumeRenderInt.zip
 
be warned, it's a 4.3MB file! this is due the size of the data set, which is uncompressed 16MB and is an MRI scan of a human foot...
 
the code is heavily commented, but in short the controls are:
 
click and drag mouse to rotate the view
keys - and + are used to zoom in/out
keys 1-9 to change the contrast
 
the rendering is done progressively, so just wait a moment before the image is rendered in full res. depending on your machine speed, this might take >10 seconds
 
please feel free to add lighting etc. i'd love to see what people do with it!
 
some screengrabbed videos are here:
http://www.toxi.co.uk/p5/voxels/foot.avi
 
http://www.toxi.co.uk/p5/voxels/noise.avi
 

http://toxi.co.uk/
Glen Murphy

WWW Email
Re: voxels - raymarching demo
« Reply #1 on: Sep 13th, 2003, 4:27am »

Neat!
 
The lighting/shading in mine was just a simple loop over the voxel array starting from the top. Each voxel got its lightness based on the opacity and lightness of the voxel at x-1, y-1. In order to cheaply simulate light diffusing through the scene I just added a tiny amount of light at each step, so that in very transparent voxels, the ray of shade would get brighter again.
« Last Edit: Sep 13th, 2003, 4:29am by Glen Murphy »  
Pages: 1 

« Previous topic | Next topic »