POV-Ray : Newsgroups : povray.newusers : Diffusing interior of an object Server Time
25 Nov 2024 07:34:48 EST (-0500)
  Diffusing interior of an object (Message 1 to 5 of 5)  
From: pare03
Subject: Diffusing interior of an object
Date: 27 Apr 2006 17:25:01
Message: <web.445135ad20c43b6429d68ff20@news.povray.org>
Hi,

I am trying to create an object that will filter and diffuse light at the
same time, so a structured light coming from one side of that object will
be diffused by the object but will gain the texture/pigment of that object.
Is it possible ?

Basically, I am trying to create a semi-transparent and diffusing plastic !
I tried to add an interior_texture but that does not diffuse the light.
And the interior modifyer does not seem to be working either (does not have
a diffusion parameter).

Here is a part of the code:

#declare HollowDome = object
{
  sphere{<0, 0, 0>, DomeRadius
  hollow
  texture{
  pigment {color rgb <0.78, 0.85, 0.99> filter 0.5} finish {diffuse 0.5} }
  interior_texture {
  pigment {color rgb <0.78, 0.85, 0.99> filter 0.5} finish {diffuse 0.9} }}
}

Thank you,
David


Post a reply to this message

From: Warp
Subject: Re: Diffusing interior of an object
Date: 27 Apr 2006 20:09:49
Message: <44515d4d@news.povray.org>
pare03 <par### [at] gelulavalca> wrote:
> I am trying to create an object that will filter and diffuse light at the
> same time, so a structured light coming from one side of that object will
> be diffused by the object but will gain the texture/pigment of that object.

  So basically you want for a light ray which passes through the object to
split into thousands of light rays going to slightly different directions?

-- 
                                                          - Warp


Post a reply to this message

From: pare03
Subject: Re: Diffusing interior of an object
Date: 28 Apr 2006 08:50:00
Message: <web.44520e7d4ebb854a29d68ff20@news.povray.org>
Exactly. Can it be done ?

Warp <war### [at] tagpovrayorg> wrote:
> pare03 <par### [at] gelulavalca> wrote:
> > I am trying to create an object that will filter and diffuse light at the
> > same time, so a structured light coming from one side of that object will
> > be diffused by the object but will gain the texture/pigment of that object.
>
>   So basically you want for a light ray which passes through the object to
> split into thousands of light rays going to slightly different directions?
>
> --
>                                                           - Warp


Post a reply to this message

From: PM 2Ring
Subject: Re: Diffusing interior of an object
Date: 28 Apr 2006 09:10:01
Message: <web.445213d24ebb854a76ba2c900@news.povray.org>
"pare03" <par### [at] gelulavalca> wrote:
> Exactly. Can it be done ?
>
> Warp <war### [at] tagpovrayorg> wrote:
> > pare03 <par### [at] gelulavalca> wrote:
> > > I am trying to create an object that will filter and diffuse light at the
> > > same time, so a structured light coming from one side of that object will
> > > be diffused by the object but will gain the texture/pigment of that object.
> >
> >   So basically you want for a light ray which passes through the object to
> > split into thousands of light rays going to slightly different directions?
> >
> > --
> >                                                           - Warp


Warp's trying to point out that the calculation time would be immense. It's
similar to the situation with trying to compute variable IOR.

You could get some diffusion by building your surface out of microlenses,
but it may not give you the result you want. FWIW, I've built a functional
Fresnel lens in POV.

Why not just fake your diffusion using caustics & media?


Post a reply to this message

From: Alain
Subject: Re: Diffusing interior of an object
Date: 29 Apr 2006 12:10:17
Message: <44538fe9$1@news.povray.org>
pare03 nous apporta ses lumieres en ce 27/04/2006 17:21:
> Hi,
> 
> I am trying to create an object that will filter and diffuse light at the
> same time, so a structured light coming from one side of that object will
> be diffused by the object but will gain the texture/pigment of that object.
> Is it possible ?
> 
> Basically, I am trying to create a semi-transparent and diffusing plastic !
> I tried to add an interior_texture but that does not diffuse the light.
> And the interior modifyer does not seem to be working either (does not have
> a diffusion parameter).
> 
> Here is a part of the code:
> 
> #declare HollowDome = object
> {
>   sphere{<0, 0, 0>, DomeRadius
>   hollow
This enable media to exist inside the object.
>   texture{
>   pigment {color rgb <0.78, 0.85, 0.99> filter 0.5} finish {diffuse 0.5} }
>   interior_texture {
>   pigment {color rgb <0.78, 0.85, 0.99> filter 0.5} finish {diffuse 0.9} }}
> }
> 
> Thank you,
> David
> 
The diffuse atribute control how much your pigment is affected by incoming light, not
how much it 
diffuse light comming through it. diffuse 0.5 means that you use 0.5 of the incident
light.

Can be done, to a point and will require a prety long render time and tons of RAM.
You can use some "micro-normals", that's a normal scaled very small relative to the
scene scale.
You can use average with a normal_map that contains up to 255 entries. You set a list
of randomly 
shifted normals, small scale normals with small displacements or large scale normals
with large 
displacements. The first works best when using antialias, the second without AA.
You will need to use photons so that your light get dispersed. This will cause your
render time to 
skyrocket! If you use average normals, you will use *HUGE* amount of RAM, as the
photons will be 
multiplicated by all those different normals. Each incident photon can generate 255
outbound 
photons, and reducing spacing or count will cause splotchiness.

Another aproach is to fake it. Add area_light to your light_source. Make it as large
as your dome. 
Use a fairly large aray, like 17*17, 33*33 or even 65*65, use adaptive 0 to help
reduce render time, 
increase to adaptive 1 if you get artefacts. Add circular orient to simulate a
spherical source.

You can use radiosity, optionaly remove the light inside the dome, make it opaque or
nearly so, and 
give the dome an ambient 1 to make it emit light. Give the dome a pigment the same
colour as your 
light's.

You don't need the interior_texture. You may want to use double_illuminate to have the
exterior to 
be bright. You can make the dome hollow, and fill with some media. Use scathering
media to have the 
media interact with your light. Use emiting media to have the media glow by itself.
With radiosity 
and the "media on" option, this last one will emit light for the surrounding area.

-- 
Alain
-------------------------------------------------
Change is inevitable, except from vending machines.


Post a reply to this message

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