POV-Ray : Newsgroups : povray.newusers : Rendering voxel-style functions in Povray : Re: Rendering voxel-style functions in Povray Server Time
5 Oct 2024 18:27:43 EDT (-0400)
  Re: Rendering voxel-style functions in Povray  
From: Christian Froeschlin
Date: 13 Sep 2009 15:46:57
Message: <4aad4c31@news.povray.org>
twinbee wrote:

> Thanks. Until then, is there another 3D renderer I can try out which allows
> local vars and while loops inside functions like this?

Why do you need this? As far as I understand, you do not
actually have voxels as input data, but use functions. You
did not yet explain where the color values come from. If
you have a functional description for that, you can build
a function without a while loop and local variables. The
"select" statement will probably come in handy.

If you actually have independent color data for each voxel,
there are several alternatives:

Worst case, you can just create a bunch of boxes,
should still be possible with a suset of 100x100x100.

You could group the voxels according to color, i.e.,
write multiple df3 files (e.g. one for all red voxels,
one for all blue voxels, ...), assuming there are
not too many color shades.

It would be possible to build arbitrary blocky pigments
using while loops without using a function, by nesting
pigment_maps (i.e, define 10.000 gradient y pigments for
each "stack" of voxels using the voxel colors as color
map, then build slices using 100 gradient z pigments
using the stack-color_maps in a pigment_maps and
finally one gradient x pigment to bring it all
together).


Post a reply to this message

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