POV-Ray : Newsgroups : povray.newusers : Volume rendering with POV-Ray : Volume rendering with POV-Ray Server Time
30 Jun 2024 04:27:11 EDT (-0400)
  Volume rendering with POV-Ray  
From: Bene
Date: 3 Nov 2011 10:45:01
Message: <web.4eb2a86547b2adf8db4fdb9b0@news.povray.org>
Hi,

for the past few years, I developed a 3D visualization tool for ImageJ/Fiji
(http://3dviewer.neurofly.de). A few days ago I came across POV-Ray, did some
experimenting with it and liked it. I would now like to write an export function
for my 3D Viewer to the POV-Ray format, allowing for beautiful, high-quality
renderings.

Everything worked fine so far except for volume renderings. I googled a lot and
found some information, made some progress, but am still not satisfied. After
playing with various media and density parameters without much success, I'd now
like to ask the experts for advice.

Basically this is the image I see in my 3D Viewer (the volume rendering is based
on 2D texture mapping, with a linear transfer function from black being fully
transparent to white being fully opaque).

http://132.187.25.13/home/bene/3dviewer.png

Trying my best with POV-Ray let me produce this result:

http://132.187.25.13/home/bene/povray.png

My question is: How could I improve my POV-Ray rendering, to look more similar
to the 3DViewer rendering?

My own assumption is that there's something wrong with the transfer function. In
the 3D Viewer, both dark and bright colors are produced, while in the POV-Ray
rendering, I only obtain bright colors.

Any hints are greatly appreciated.

Best,
Bene

PS:
here's the relevant code snippet:

box {
        0.0, 1.0
        texture {
                pigment {
                        rgbt 1.0
                }
        }
        interior {
                media {
                        emission 10
                        absorption 0
                        scattering { 1 0 }
                        intervals 100
                        samples 2, 2
                        method 2
                        confidence 0.999
                        variance 1/1000

                        density {
                                density_file df3 "substack.df3" interpolate 1
                                color_map
                                {
                                        [ 0.0   rgb <0, 0, 0> ]
                                        [ 1.0   rgb <1, 1, 1> ]
                                }
                        }
                }
        }
        hollow
        no_shadow
        translate <-0.5,-0.5, -0.5>
        rotate <0, -45, 0>
}


Post a reply to this message

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