POV-Ray : Newsgroups : povray.programming : Using POV to render voxels : Re: Using POV to render voxels Server Time
5 Jul 2024 14:12:30 EDT (-0400)
  Re: Using POV to render voxels  
From: Peskanov
Date: 26 May 2003 06:45:01
Message: <web.3ed1eef81187fffdda05be620@news.povray.org>
Christopher James Huff wrote:

>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.

I have  already considered this but I think I will be unable to get a good
lighting that way.

>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.

I would like to voxelize the scene with a global lighting applied. I do not
intend to do any lighting in real time (maybe later I will think about some
reflection/refraction).

>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.

This method would probably too slow for the size of voxel I want, but thanks
for the idea.
My idea is the one Ben described, I just want some code hints from those who
know the sources.
Could you ( or anybody) point me (in general terms) what are the steps to
find all the crossings of a ray with the scene in a known range? I am
currenlty looking at the trace function un render.cpp.

>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.

About the format, I just want to store a final color for the voxel.  I will
crunch the result in a variation of the octree I have thinked. I will try
to crunch the voxel by identifying similar sections, although this is going
to be quite slow...What have you thinked? I know several voxel formats
myself; some are much faster for rendering, but waste too much memory...

>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.

I have it installed through Fink, but I am going to test "MacMegaPOV"; for
some reason I prefer GUIs to commandlines...


Post a reply to this message

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