POV-Ray : Newsgroups : povray.binaries.images : mineral blooms (more CA) : mineral blooms (more CA) Server Time
31 Jul 2024 00:25:23 EDT (-0400)
  mineral blooms (more CA)  
From: stbenge
Date: 15 Sep 2010 19:09:20
Message: <4c915220@news.povray.org>
Hi,

I'm always trying to speed up cellular automata simulations, and to that 
end have recently been investigating GLSL hardware shaders. My first 
experience with using shaders was a few month back when I came across 
Milkdrop for Winamp, which lets you write shader code for 
visualizations, among other things. It was very deficient in many 
regards, and in the name of Maximum Speed and Idiot Proofing, provided 
only very limited functionality and a lot of grief.

Just when I thought I was going to have to code everything in C, 
Processing showed up in the scope. I learned there was an OpenGL library 
for it called GLGraphics which supports GLSL operations. Combined with 
Processing's easy-going language and core graphics functions, GLGraphics 
has made certain things a lot easier, not to mention /faster/.

The attached render uses 16-bit data from a CA rule I discovered a while 
back, but am now able to render quickly (roughly 55 fps @ 1024x1024). 
Height values with 16-bit precision were used to make a height_field, 
and a regular color image was used for its pigment.

The translucent effect is an old trick involving two objects:

   * Object 1 has a pigment, diffuse reflection, zero brilliance, 
no_shadow, and is double_illuminating.

   * Object 2 is slightly offset from object 2. It is transparent, 
hollow, and has absorbing media.

Well anyway, Processing and GLGraphics can obviously be used for more 
than CA. Check it out, it's pretty cool.

http://www.processing.org/
http://codeanticode.wordpress.com/2010/08/22/glgraphics-0-9-4/

Sam


Post a reply to this message


Attachments:
Download 'catestb12_01.jpg' (126 KB)

Preview of image 'catestb12_01.jpg'
catestb12_01.jpg


 

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.