POV-Ray : Newsgroups : povray.newusers : Why can I see my transparent cone? Server Time
29 Jul 2024 16:31:18 EDT (-0400)
  Why can I see my transparent cone? (Message 1 to 10 of 11)  
Goto Latest 10 Messages Next 1 Messages >>>
From: Carl
Subject: Why can I see my transparent cone?
Date: 23 Apr 2005 13:40:00
Message: <web.426a873b79f2b7703f2fc0d20@news.povray.org>
#include "colors.inc"

  #declare screen_width = 854;
  #declare screen_heigth = 391;
  #declare camera_right = x*screen_width/screen_heigth;

  camera {location <10,31,1> look_at <524,0,440-524> angle 30 right
camera_right}

  sky_sphere {
    pigment {
      gradient y
      color_map {
        [(1-cos(radians( 90.0)))/2 color 5*1.2*<238,2,255>/256]
        [(1-cos(radians( 90.3)))/2 color 5*1.1*<3,5,112>/256]
        [(1-cos(radians( 91.5)))/2 color Black]
      }
      scale 2
      translate -1
    }
  }

  fog {
    distance 500
    color rgbt<0.0, 0.0, 0.0, 0.2>
  }

  cone {<0,0,0>, 1, <0,50,0>, 0 pigment { rgbt 1 } hollow scale 40 translate
<2000,0,0>}

If I take the fog away all looks good but WHY does the fog make my hollow
transparent cone visible?  Better yet how do I keep it from making my
transparent cone visible?

Thanks,
Carl


Post a reply to this message

From: Slime
Subject: Re: Why can I see my transparent cone?
Date: 23 Apr 2005 14:41:09
Message: <426a96c5$1@news.povray.org>
> If I take the fog away all looks good but WHY does the fog make my hollow
> transparent cone visible?  Better yet how do I keep it from making my
> transparent cone visible?

This is a limitation of transparent fog. What happens is that every time the
ray passes through a transparent surface, fog up to that point is
calculated. When the ray passes through no surfaces and hits the sky sphere,
you get 80% blackness (which is essentially invisible since your sky sphere
is so bright). But when it passes through two surfaces (into the cone and
back out), you get 80% blackness combined with 80% of what's left blackness
combined with 80% of what's left after that blackness, giving you 99.2%
blackness. (Actually a little less than that since not all of these three
rays pass through an infinite distance.)

The solution is to not use transparent fog when you need transparent
surfaces. Now, if I remember correctly, you're making a light cycle arena
and you wanted fog in the arena but you didn't want it to cover up your
background, right? I assume that's why you're using transparency in the fog.
Another solution you might try is ground fog. Use fog_type 2 with fog_offset
and fog_alt (check the documentation) to make your fog only appear within
the arena and hardly be visible above it. Then you may be able to ditch the
transparency and the effects won't be noticeable in the background. I tried

  fog {
    distance 500
    color rgb <0.0, 0.0, 0.0>
    fog_type 2
    fog_offset 0 // constant density below y=0
    fog_alt 2 // rate at which it fades off above y=0
  }

and got pretty good results. If you can see the fog too much around the base
of the cone when you put media in the cone, then try putting the cone
farther away or decreasing fog_alt or fog_offset.

 - Slime
 [ http://www.slimeland.com/ ]


Post a reply to this message

From: Carl
Subject: Re: Why can I see my transparent cone?
Date: 24 Apr 2005 11:25:00
Message: <web.426bb96df1dd336f3f2fc0d20@news.povray.org>
Thanks for the explanation Slime.  Here is another idea that explanation
gave me that almost works.  Replace the cone above with this one:

cone {<0,0,0>, 1, <0,50,0>, 0 pigment { rgbt <1,1,1,2.5> } hollow scale 40
translate <2000,0,0>}

Leave everything else the same.  It's now much harder to see.  The other
thought I had was is there a way I could place a column of media at that
location without having to put it inside a container?  I've played with the
ground fog and for other reasons I think I like a constant fog better.  The
other idea I'm thinking about is using a finite media instead of the
infinate fog however I'm sure that will slow things down.

Again thanks for the help,
Carl


Post a reply to this message

From: Carl
Subject: Re: Why can I see my transparent cone?
Date: 24 Apr 2005 11:45:01
Message: <web.426bbe97f1dd336f3f2fc0d20@news.povray.org>
Arg... add a light source to the scene and the cones jump out again.

light_source {<-700,900,1000> White}

Why is that?  Let's see I seem to remember reading something about getting
individual object to ignore light sources.  Off to see if I can find that
again.  With luck that will fix this problem.

Carl


Post a reply to this message

From: Marc Jacquier
Subject: Re: Why can I see my transparent cone?
Date: 24 Apr 2005 12:04:05
Message: <426bc375$1@news.povray.org>

news:web.426bbe97f1dd336f3f2fc0d20@news.povray.org...
> Arg... add a light source to the scene and the cones jump out again.
>
> light_source {<-700,900,1000> White}
>
> Why is that?  Let's see I seem to remember reading something about getting
> individual object to ignore light sources.  Off to see if I can find that
> again.  With luck that will fix this problem.

light_group{}?


Marc


Post a reply to this message

From: Carl
Subject: Re: Why can I see my transparent cone?
Date: 24 Apr 2005 12:45:01
Message: <web.426bc9daf1dd336f3f2fc0d20@news.povray.org>
> light_group{}?
>
> Marc

Yes, that is what I was thinking of but it doesn't work.  I took the union
of my light sources and decaled them as "lights" and tried this:

  light_group {
    light_source {Lights}
    object {GameGrid (520,520,2) translate <2,0,2> rotate 90*y}
    object {Arena}
    global_lights off
  }

My game grid or arena floor and the walls of the arena should be all that
see the light souces.  I left the fog, the sky_sphere, and the tranparent
cones outside of the light group and it doesn't work.

Arg... arg... arg... I'll post links to a few pictures in a few minutes.

Carl


Post a reply to this message

From: Carl
Subject: Re: Why can I see my transparent cone?
Date: 24 Apr 2005 13:05:01
Message: <web.426bd147f1dd336f3f2fc0d20@news.povray.org>
Here is my arena before I tried to add red IO towers in the distance:

http://www.wwwmwww.com/TRON/walls11a.png

Here is the same scene without the light sources, the arena floor, or the
arena walls, however I've added some cones filled witg red media that look
a little like IO towers.  Note you can still see the edges of the cones but
you have to look for them:

http://www.wwwmwww.com/TRON/walls11b.png

Now here is the exact same scene with this piece of code added:

  light_group {
   light_source {Lights}
    object {GameGrid (520,520,2) translate <2,0,2> rotate 90*y}
    object {Arena}
    global_lights off
  }

Granted this is my first time I've used light groups.

http://www.wwwmwww.com/TRON/walls11c.png

Looks like the game grid and the arena don't even see the lights yet they
still mess up the IO towers in the backgroud.  I have no idea what's going
on here.

Help,
Carl


Post a reply to this message

From: Slime
Subject: Re: Why can I see my transparent cone?
Date: 24 Apr 2005 16:08:26
Message: <426bfcba$1@news.povray.org>
> Arg... add a light source to the scene and the cones jump out again.

Probably because your pigment is rgbt <1,1,1,something>, so when a light
source is added the cone is no longer black. Try <0,0,0, something>.
However, I'm suspicious if it will still work when you add media, since the
transparency value of 2.5 may have unexpected side effects.

> The
> other idea I'm thinking about is using a finite media instead of the
> infinate fog however I'm sure that will slow things down.

Don't knock it 'till you try it. It will probably solve your solution nicely
and if it's a constant media without a density, you might find that it
renders very fast. Also, if you're going to have transparent objects in the
arena, you might just find yourself dealing with the same problem again
anyway.

 - Slime
 [ http://www.slimeland.com/ ]


Post a reply to this message

From: Carl
Subject: Re: Why can I see my transparent cone?
Date: 25 Apr 2005 09:55:00
Message: <web.426cf5fef1dd336f47af29080@news.povray.org>
"Slime" <fak### [at] emailaddress> wrote:
> Probably because your pigment is rgbt <1,1,1,something>, so when a light
> source is added the cone is no longer black. Try <0,0,0, something>.
> However, I'm suspicious if it will still work when you add media, since the
> transparency value of 2.5 may have unexpected side effects.

That worked Slime.  Thanks for the help again.  Here is a link to the
results:

http://www.wwwmwww.com/TRON/walls11.png

I need to raise the AA a bit.  However I still don't understand why the
light_group idea didn't work.  And I'm also confused by "2.3.6.3  Simple
media examples".  In their first example they have a light source and a
tranparent container with "rgbt 1".  Isn't that the same as rgbt
<1,1,1,something> where the something is 1?  I'm sure I'm missing
something.

Just wanting to understand.

Thanks again for all the help guys,
Carl


Post a reply to this message

From: Carl
Subject: Re: Why can I see my transparent cone?
Date: 25 Apr 2005 10:00:00
Message: <web.426cf6abf1dd336f47af29080@news.povray.org>
"Slime" <fak### [at] emailaddress> wrote:
> Don't knock it 'till you try it. It will probably solve your solution nicely
> and if it's a constant media without a density, you might find that it
> renders very fast. Also, if you're going to have transparent objects in the
> arena, you might just find yourself dealing with the same problem again
> anyway.

Thanks.  I'll try it.  I finally did get the fog to work but you are right
that it will probably cause me problems down the road.

Carl


Post a reply to this message

Goto Latest 10 Messages Next 1 Messages >>>

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