POV-Ray : Newsgroups : povray.general : fog without background Server Time
6 Aug 2024 06:13:47 EDT (-0400)
  fog without background (Message 6 to 15 of 15)  
<<< Previous 5 Messages Goto Initial 10 Messages
From: Warp
Subject: Re: fog without background
Date: 30 Jun 2002 12:57:49
Message: <3d1f388d@news.povray.org>
marabou <not### [at] availablenet> wrote:
>> You need to make the plane you mentioned hollow, so that it can contain
>> fog.

> this works great!

  But it's a kind-of wrong solution. You are defining your plane so that
everything is inside the plane, that is, you are looking at the inner
surface of the plane. You probably want to look at the outher surface of
the plane, and everything should be outside the plane (including the fog).
  That is, you have to reverse the normal and negate the offset.

> but question: which side of a plane becomes hollow; where 
> camera is positionated or where point 0 is?

  The normal points outside the plane. The other side is inside.

-- 
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -


Post a reply to this message

From: Jan Walzer
Subject: Re: fog without background
Date: 30 Jun 2002 19:00:25
Message: <3d1f8d89@news.povray.org>
Warp wrote:
>   The normal points outside the plane. The other side is inside.

Just a question, to confim myself:
Is this described in this way in the doc ?

I found myself a alot of times in this situation ...


Post a reply to this message

From: Christopher James Huff
Subject: Re: fog without background
Date: 30 Jun 2002 22:13:36
Message: <pan.2002.06.30.21.10.41.866879.777@mac.com>
On Sun, 30 Jun 2002 19:00:10 -0500, Jan Walzer wrote:

> Just a question, to confim myself:
> Is this described in this way in the doc ?
> 
> I found myself a alot of times in this situation ...

"By definition the normal vector points to the outside of the plane..."


-- 
Christopher James Huff <chr### [at] maccom>
POV-Ray TAG e-mail: <chr### [at] tagpovrayorg>
WWW: http://homepage.mac.com/chrishuff/


Post a reply to this message

From: Jan Walzer
Subject: Re: fog without background
Date: 1 Jul 2002 02:14:41
Message: <3d1ff351$1@news.povray.org>
shame on me

;)


Post a reply to this message

From: marabou
Subject: Re: fog without background
Date: 1 Jul 2002 05:09:33
Message: <3d201c4d@news.povray.org>
Slime wrote:

>> when i want to include fog into a scene i get following problem:
>> fog needs the background word. it is okay. but if i add a plane on z-axis
>> no fog will be rendered. it is bad, because i want to use ground fog in a
>> room. is there a solution for it?
> 
> 
> You need to make the plane you mentioned hollow, so that it can contain
> fog.
> 

i have tried it now with six planes and one plane made hollow. but then fog 
is gone. why that?


Post a reply to this message

From: Captain Tylor
Subject: Re: fog without background
Date: 1 Jul 2002 11:24:17
Message: <3d207421$1@news.povray.org>
You'll probably need to make the six other planes hollow as well.

"marabou" <not### [at] availablenet> wrote in message
news:3d201c4d@news.povray.org...

> i have tried it now with six planes and one plane made hollow. but then
fog
> is gone. why that?
>


Post a reply to this message

From: marabou
Subject: Re: fog without background
Date: 1 Jul 2002 11:35:06
Message: <3d2076a9@news.povray.org>
Felix Wiemann wrote:

> marabou wrote:
> 
>> i have tried it now with six planes and one plane made hollow. but then
>> fog is gone. why that?
> 
> Could you post an example scene? Where are those six planes?

here they are.

//------------------------------code starts

#include "colors.inc"

// POV3.1

global_settings{
        ambient_light 2
        radiosity{
                gray_threshold 0.3
        }
}

//--wish arealights? jitter? diffuse? turn it on!
#declare AreaOn = 1;
#declare Foggy = 1;
#declare goSpot = 0;    //spotlight?

//------------------------------------------------------------------------->>>macros

//-------------------------------------------------------------------------<<<macros

camera{ location <0,1.7,-2.8> look_at <0,1.5,0>}


#if (!goSpot)
light_source{
        <-1,2,-1> color <1,0.92,0.43>
        #if (AreaOn)
                area_light <-2,0,-2>,<2,0,2>,4,4
                adaptive 1
                jitter
        #end    
}
#end

plane{
        y,0
        pigment{
                color <50,80,108>/255
        }
}
plane{
        y,3
        pigment{
                color White
        }
}

plane{
        z,2
        pigment{
                color White*2
        }
}

plane{
        z,-4
        pigment{
                color White
        }
}

plane{
        x,-2
        pigment{
                color <255,204,109>/255
        }
}
plane{
        x,2
        pigment{
                color <109,179,255>/255
        }
}

#if (Foggy)
fog{
        distance 3
        color <255,246,186>/255
        fog_type 2
        fog_offset 1
        fog_alt 0.2
        turbulence 0.6
        turb_depth 0.2
}
#end


//------------------------------code ends


Post a reply to this message

From: Felix Wiemann
Subject: Re: fog without background
Date: 1 Jul 2002 11:48:23
Message: <3d2079c6@news.povray.org>
marabou wrote:

> [...]
> 
> camera{ location <0,1.7,-2.8> look_at <0,1.5,0>}
> 
> [...]
> 
> plane{
>         y,3
>         pigment{
>                 color White
>         }
> }

The camera is inside this plane!
If you have a look at the messages (which is actually always a good idea) 
you'll see something like this:
Warning: Camera is inside a non-hollow object. Media and fog may not work 
as expected.

Btw, please post the shortest example that is neccesary to show the problem 
next time. This also often helps to find the mistake oneself.
-- 
Felix Wiemann


Post a reply to this message

From: marabou
Subject: Re: fog without background
Date: 1 Jul 2002 15:39:11
Message: <3d20afde@news.povray.org>
Felix Wiemann wrote:

> 
> Btw, please post the shortest example that is neccesary to show the
> problem next time. This also often helps to find the mistake oneself.

Felix Wiemann wrote:
>
>Could you post an example scene? Where are those six planes?

you wanted six planes. you got six planes, a camera and fog. i am not 
member of the shortest code contest ;)
if you look at p.b.images, headline: fog and light, you can see i have 
solved it yet.
but do not know since then and now why the top, bottom, back and right 
plane have to be hollowed. and not the left and front plane. this is not 
logical to me. is there a better way to solve it? maybe a shorter code?
suggestions welcome.


Post a reply to this message

From: Felix Wiemann
Subject: Re: fog without background
Date: 2 Jul 2002 08:28:40
Message: <3d219c78@news.povray.org>
marabou wrote:

> but do not know since then and now why the top, bottom, back and right
> plane have to be hollowed. and not the left and front plane. this is not
> logical to me. is there a better way to solve it? maybe a shorter code?
> suggestions welcome.

Just change the normals so that the camera is not "inside" the plane. You 
really have to get familiar with this inside-outside concept.
-- 
Felix Wiemann


Post a reply to this message

<<< Previous 5 Messages Goto Initial 10 Messages

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