POV-Ray : Newsgroups : povray.general : Transparent objects and fog - bug? : Re: Transparent objects and fog - bug? Server Time
5 Aug 2024 20:17:44 EDT (-0400)
  Re: Transparent objects and fog - bug?  
From: Charles Fusner
Date: 6 Aug 2002 18:34:39
Message: <3D504F1B.6020300@enter.net>
Alan Holding wrote:
> I reported a similar problem recently (see
> http://news.povray.org/povray.binaries.images/21994/)
> 
> The 'bug' still appears using the full 3.5 release.

Alan: This, at least, seems similar to something that cost me a full
afternoon figuring out something that I intended to finish in about
half an hour (one of those "slap you forehead when you see it" deals).

I had the following situation in my current project:

I wanted to create a piece of tattered, torn sail cloth hanging from
a mast sticking up out of the water suggestive of a sunken ship that
wasn't down very deep (kinda vaguely inspired by Myst, I admit, but for
a different application). The sail cloth was a bezier, and I was
planning to make it ripped looking by using a variant of a technique I
had used before to make tattered edges on paper: ie. an image map with
a transparent ripping pattern in the alpha channel.

Trouble was, this time I was using both fog and multi-layer media in
concentric outer spheres to emulate a stormy sky. This turned out to be
a problem (which I verified by commenting out the #include the invoked
the skies) Every time the media and fog were present, a ghost image of
the transparent portion of the sail cloth texture appeared. The bezier
had a "hollow" on it (although it seemed counter-intuitive to think of
an infinitely thin surface as "hollow"), yet... still, the problem.

Two solutions presented themselves, the latter of which I went with. I
recount them both FWIW in case they help with similar situations (like
the one you've described.)

1. I doubled the bezier, translating the duplicate slightly away from
the camera. For whatever reason, having two copies of the same surface
made the problem vanish.
2. Finally (this is the forehead slapping part) I noticed the sailcloth
was attached to the mast, which was attached to the ship body which was
a CSG union (due to its need to be rotated and translated into place)
and stuck a "hollow" on the whole CSG at the root union. Bing. The
problem ALSO went away, this time without doubling the bezier. As if
somehow the "non-hollowness" of the root union was affecting the hollow
on the bezier somehow.

Well, anyway, it worked. Hope this is useful info.

-- 
@C[$F];
The Silver Tome ::  http://www.silvertome.com
"You may sing to my cat if you like..."


Post a reply to this message

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