POV-Ray : Newsgroups : povray.general : is there any feature for volume raytracing with povray? Server Time
31 Jul 2024 18:14:50 EDT (-0400)
  is there any feature for volume raytracing with povray? (Message 7 to 16 of 16)  
<<< Previous 6 Messages Goto Initial 10 Messages
From: Thorsten Froehlich
Subject: Re: is there any feature for volume raytracing with povray?
Date: 10 Jan 2007 12:52:50
Message: <45a527f2$1@news.povray.org>
Warp wrote:
> lien <nomail@nomail> wrote:
>> what i want is the volume raytracing technique based feature in povray.
>> I know that we can render the implicit iso-surface by using the existing
>> keyword "isosurface" in povray, but it seems that it is based on some
>> technique like Marching Cube, which first extraction the geometry of the
>> iso-surface. But with volume raytracing technique, we can directly raytrace
>> the volume data and save the geometry extracting step.
> 
>   Isosurfaces don't use anything like marching cubes, and I don't really
> understand what is the relation between isosurfaces and volume raytracing.

Volume data from medical imaging techniques measures densities. Everything
else you see, i.e. specific organs, is the result of clever post processing
in conjunction with contrast enhancing substances the human received. Thus,
if you want to extract specific information you can use isosurfaces by
defining their threshold to the desired density.

Regarding the original post, to use the data, it has to be converted to a
POV-Ray density file. This file can then be turned into a pattern, which can
be used in an isosurface for rendering. In fact, the original isosurface
patch website (iirc that page is no longer available) had a sample image of
a human head.

	Thorsten


Post a reply to this message

From: ingo
Subject: Re: is there any feature for volume raytracing with povray?
Date: 10 Jan 2007 13:49:12
Message: <Xns98B4C99E05131seed7@news.povray.org>
in news:web.45a4a43af46d0e7d1524ae1d0@news.povray.org lien wrote:

> In fact, I want to render the implicit iso-surface embeded in 3D
> volume data set.

You can render an isosurface from a data set as Thorsten mentioned, you 
can also use this data set with media. An old image that uses both 
techniques:

Newsgroups: povray.binaries.images
Subject: frog
Message-ID: <8FC995A5Cseed7@204.213.191.228>
Date: 10 Oct 2000 09:27:46 -0400
Xref: news.povray.org povray.binaries.images:41670

http://news.povray.org/povray.binaries.images/attachment/%
3C8FC995A5Cseed7%40204.213.191.228%3E/frog.jpg

Ingo


Post a reply to this message

From: lien0n
Subject: Re: is there any feature for volume raytracing with povray?
Date: 16 Jan 2007 01:40:00
Message: <web.45ac71aaaa1909d1524ae1d0@news.povray.org>
Many thanks for your interests, everyone. Sorry, am pretty busy these days.

I uploaded an image to povray.binaries.images,
http://news.povray.org/povray.binaries.images/thread/%3Cweb.45ac7028a8a7f8c81524ae1d0%40news.povray.org%3E/.

the image was rendered by using the isosurface object just like Thorsten
described.

to Vincent:
Am not sure how does povray implement the feature of "isosurface", if it
really does as what you said, that is exactly what I need. I was told that
this is also a kind of volume raytracing technique by a friend, but am not
sure. However, from the figure I uploaded, we can see patches, so I guess
that maybe povray firstly extracts the implicit surface geometry with some
tessellation technique. But this is just a guess. Another possibility is
that indeed it does with the method you said, but the normal for each
intersection is computed not so good by povray, so that the surface looks
not so smooth and appears like patches.

to Warp:
Sorry for my unclear description. According to my current limited knowledge,
the scattering, emission and absorption media are the typical feature of
volume raytracing technique, but do you think the method described by
Vincent is also a kind volume raytracing technique?

to Ingo:
Thanks for your image. I guess the white islands on the frog's skin are the
results of isosurface, am I right? :). But the image's resolution is not
large enough to determine whether there are quad patches or not.

to Thorsten:
Can you give me some comments towards the patches in my image? In fact, I
want to get a smooth surface from the volume data set. Maybe I used the
isosurface object incorrectly. the code for the isosurface object is:

#declare dens=function{pattern {density_file df3 densityfile interpolate 1}}
#declare interface=object{
  isosurface{
    function{dens(x,y,z)}
    threshold iso_value
    contained_by { box { 0.03, 0.97 } }
    open
  }
  pigment{rgbt <1., 1., 0.1, 0.5>}
  finish{
    ambient  0.3
    diffuse  0.3
    roughness 0.5
    brilliance 1
  }
  scale 1.06
  translate -0.03
}

The resolution for the volume data I used is 32x32x32, but i think finer
data can only alleviate the problem to some degree. Yet, I should try finer
data...


Post a reply to this message

From: Alain
Subject: Re: is there any feature for volume raytracing with povray?
Date: 16 Jan 2007 14:24:37
Message: <45ad2675$1@news.povray.org>
lien0n nous apporta ses lumieres en ce 16-01-2007 01:36:
> Many thanks for your interests, everyone. Sorry, am pretty busy these days.

> I uploaded an image to povray.binaries.images,
>
http://news.povray.org/povray.binaries.images/thread/%3Cweb.45ac7028a8a7f8c81524ae1d0%40news.povray.org%3E/.

> the image was rendered by using the isosurface object just like Thorsten
> described.

> to Vincent:
> Am not sure how does povray implement the feature of "isosurface", if it
> really does as what you said, that is exactly what I need. I was told that
> this is also a kind of volume raytracing technique by a friend, but am not
> sure. However, from the figure I uploaded, we can see patches, so I guess
> that maybe povray firstly extracts the implicit surface geometry with some
> tessellation technique. But this is just a guess. Another possibility is
> that indeed it does with the method you said, but the normal for each
> intersection is computed not so good by povray, so that the surface looks
> not so smooth and appears like patches.

> to Warp:
> Sorry for my unclear description. According to my current limited knowledge,
> the scattering, emission and absorption media are the typical feature of
> volume raytracing technique, but do you think the method described by
> Vincent is also a kind volume raytracing technique?

> to Ingo:
> Thanks for your image. I guess the white islands on the frog's skin are the
> results of isosurface, am I right? :). But the image's resolution is not
> large enough to determine whether there are quad patches or not.

> to Thorsten:
> Can you give me some comments towards the patches in my image? In fact, I
> want to get a smooth surface from the volume data set. Maybe I used the
> isosurface object incorrectly. the code for the isosurface object is:

> #declare dens=function{pattern {density_file df3 densityfile interpolate 1}}
> #declare interface=object{
>   isosurface{
>     function{dens(x,y,z)}
>     threshold iso_value
>     contained_by { box { 0.03, 0.97 } }
>     open
>   }
>   pigment{rgbt <1., 1., 0.1, 0.5>}
>   finish{
>     ambient  0.3
>     diffuse  0.3
>     roughness 0.5
>     brilliance 1
>   }
>   scale 1.06
>   translate -0.03
> }

> The resolution for the volume data I used is 32x32x32, but i think finer
> data can only alleviate the problem to some degree. Yet, I should try finer
> data...


In a DF3 file, each value apply to a cube, so, you obviously get a blocky aspect.
POV-Ray don't use any tessellation. It samples along a ray and evaluate the 
isosurface value at a point, if it evaluate to less than the therhold, you are 
outside the object, it it evaluate at the threshold, you are ON the surface, if 
larger, then you are inside.
DF3's are mostly used for media dencity where the blockyness is less visible.

-- 
Alain
-------------------------------------------------
The strongest reason for the people to retain the right to keep and bear
arms is, as a last resort, to protect themselves against tyranny in
government.
Thomas Jefferson


Post a reply to this message

From: lien0n
Subject: Re: is there any feature for volume raytracing with povray?
Date: 17 Jan 2007 03:55:00
Message: <web.45ade3c8aa1909d1524ae1d0@news.povray.org>
>
> In a DF3 file, each value apply to a cube, so, you obviously get a blocky aspect.
> POV-Ray don't use any tessellation. It samples along a ray and evaluate the
> isosurface value at a point, if it evaluate to less than the therhold, you are
> outside the object, it it evaluate at the threshold, you are ON the surface, if
> larger, then you are inside.
> DF3's are mostly used for media dencity where the blockyness is less visible.
>
> --
> Alain
> -------------------------------------------------
> The strongest reason for the people to retain the right to keep and bear
> arms is, as a last resort, to protect themselves against tyranny in
> government.
> Thomas Jefferson


Yes, there is indeed blocky appearance, but i think if there is no any
tessellation, what kind of primitives povray is using to represent the
intersection between a ray and the on-surface cube. And for each
intersection point, its normal should be calculated from the volume data.

Is that possible that povray is just using a rectangle to reprensent the
intersection of the on-surface cube? which is something like billboards,
since it is very efficient. If so, there would be no way to make the
resulting surface  smoother, except using finer volume data.


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: is there any feature for volume raytracing with povray?
Date: 17 Jan 2007 04:21:24
Message: <45adea94@news.povray.org>
lien0n wrote:
> to Thorsten:
> Can you give me some comments towards the patches in my image? In fact, I
> want to get a smooth surface from the volume data set. Maybe I used the
> isosurface object incorrectly. the code for the isosurface object is:
> 
> #declare dens=function{pattern {density_file df3 densityfile interpolate 1}}

I would use interpolate 2 and watch the max-gradient messages at the end of
the render, if any.

	Thorsten


Post a reply to this message

From: Tim Attwood
Subject: Re: is there any feature for volume raytracing with povray?
Date: 17 Jan 2007 05:23:24
Message: <45adf91c$1@news.povray.org>
> Yes, there is indeed blocky appearance, but i think if there is no any
> tessellation, what kind of primitives povray is using to represent the
> intersection between a ray and the on-surface cube. And for each
> intersection point, its normal should be calculated from the volume data.
>
> Is that possible that povray is just using a rectangle to reprensent the
> intersection of the on-surface cube? which is something like billboards,
> since it is very efficient. If so, there would be no way to make the
> resulting surface  smoother, except using finer volume data.

Pov doesn't tessellate anything ever. All of pov's primitives are
volumetric, or surfaces. Since a DF3 is an array, the
data is represented as cube shaped data, if more than one
ray hits in each data spot it looks blocky because it is blocky.

You might try averaging a bit - interpolate 2 or ...
function{ // untested
   ( dens(x,y,z)
     +dens(x+0.05,y,z) + dens(x-0.05,y,z)
     +dens(x,y+0.05,z) + dens(x,y-0.05,z)
     +dens(x,y,z+0.05) + dens(x,y,z-0.05)
   )/7
}


Post a reply to this message

From: Alain
Subject: Re: is there any feature for volume raytracing with povray?
Date: 17 Jan 2007 14:19:55
Message: <45ae76db$1@news.povray.org>
lien0n nous apporta ses lumieres en ce 17-01-2007 03:52:
>> In a DF3 file, each value apply to a cube, so, you obviously get a blocky aspect.
>> POV-Ray don't use any tessellation. It samples along a ray and evaluate the
>> isosurface value at a point, if it evaluate to less than the therhold, you are
>> outside the object, it it evaluate at the threshold, you are ON the surface, if
>> larger, then you are inside.
>> DF3's are mostly used for media dencity where the blockyness is less visible.

>> --
>> Alain
>> -------------------------------------------------
>> The strongest reason for the people to retain the right to keep and bear
>> arms is, as a last resort, to protect themselves against tyranny in
>> government.
>> Thomas Jefferson


> Yes, there is indeed blocky appearance, but i think if there is no any
> tessellation, what kind of primitives povray is using to represent the
> intersection between a ray and the on-surface cube. And for each
> intersection point, its normal should be calculated from the volume data.

> Is that possible that povray is just using a rectangle to reprensent the
> intersection of the on-surface cube? which is something like billboards,
> since it is very efficient. If so, there would be no way to make the
> resulting surface  smoother, except using finer volume data.


POV-Ray send a ray for each pixel. It then check along that ray if it encounter 
anything, and where. When a surface is found, it's colour is evaluated along 
with it's orientation, the normal, and the placement of any light. This will 
give you the effective colour of that pixel. It can be complicated if the 
surface is reflective or transparent.
It don't use a rectangle to represent the intersection, it's just that the 
effctive surface IS blocky. Yess, the only way to get a finer result, in this 
case, is to use a finer, higher resolution, data set.

-- 
Alain
-------------------------------------------------
If all the world is a stage, where is the audience sitting?


Post a reply to this message

From: "Jérôme M. Berger"
Subject: Re: is there any feature for volume raytracing with povray?
Date: 17 Jan 2007 14:43:47
Message: <45ae7c73@news.povray.org>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Tim Attwood wrote:
>> Yes, there is indeed blocky appearance, but i think if there is no any
>> tessellation, what kind of primitives povray is using to represent the
>> intersection between a ray and the on-surface cube. And for each
>> intersection point, its normal should be calculated from the volume data.
>>
>> Is that possible that povray is just using a rectangle to reprensent the
>> intersection of the on-surface cube? which is something like billboards,
>> since it is very efficient. If so, there would be no way to make the
>> resulting surface  smoother, except using finer volume data.
> 
> Pov doesn't tessellate anything ever. All of pov's primitives are
> volumetric, or surfaces.
	Actually, it does tessellate bezier/bicubic patches. You can choose
the tessellation amount with the u_steps, v_steps and flatness
keywords. But that's the only object type that gets tessellated.

		Jerome
- --
+------------------------- Jerome M. BERGER ---------------------+
|    mailto:jeb### [at] freefr      | ICQ:    238062172            |
|    http://jeberger.free.fr/     | Jabber: jeb### [at] jabberfr   |
+---------------------------------+------------------------------+
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)

iD8DBQFFrnxxd0kWM4JG3k8RAnoSAJ0VcOyGeVcxK+Wtha8gqywhsTD5ygCeOH0i
vAojjX39B2Dwxeqqmu3A/Vg=
=wLMo
-----END PGP SIGNATURE-----


Post a reply to this message

From: lien0n
Subject: Re: is there any feature for volume raytracing with povray?
Date: 18 Jan 2007 22:35:00
Message: <web.45b03b43aa1909d1524ae1d0@news.povray.org>
"Tim Attwood" <tim### [at] comcastnet> wrote:
>
> You might try averaging a bit - interpolate 2 or ...
> function{ // untested
>    ( dens(x,y,z)
>      +dens(x+0.05,y,z) + dens(x-0.05,y,z)
>      +dens(x,y+0.05,z) + dens(x,y-0.05,z)
>      +dens(x,y,z+0.05) + dens(x,y,z-0.05)
>    )/7
> }

I created two other images at
http://news.povray.org/povray.binaries.images/thread/%3Cweb.45ac7028a8a7f8c81524ae1d0@news.povray.org%3E//povray.binari
es.images/thread/%3Cweb.45ac7028a8a7f8c81524ae1d0@news.povray.org%3E/
You guy's ideas worked, cool.

But for the case of "interpolate 2", the resulting image is quite strange
with compare to the two images of "interpolate 1" whose shape is what I
want, since I use the same threshold value.


Post a reply to this message

<<< Previous 6 Messages Goto Initial 10 Messages

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