Recently I've been looking at Povray, pyprocessing, and cfdg (version 3.0) as tools for creating digital images. I have branched two separate blogs where I mainly explore ruby/rp5. and processing.py

Sunday, 3 March 2013

Povray ray tracing from processing-2.0b8

I have just made my latest povwriter library available as a zip download at java.net, I returned from github owing to the lack of download support at github. I will consider re-forking the library at github should anyone wish like to get involved in its' development. This library now replaces the original library (processing-1.5.1), however the original is also available as a zip download. The new library has a template installer feature so it should eventually be available for automatic download/update from the processing ide.
To install just put the zip archive in your sketchbook/libraries folder and unzip it there.  Next navigate to the povwriter libraries example (from the processing ide) and select either the README or installer examples. Use the installer example to 1st install the templates, and 2nd to set the path to the povray executable, then you should be good to go. Make sure that you run the other included examples to see how the library works (it is a good idea to explore using different templates, eventually you should bea able to write your own.
Since processing-2.0 it is also possible to run processing sketches from jEdit, now that might also be super convenient, because jEdit has povray support built in. So now you can post edit the processing generated povray files and using my jEdit commando files run povray from jEdit (both ini and pov commando files are available). See below for image of data folder for the ftest example:-
The simplest to adjust the quality setting is to directly edit the ftest.ini file:-
   1 ; ftest.ini
   2 
   3 Input_File_Name=/home/tux/sketchbook/libraries/povwriter/examples/ftest/data/ftest.pov
   4 Output_File_Name=/home/tux/sketchbook/libraries/povwriter/examples/ftest/data/ftest.png
   5 Width=500
   6 Height=500
   7 Declare=ASPECT_RATIO=1.0000
   8 Declare=ZDEPTH=144.3375
   9 Quality=9
  10 Antialias=on
  11 ; Sampling_Method=2
  12 ; Antialias_Threshold=0.3
  13 Max_Image_Buffer_Memory=516
  14 Output_File_Type=N8
  15 Declare=ScaleP5=1.5000

the highest available quality is 11 and the lowest sensible is 3, but your experience may vary. You can also adjust the placement, size and rotation of the processing geometry in the sketch using the Declare feature (ScaleP5 is shown here). This depends on code in the povray template, and / or introduced by the library. In this case ScaleP5 was set in the setup of the processing sketch when the ini file was declared.

No comments:

Post a Comment

Followers

Blog Archive

About Me

My Photo
Pembrokeshire, United Kingdom
Consolidating my online identity as monkstone. I am a 64 bit linux user and advocate of open source software, you can sometimes find me on the processing forum.