POV-Ray : Newsgroups : povray.general : Texture for "X-ray" type image Server Time
30 Jul 2024 16:26:21 EDT (-0400)
  Texture for "X-ray" type image (Message 1 to 8 of 8)  
From: uekstrom
Subject: Texture for "X-ray" type image
Date: 12 Dec 2008 08:00:00
Message: <web.49425fa548f3798df1d58de20@news.povray.org>
Hi all. I am trying to make a texture for producing images that look a bit like
x-ray pictures (see for example
http://cebas.com/products/feature.php?UD=10-7888-33-788&PID=45&FID=401 for what
I mean). For doing this I think I need a transparent or filter value that
depends on the surface normal. The surface should be transparent when facing
the camera and opaque when viewed from the side. Is it possible to specify this
in some simple way?

Sincerely,
Ulf


Post a reply to this message

From: Zeger Knaepen
Subject: Re: Texture for "X-ray" type image
Date: 12 Dec 2008 08:31:41
Message: <494267bd$1@news.povray.org>
"uekstrom" <uekstrom at gmail dot com> wrote in message 
news:web.49425fa548f3798df1d58de20@news.povray.org...
> Hi all. I am trying to make a texture for producing images that look a bit 
> like
> x-ray pictures (see for example
> http://cebas.com/products/feature.php?UD=10-7888-33-788&PID=45&FID=401 for 
> what
> I mean). For doing this I think I need a transparent or filter value that
> depends on the surface normal. The surface should be transparent when 
> facing
> the camera and opaque when viewed from the side. Is it possible to specify 
> this
> in some simple way?

not, afaik, in the official POV-Ray, very easily so in MegaPOV (aoi-pattern)

cu!
-- 
#macro G(b,e)b+(e-b)*C/50#end#macro _(b,e,k,l)#local C=0;#while(C<50)
sphere{G(b,e)+3*z.1pigment{rgb G(k,l)}finish{ambient 1}}#local C=C+1;
#end#end _(y-x,y,x,x+y)_(y,-x-y,x+y,y)_(-x-y,-y,y,y+z)_(-y,y,y+z,x+y)
_(0x+y.5+y/2x)_(0x-y.5+y/2x)            // ZK http://www.povplace.com


Post a reply to this message

From: Warp
Subject: Re: Texture for "X-ray" type image
Date: 12 Dec 2008 08:32:24
Message: <494267e8@news.povray.org>
uekstrom <uekstrom at gmail dot com> wrote:
> Hi all. I am trying to make a texture for producing images that look a bit like
> x-ray pictures (see for example
> http://cebas.com/products/feature.php?UD=10-7888-33-788&PID=45&FID=401 for what
> I mean). For doing this I think I need a transparent or filter value that
> depends on the surface normal. The surface should be transparent when facing
> the camera and opaque when viewed from the side. Is it possible to specify this
> in some simple way?

  The official povray doesn't have an angle-of-incidence pattern, but it
does have a slope pattern:

http://povray.org/documentation/view/3.6.1/393/

  You can most probably achieve the effect you want with that pattern, by
making the slope vector point towards the camera. (But because it's not an
angle-of-incidence patter, it won't work properly for reflections, etc.)

-- 
                                                          - Warp


Post a reply to this message

From: Trevor G Quayle
Subject: Re: Texture for "X-ray" type image
Date: 12 Dec 2008 08:35:00
Message: <web.4942684d5c4bb01a81c811d20@news.povray.org>
"uekstrom" <uekstrom at gmail dot com> wrote:
> Hi all. I am trying to make a texture for producing images that look a bit like
> x-ray pictures (see for example
> http://cebas.com/products/feature.php?UD=10-7888-33-788&PID=45&FID=401 for what
> I mean). For doing this I think I need a transparent or filter value that
> depends on the surface normal. The surface should be transparent when facing
> the camera and opaque when viewed from the side. Is it possible to specify this
> in some simple way?
>
> Sincerely,
> Ulf

the aoi (angle of incidence) pattern that is in megaPOV would serve best for
this.  However, without megaPOV, you can adapt the 'slope' pattern, you will
just need to play around with the numbers.

-tgq


Post a reply to this message

From: uekstrom
Subject: Re: Texture for "X-ray" type image
Date: 12 Dec 2008 09:35:00
Message: <web.4942762f5c4bb01a9c3fc0810@news.povray.org>
Thanks, it worked fine with the ios and an appropriate color_map! (See
http://dustyattic.org/pool/orbitals.png for a simple example)

I used the texture below. It didn't look very good with fewer entries in the
color map.

#declare gam = 4;
#declare xray = texture{
 pigment {
  aoi
         color_map {
          [0.00 color rgbt <1,1,1,1-pow(0.0,gam)/pow(0.5,gam)> ]
          [0.05 color rgbt <1,1,1,1-pow(0.05,gam)/pow(0.5,gam)> ]
          [0.10 color rgbt <1,1,1,1-pow(0.10,gam)/pow(0.5,gam)> ]
          [0.15 color rgbt <1,1,1,1-pow(0.15,gam)/pow(0.5,gam)> ]
          [0.20 color rgbt <1,1,1,1-pow(0.20,gam)/pow(0.5,gam)> ]
          [0.25 color rgbt <1,1,1,1-pow(0.25,gam)/pow(0.5,gam)> ]
          [0.30 color rgbt <1,1,1,1-pow(0.30,gam)/pow(0.5,gam)> ]
          [0.35 color rgbt <1,1,1,1-pow(0.35,gam)/pow(0.5,gam)> ]
          [0.40 color rgbt <1,1,1,1-pow(0.40,gam)/pow(0.5,gam)> ]
          [0.45 color rgbt <1,1,1,1-pow(0.45,gam)/pow(0.5,gam)> ]
          [0.50 color rgbt <1,1,1,1-pow(0.50,gam)/pow(0.5,gam)> ]
          [1.00 color rgbt <1,1,1,1> ]
  }
 }
 finish{ ambient 1 }
}

Ulf


Post a reply to this message

From: Chris B
Subject: Re: Texture for "X-ray" type image
Date: 12 Dec 2008 10:52:44
Message: <494288cc$1@news.povray.org>
"uekstrom" <uekstrom at gmail dot com> wrote in message 
news:web.4942762f5c4bb01a9c3fc0810@news.povray.org...
>
> Thanks, it worked fine with the ios and an appropriate color_map! (See
> http://dustyattic.org/pool/orbitals.png for a simple example)

Nice.

I've posted a quick example of using the slope pattern on 
povray.binaries.images.

Regards,
Chris B.


Post a reply to this message

From: Trevor G Quayle
Subject: Re: Texture for "X-ray" type image
Date: 12 Dec 2008 11:20:01
Message: <web.49428eeb5c4bb01a81c811d20@news.povray.org>
"uekstrom" <uekstrom at gmail dot com> wrote:
> Thanks, it worked fine with the ios and an appropriate color_map! (See
> http://dustyattic.org/pool/orbitals.png for a simple example)
>
> I used the texture below. It didn't look very good with fewer entries in the
> color map.
>
> #declare gam = 4;
> #declare xray = texture{
>  pigment {
>   aoi
>          color_map {
>           [0.00 color rgbt <1,1,1,1-pow(0.0,gam)/pow(0.5,gam)> ]
>           [0.05 color rgbt <1,1,1,1-pow(0.05,gam)/pow(0.5,gam)> ]
>           [0.10 color rgbt <1,1,1,1-pow(0.10,gam)/pow(0.5,gam)> ]
>           [0.15 color rgbt <1,1,1,1-pow(0.15,gam)/pow(0.5,gam)> ]
>           [0.20 color rgbt <1,1,1,1-pow(0.20,gam)/pow(0.5,gam)> ]
>           [0.25 color rgbt <1,1,1,1-pow(0.25,gam)/pow(0.5,gam)> ]
>           [0.30 color rgbt <1,1,1,1-pow(0.30,gam)/pow(0.5,gam)> ]
>           [0.35 color rgbt <1,1,1,1-pow(0.35,gam)/pow(0.5,gam)> ]
>           [0.40 color rgbt <1,1,1,1-pow(0.40,gam)/pow(0.5,gam)> ]
>           [0.45 color rgbt <1,1,1,1-pow(0.45,gam)/pow(0.5,gam)> ]
>           [0.50 color rgbt <1,1,1,1-pow(0.50,gam)/pow(0.5,gam)> ]
>           [1.00 color rgbt <1,1,1,1> ]
>   }
>  }
>  finish{ ambient 1 }
> }
>
> Ulf


Looks good.

One thing you can do rather than having multiple entries is use the poly_wave
waveform (rather than the default linear waveform) which should be able to do
axactly what you are doing with multiple entries (only better as it would be a
continuous nonlinear waveform whereas you have many smaller linear waveforms)

-tgq


Post a reply to this message

From: Nicolas George
Subject: Re: Texture for "X-ray" type image
Date: 13 Dec 2008 10:14:07
Message: <4943d13f@news.povray.org>
"uekstrom"  wrote in message
<web.49425fa548f3798df1d58de20@news.povray.org>:
>	   For doing this I think I need a transparent or filter value that
> depends on the surface normal. The surface should be transparent when facing
> the camera and opaque when viewed from the side.

Are you sure that is how x-rays look like? Intuitively, I would have thought
that only the thickness would have any influence. Surfaces seen from the
side are more opaque because the rays traverses them diagonally. Such an
effect could probably be obtained with an absorbing medium, or maybe with an
emitting one.


Post a reply to this message

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