POV-Ray : Newsgroups : povray.programming : Using POV to render voxels : Re: Using POV to render voxels Server Time
5 Jul 2024 14:56:35 EDT (-0400)
  Re: Using POV to render voxels  
From: Christopher James Huff
Date: 23 May 2003 20:06:31
Message: <cjameshuff-97617C.19073323052003@netplex.aussie.org>
In article <web.3ecab077a576dc40da05be620@news.povray.org>,
 "Peskanov" <nomail@nomail> wrote:

> I have programmed a 3D voxel renderer (like in medical tomography) and now I
> am looking for good quality scenes to test.
> A friend, Jaime Vives, has some really nice scenes in POV, and I was
> wondering if I could use POV to render these in the voxel instead of in a
> flat 2d image.
> I have seen a thread about voxel & pov, but it does not contain what I am
> looking for.

You want to render a POV scene to a voxel field? This can not be done 
directly, but there are several ways you could approach it. You could 
put the objects to be rendered in the voxel field into a union and 
intersect them with a pair of planes to get a "slice" of the scene, you 
could then render several frames with the planes progressing along the 
object, and combine the frames into a final voxel field for display.

This all requires a lot of manual modifications to the scene, though, 
and it sounds like you want some kind of patch that gives voxel output. 
This is an interesting idea, and I can think of a couple possible 
methods. I'm not clear on how much lighting calculations you want to do 
immediately or how realistic your voxel rendering is to be.

One possibility is to march through the lattice of voxels covering the 
scene, and for each voxel compute the average of the pigments for each 
object that contains that point. This will lose any infinitely thin 
objects, for those you would need to use raytracing. By collecting the 
pigment information and saving light source information to a file for 
your voxel renderer, you could get a shaded color view of the scene. You 
could save more texture information to get a more realistic rendering, 
but at the cost of a lot of storage.
Another possibility is to do some sort of palleted voxel field, where 
you store a texture ID for the voxels and the texture information 
separately. This might be much more memory efficient, but slower and 
more complex to render.

BTW, what format are you using? I've been working on an extended density 
file format for my own experimentation, maybe you would find it 
interesting.


> BTW, I am using Mac OS X. I hope there are no serious problems with the
> sources...

If you are using the GUI version, you may want to look into MacMegaPOV, 
which has a GUI that works better under OS X than the official version. 
The command line version can be compiled for OS X, but it involves some 
makefile hacking. It would probably be easiest to install it through 
Fink. All this only applies if you are not making your own patch...if 
you are patching, the path of least resistance would be to compile the 
command line version using the free development tools.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

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