POV-Ray : Newsgroups : povray.newusers : Why is this happening when I change the background to white? Server Time
24 Nov 2024 03:00:24 EST (-0500)
  Why is this happening when I change the background to white? (Message 1 to 10 of 10)  
From: Brad
Subject: Why is this happening when I change the background to white?
Date: 30 Sep 2010 19:20:00
Message: <web.4ca51a5ad353eca9c40be0560@news.povray.org>
Hi, I'm a physicist that uses POVRAY to visualize crystal structures and
electronic properties of materials.

I have generated the following image with POVRAY

http://yfrog.com/0sdefaulteop

Now if I set the background from black (0,0,0) to white (255, 255, 255) I get
the following image:

http://yfrog.com/n4whitebackgroundp

Notice that a lot of the blue stuff in the corners and edges of the box is now
missing.

The header (and so probably the relevant info) of my .pov file is below

#declare camera_location = <-0.10, -0.50, 0.90>;
#declare camera_look_at = <0.00, 0.00, -0.00>;
#declare camera_scale = 22.17;
#declare light_location = camera_location - camera_look_at;
#declare light_scale = 1e6;
#declare color_light = rgb <2.00, 2.00, 2.00>;
#declare color_background = rgb <0.00, 0.00, 0.00>;
#declare radius_frame = 0.01;
#declare color_frame = rgb <0.75, 0.75, 0.75>;
#declare color_box = rgbf <1.00, 1.00, 1.00, 0.75>;
#declare length_axis = 3.82;
#declare radius_axis = 0.08;
#declare color_axis_x = rgb <1.00, 0.00, 0.00>;
#declare color_axis_y = rgb <0.00, 1.00, 0.00>;
#declare color_axis_z = rgb <0.00, 0.00, 1.00>;
#declare length_arrow = 0.2 * length_axis;
#declare radius_arrow = 2.0 * radius_axis;
#declare color_arrow_x = color_axis_x;
#declare color_arrow_y = color_axis_y;
#declare color_arrow_z = color_axis_z;
#declare radius_atom_si = 0.42;
#declare radius_bond_si = 0.15;
#declare color_atom_si = rgb <0.50, 0.60, 0.60>;
#declare color_bond_si = rgb <0.50, 0.60, 0.60>;
#declare radius_atom_p = 0.39;
#declare radius_bond_p = 0.15;
#declare color_atom_p = rgb <1.00, 0.50, 0.00>;
#declare color_bond_p = rgb <1.00, 0.50, 0.00>;
#declare color_isosurface_positive = rgbf <0.40, 0.40, 0.80, 0.75>;
#declare color_isosurface_negative = rgbf <0.80, 0.40, 0.40, 0.75>;

The blue surface is defined by the color_isosurface flags at the bottom, and
setting those from a rgbf to a purely rgb setting fixes the missing surface that
I have in that picture. However, I want my iamage to be semi-transparent. Is
there anything I can do?

Thanks so much for your help!


Post a reply to this message

From: Joost
Subject: Re: Why is this happening when I change the background to white?
Date: 1 Oct 2010 05:40:01
Message: <web.4ca5ab6bb4921ef62a36ae330@news.povray.org>
"Brad" <bra### [at] gmailcom> wrote:
> Hi, I'm a physicist that uses POVRAY to visualize crystal structures and
> electronic properties of materials.
>
> I have generated the following image with POVRAY
>
> http://yfrog.com/0sdefaulteop
>
> Now if I set the background from black (0,0,0) to white (255, 255, 255) I get
> the following image:
>

I think you lose your transparency because your background becomes equal to your
box color (both white). Maybe the setting of your color_light to < 2.00, 2.00,
2.00 > has something to do with the rest of the picture, but I'm not
knowledgeable enough to answer for that.

Joost


Post a reply to this message

From: Joost
Subject: Re: Why is this happening when I change the background to white?
Date: 1 Oct 2010 05:45:01
Message: <web.4ca5ac67b4921ef62a36ae330@news.povray.org>
"Brad" <bra### [at] gmailcom> wrote:


Oh, and white isn't < 255, 255, 255>, but < 1, 1, 1>.


Post a reply to this message

From: Sabrina Kilian
Subject: Re: Why is this happening when I change the background to white?
Date: 1 Oct 2010 12:30:35
Message: <4ca60cab$1@news.povray.org>
On 9/30/2010 7:16 PM, Brad wrote:
> Notice that a lot of the blue stuff in the corners and edges of the box is now
> missing.
>
> The header (and so probably the relevant info) of my .pov file is below
<snip>
> The blue surface is defined by the color_isosurface flags at the bottom, and
> setting those from a rgbf to a purely rgb setting fixes the missing surface that
> I have in that picture. However, I want my iamage to be semi-transparent. Is
> there anything I can do?

The cube in your black background piece also has a few artifacts showing 
up along the edges as well. I am guessing the problem is not in how you 
are coloring the boxes, but how you are bounding the objects involved.

This is just a guess, but the artifacts do look like the coincident 
surface problem. If the transparent box is exactly the same size or in 
the same exact place as the surface you use to create the edges of the 
blue interior surface, the rays can't calculate which they hit first, 
and artifacts appear. More of your code would be useful to see if that 
is the issue, but you can try just scaling the visible box by some small 
amount to see if that corrects some or all of the problem.


Post a reply to this message

From: Alain
Subject: Re: Why is this happening when I change the background to white?
Date: 1 Oct 2010 12:48:24
Message: <4ca610d8$1@news.povray.org>

> Hi, I'm a physicist that uses POVRAY to visualize crystal structures and
> electronic properties of materials.
>
> I have generated the following image with POVRAY
>
> http://yfrog.com/0sdefaulteop
>
> Now if I set the background from black (0,0,0) to white (255, 255, 255) I get
> the following image:
>
> http://yfrog.com/n4whitebackgroundp
>
> Notice that a lot of the blue stuff in the corners and edges of the box is now
> missing.
>
> The header (and so probably the relevant info) of my .pov file is below
>
> #declare camera_location =<-0.10, -0.50, 0.90>;
> #declare camera_look_at =<0.00, 0.00, -0.00>;
> #declare camera_scale = 22.17;
> #declare light_location = camera_location - camera_look_at;
> #declare light_scale = 1e6;
> #declare color_light = rgb<2.00, 2.00, 2.00>;
> #declare color_background = rgb<0.00, 0.00, 0.00>;
> #declare radius_frame = 0.01;
> #declare color_frame = rgb<0.75, 0.75, 0.75>;
> #declare color_box = rgbf<1.00, 1.00, 1.00, 0.75>;
> #declare length_axis = 3.82;
> #declare radius_axis = 0.08;
> #declare color_axis_x = rgb<1.00, 0.00, 0.00>;
> #declare color_axis_y = rgb<0.00, 1.00, 0.00>;
> #declare color_axis_z = rgb<0.00, 0.00, 1.00>;
> #declare length_arrow = 0.2 * length_axis;
> #declare radius_arrow = 2.0 * radius_axis;
> #declare color_arrow_x = color_axis_x;
> #declare color_arrow_y = color_axis_y;
> #declare color_arrow_z = color_axis_z;
> #declare radius_atom_si = 0.42;
> #declare radius_bond_si = 0.15;
> #declare color_atom_si = rgb<0.50, 0.60, 0.60>;
> #declare color_bond_si = rgb<0.50, 0.60, 0.60>;
> #declare radius_atom_p = 0.39;
> #declare radius_bond_p = 0.15;
> #declare color_atom_p = rgb<1.00, 0.50, 0.00>;
> #declare color_bond_p = rgb<1.00, 0.50, 0.00>;
> #declare color_isosurface_positive = rgbf<0.40, 0.40, 0.80, 0.75>;
> #declare color_isosurface_negative = rgbf<0.80, 0.40, 0.40, 0.75>;
>
> The blue surface is defined by the color_isosurface flags at the bottom, and
> setting those from a rgbf to a purely rgb setting fixes the missing surface that
> I have in that picture. However, I want my iamage to be semi-transparent. Is
> there anything I can do?
>
> Thanks so much for your help!
>
>
>

I made some tests using a few concentrical spheres using your color.
No problem if I use a background of rgb 1 or rgb 2.
Increasing the rgb value beyong that and I see surfaces disapearing.

As you used rgb 255 for the background, there is no way that you could 
see all surfaces. It cuts through the first 4 surfaces.




Alain


Post a reply to this message

From: Alain
Subject: Re: Why is this happening when I change the background to white?
Date: 1 Oct 2010 12:50:29
Message: <4ca61155$1@news.povray.org>

> On 9/30/2010 7:16 PM, Brad wrote:
>> Notice that a lot of the blue stuff in the corners and edges of the
>> box is now
>> missing.
>>
>> The header (and so probably the relevant info) of my .pov file is below
> <snip>
>> The blue surface is defined by the color_isosurface flags at the
>> bottom, and
>> setting those from a rgbf to a purely rgb setting fixes the missing
>> surface that
>> I have in that picture. However, I want my iamage to be
>> semi-transparent. Is
>> there anything I can do?
>
> The cube in your black background piece also has a few artifacts showing
> up along the edges as well. I am guessing the problem is not in how you
> are coloring the boxes, but how you are bounding the objects involved.
>
> This is just a guess, but the artifacts do look like the coincident
> surface problem. If the transparent box is exactly the same size or in
> the same exact place as the surface you use to create the edges of the
> blue interior surface, the rays can't calculate which they hit first,
> and artifacts appear. More of your code would be useful to see if that
> is the issue, but you can try just scaling the visible box by some small
> amount to see if that corrects some or all of the problem.

The real problem is the background:
backgroung{rgb 255}

Changing it to:
backgroung{ rgb 1}
corrects the problem nicely.


Alain


Post a reply to this message

From: Brad
Subject: Re: Why is this happening when I change the background to white?
Date: 1 Oct 2010 16:50:00
Message: <web.4ca6493eb4921ef6c40be0560@news.povray.org>
Thanks so much for the help everyone! The problem indeed is fixed if I change
the (255, 255, 255) to (1, 1, 1). I'm very new with all this stuff and a quick
google search for 'white rgb' somehow led me to the 255 values.

While I'm here, what resources would you guys recommend for someone who wants to
learn more about POVRAY? I'd mostly like to have the ability to generate
beautiful graphics for scientific papers and presentations. I saw a couple
tutorials online that I'm going to try to work through today, but wanted to know
if there was anything better to look at. Really amazed at the kind of images
POVRAY can produce!

Thanks again,

Brad


Alain <aze### [at] qwertyorg> wrote:

> > On 9/30/2010 7:16 PM, Brad wrote:
> >> Notice that a lot of the blue stuff in the corners and edges of the
> >> box is now
> >> missing.
> >>
> >> The header (and so probably the relevant info) of my .pov file is below
> > <snip>
> >> The blue surface is defined by the color_isosurface flags at the
> >> bottom, and
> >> setting those from a rgbf to a purely rgb setting fixes the missing
> >> surface that
> >> I have in that picture. However, I want my iamage to be
> >> semi-transparent. Is
> >> there anything I can do?
> >
> > The cube in your black background piece also has a few artifacts showing
> > up along the edges as well. I am guessing the problem is not in how you
> > are coloring the boxes, but how you are bounding the objects involved.
> >
> > This is just a guess, but the artifacts do look like the coincident
> > surface problem. If the transparent box is exactly the same size or in
> > the same exact place as the surface you use to create the edges of the
> > blue interior surface, the rays can't calculate which they hit first,
> > and artifacts appear. More of your code would be useful to see if that
> > is the issue, but you can try just scaling the visible box by some small
> > amount to see if that corrects some or all of the problem.
>
> The real problem is the background:
> backgroung{rgb 255}
>
> Changing it to:
> backgroung{ rgb 1}
> corrects the problem nicely.
>
>
> Alain


Post a reply to this message

From: Jim Holsenback
Subject: Re: Why is this happening when I change the background to white?
Date: 1 Oct 2010 18:57:48
Message: <4ca6676c$1@news.povray.org>
On 10/01/2010 05:49 PM, Brad wrote:
> While I'm here, what resources would you guys recommend for someone who wants to
> learn more about POVRAY?

Have you visited http://www.povray.org/resources/ ... it's certainly a
good place to start :-)


Post a reply to this message

From: Alain
Subject: Re: Why is this happening when I change the background to white?
Date: 1 Oct 2010 20:48:09
Message: <4ca68149$1@news.povray.org>

> On 10/01/2010 05:49 PM, Brad wrote:
>> While I'm here, what resources would you guys recommend for someone who wants to
>> learn more about POVRAY?
>
> Have you visited http://www.povray.org/resources/ ... it's certainly a
> good place to start :-)

You should also rear through the provided documentation and play with 
the various sample scenes. You make a change and see the effect it causes.



Alain


Post a reply to this message

From: Stephen
Subject: Re: Why is this happening when I change the background to white?
Date: 2 Oct 2010 02:54:52
Message: <4ca6d73c$1@news.povray.org>
On 02/10/2010 1:48 AM, Alain wrote:

>> On 10/01/2010 05:49 PM, Brad wrote:
>>> While I'm here, what resources would you guys recommend for someone
>>> who wants to
>>> learn more about POVRAY?
>>
>> Have you visited http://www.povray.org/resources/ ... it's certainly a
>> good place to start :-)
>
> You should also rear through the provided documentation and play with
> the various sample scenes. You make a change and see the effect it causes.
>

And of course there are these newsgroups.

-- 

Best Regards,
	Stephen


Post a reply to this message

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