POV-Ray : Newsgroups : povray.binaries.images : Mdia interaction Server Time
25 Dec 2024 01:43:47 EST (-0500)
  Mdia interaction (Message 1 to 7 of 7)  
From: Skip Talbot
Subject: Mdia interaction
Date: 11 May 2004 16:59:49
Message: <40a13ec5$1@news.povray.org>
The setup:  A cylinder intersects a sphere, both filled with scattering
media.  However, when I use an empty density for the cylinder (removing all
media) it still casts some sort of ghost in the sphere.  This effect is
present no matter what density is used, and is problematic when you don't
want the cylinder's seem present.  Is there anyway to remedy this problem?

Skip Talbot

//begin code
#version 3.5;

#include "colors.inc"

global_settings {
  assumed_gamma 1.0
  max_trace_level 15
}



camera {
  location  <0.0, 0.5, -4.0>
  direction 1.5*z
  right     x*image_width/image_height
  look_at   <0.0, 1.0,  0.0>
}

sky_sphere {
  pigment {
    gradient y
    color_map {
      [0.0 rgb <0.6,0.7,1.0>]
      [0.7 rgb <0.0,0.1,0.8>]
    }
  }
}

light_source {
  <0, 0, 0>
  color rgb <1, 1, 1>
  translate <-30, 30, -30>
}

plane {
  y, -1
  texture
  {
    pigment {
      checker
      color rgb 1
      color blue 1
      scale 0.5
    }
  }
}

sphere {
  0.0, 0.5
  pigment { rgbt 1 }
  interior { media { scattering {2,4} } }
  hollow
  translate 0.5*y
}


cylinder {
  0*y,  3*y,  0.25
  pigment { rgbt 1 }
  interior { media { scattering {2,4}
   density { } } }
  hollow

}
//end code


Post a reply to this message


Attachments:
Download 'test.jpg' (18 KB)

Preview of image 'test.jpg'
test.jpg


 

From: Alain
Subject: Re: Mdia interaction
Date: 11 May 2004 18:46:14
Message: <40a157b6$1@news.povray.org>
Skip Talbot nous apporta ses lumieres ainsi en ce 2004/05/11 16:59... :

>The setup:  A cylinder intersects a sphere, both filled with scattering
>media.  However, when I use an empty density for the cylinder (removing all
>media) it still casts some sort of ghost in the sphere.  This effect is
>present no matter what density is used, and is problematic when you don't
>want the cylinder's seem present.  Is there anyway to remedy this problem?
>
>Skip Talbot
>
>//begin code
>#version 3.5;
>
>#include "colors.inc"
>
>global_settings {
>  assumed_gamma 1.0
>  max_trace_level 15
>}
>
>
>
>camera {
>  location  <0.0, 0.5, -4.0>
>  direction 1.5*z
>  right     x*image_width/image_height
>  look_at   <0.0, 1.0,  0.0>
>}
>
>sky_sphere {
>  pigment {
>    gradient y
>    color_map {
>      [0.0 rgb <0.6,0.7,1.0>]
>      [0.7 rgb <0.0,0.1,0.8>]
>    }
>  }
>}
>
>light_source {
>  <0, 0, 0>
>  color rgb <1, 1, 1>
>  translate <-30, 30, -30>
>}
>
>plane {
>  y, -1
>  texture
>  {
>    pigment {
>      checker
>      color rgb 1
>      color blue 1
>      scale 0.5
>    }
>  }
>}
>
>sphere {
>  0.0, 0.5
>  pigment { rgbt 1 }
>  interior { media { scattering {2,4} } }
>  hollow
>  translate 0.5*y
>}
>
>
>cylinder {
>  0*y,  3*y,  0.25
>  pigment { rgbt 1 }
>  interior { media { scattering {2,4}
>   density { } } }
>  hollow
>
>}
>//end code
>
>
>
>  
>
Diagnostic: You see the "surface" of your cylinder.
Cure: Bind the two shapes in a merge.
merge{
    sphere{...}
    cylinder{...}
    }
That way, you remove the surface of the cylinder where it's inside the 
sphere.
You may now want to use only one texture and density statement for the 
complete object.

Alain


Post a reply to this message

From: Fredrik Eriksson
Subject: Re: Mdia interaction
Date: 11 May 2004 18:50:02
Message: <opr7uxptemzjc5hb@news.povray.org>
On Tue, 11 May 2004 15:59:50 -0500, Skip Talbot <sta### [at] uiucedu> wrote:
> The setup:  A cylinder intersects a sphere, both filled with scattering
> media.  However, when I use an empty density for the cylinder (removing 
> all
> media) it still casts some sort of ghost in the sphere.  This effect is
> present no matter what density is used, and is problematic when you don't
> want the cylinder's seem present.  Is there anyway to remedy this 
> problem?


Increasing either 'intervals' or 'samples' seems to help, but at a big 
cost in terms of render time.

The attached images are as follows:
1 - Unmodified scene
2 - samples 200, 200
3 - intervals 20

Render times were as follows:
1 - 9 s
2 - 72 s
3 - 330 s

If you look really closely, you can just make out a very faint outline of 
the cylinder on the left side of the sphere in the two "improved" images. 
The one with increased 'samples' also shows bright spots at the top and 
bottom.

Also note that increasing either 'samples' or 'intervals' makes the sphere 
darker. I do not know why this is so, but it happens regardless of the 
cylinder's presence (the darkening effect happens even if you remove the 
cylinder altogether).

To conclude: media is tricky stuff...


---
FE


Post a reply to this message


Attachments:
Download 'media_interaction_test_original.png' (38 KB) Download 'media_interaction_test_samples_200.png' (38 KB) Download 'media_interaction_test_intervals_20.png' (38 KB)

Preview of image 'media_interaction_test_original.png'
media_interaction_test_original.png

Preview of image 'media_interaction_test_samples_200.png'
media_interaction_test_samples_200.png

Preview of image 'media_interaction_test_intervals_20.png'
media_interaction_test_intervals_20.png


 

From: Skip Talbot
Subject: Re: Mdia interaction
Date: 11 May 2004 19:00:48
Message: <40a15b20$1@news.povray.org>
Brilliant!


Post a reply to this message

From: Skip Talbot
Subject: Re: Mdia interaction
Date: 11 May 2004 19:01:11
Message: <40a15b37$1@news.povray.org>
Ah, the render time...  Its worth it though.  Thanks.

Skip


Post a reply to this message

From: Felbrigg
Subject: Re: Mdia interaction
Date: 12 May 2004 05:14:31
Message: <40a1eaf7$1@news.povray.org>
Is this going to be a "twister"?


Post a reply to this message

From: Skip Talbot
Subject: Re: Mdia interaction
Date: 12 May 2004 11:16:34
Message: <40a23fd2$1@news.povray.org>
HOW DID YOU GUESS?  I thought I could keep it on the down low using simple
primitives for that example.  I'm not using primitives for the final, but
yes its going to be a "twister."  For the first time I plan to enter the
IRTC this round, so I'm going to wait until the deadline is closer before
posting WIPs or maybe wait until it's done.

Skip


Post a reply to this message

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