POV-Ray : Newsgroups : povray.general : Problem with doors Server Time
1 Aug 2024 00:20:56 EDT (-0400)
  Problem with doors (Message 1 to 7 of 7)  
From: sopawilly
Subject: Problem with doors
Date: 19 Aug 2006 12:20:00
Message: <web.44e7398070f886c15573f0e20@news.povray.org>
I would like to ask for your help with a problem. On a scene, i have a wall,
with a door on it, and i want to see the room at the other side. But with
the command intersection, i take off the part of the wall i need, but i
just get a black, or of any other color rectangle, but i need to see the
other side.

Is there any color defined that is transparent? or should i look for another
way to make that.

Any advice? Thanks in advance


Post a reply to this message

From: Warp
Subject: Re: Problem with doors
Date: 19 Aug 2006 13:17:38
Message: <44e747b1@news.povray.org>
The box you are using to cut the hole in the wall needs to be slightly
thicker than the wall.

  (Else you get a coincident surfaces problem, which causes things to
not to work properly. In layman terms, if the surface of the cutting
box is exactly in the same place as the surface of the wall, POV-Ray
has no way of knowing whether it should be cut or not. In practice
whether that happens or not will depend on floating point calculation
inaccuracies, which might even change on a per-ray basis.)

-- 
                                                          - Warp


Post a reply to this message

From: Ger
Subject: Re: Problem with doors
Date: 19 Aug 2006 13:19:10
Message: <44e7480a@news.povray.org>
sopawilly wrote:

> I would like to ask for your help with a problem. On a scene, i have a
> wall, with a door on it, and i want to see the room at the other side. But
> with the command intersection, i take off the part of the wall i need, but
> i just get a black, or of any other color rectangle, but i need to see the
> other side.
> 
> Is there any color defined that is transparent? or should i look for
> another way to make that.
> 
> Any advice? Thanks in advance

difference {
        box{<-20,0,-0.1>,<20,2.5,0.1>}
        box{<-0.75,0,-0.2>,<0.75,2.1,0.2>}
        texture { MyWallTexture}
        }
That should do it
-- 
Ger


Post a reply to this message

From: Warp
Subject: Re: Problem with doors
Date: 19 Aug 2006 13:21:24
Message: <44e74894@news.povray.org>
Ger <No.### [at] thankyou> wrote:
> difference {
>         box{<-20,0,-0.1>,<20,2.5,0.1>}
>         box{<-0.75,0,-0.2>,<0.75,2.1,0.2>}
>         texture { MyWallTexture}
>         }
> That should do it

  Perhaps it would be a good idea to explain *why* it has to be done
that way, so that he will learn the principle and know the next time
what to do.

-- 
                                                          - Warp


Post a reply to this message

From: Chris B
Subject: Re: Problem with doors
Date: 19 Aug 2006 13:48:38
Message: <44e74ef6$1@news.povray.org>
"sopawilly" <sop### [at] hotmailcom> wrote in message 
news:web.44e7398070f886c15573f0e20@news.povray.org...
>I would like to ask for your help with a problem. On a scene, i have a 
>wall,
> with a door on it, and i want to see the room at the other side. But with
> the command intersection, i take off the part of the wall i need, but i
> just get a black, or of any other color rectangle, but i need to see the
> other side.
>

As Warp and Ger mentioned you'd normally use a difference, making sure that 
the cutting object is large enough to slice all of the way through the wall 
thickness (to avoiding coincident surfaces), thus you wouldn't necessarily 
need to make the colour of the cut surface transparent.

> Is there any color defined that is transparent? or should i look for 
> another
> way to make that.
>

Nevertheless, You can add a degree of transparency to any colour by adding a 
fourth 'transparency' element to the color vector, so you can specify:

  color rgbt <1,1,1,1>
to get a totally transparent colour, or
  color rgbt <1,0,0,0.5>
to give a partially transparent red surface.

You can also add a tranparency vector to an existing colour by adding 't' 
with an appropriate multiplier, so:

  box {0,1 pigment {color Red + t*0.75} }
  sphere {0,0.5 pigment {color Yellow + t*0.5}}

With tranparency you can slice a transparent or partially transparent hole 
in the edge of a solid object to see inside.

Regards,
Chris B.


Post a reply to this message

From: sopawilly
Subject: Re: Problem with doors
Date: 19 Aug 2006 14:25:00
Message: <web.44e7569d97829a625573f0e20@news.povray.org>
Thank you all, you helped to solve it


Post a reply to this message

From: Charles C
Subject: Re: Problem with doors
Date: 20 Aug 2006 00:45:01
Message: <web.44e7e79597829a623869c6770@news.povray.org>
I'd cut the hole in the wall using difference....
Charles


"sopawilly" <sop### [at] hotmailcom> wrote:
> I would like to ask for your help with a problem. On a scene, i have a wall,
> with a door on it, and i want to see the room at the other side. But with
> the command intersection, i take off the part of the wall i need, but i
> just get a black, or of any other color rectangle, but i need to see the
> other side.
>
> Is there any color defined that is transparent? or should i look for another
> way to make that.
>
> Any advice? Thanks in advance


Post a reply to this message

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