POV-Ray : Newsgroups : povray.general : CSG doesn't work as expected Server Time
17 Nov 2024 21:21:24 EST (-0500)
  CSG doesn't work as expected (Message 1 to 2 of 2)  
From: Bert
Subject: CSG doesn't work as expected
Date: 6 Jan 2003 14:05:06
Message: <web.3e19d331d59c03852b4269f10@news.povray.org>
Hi !

I've got this problem and can't find a way to solve it.
My aim is to create a thin slice which looks as if it was cut out of the
"Dummy"-object (blob).
This slice should be less transparent in the middle of its surface and
become more transparent to the brim. (Therefore the "Glow" and "Glow2"
textures)
Actually this slice should have no or nearly no thickness. This can be
controlled by setting the length of the "Mirror2" cylinder to 0.01 or
something like that.
I only set it to 4 to make my problem more obvious.
I first thought the "cutaway_textures" parameter could solve the problem but
it only made it worse.
I hope someone can help me adjust the scene to suit my needs or maybe show
another better method to do the thing I want to do.

I'd be very glad to get some help cause this is part of a bigger
scene/animation and the
problem has stopped my progress in writing it.

Thanks in advance

Bert

And here's the code:

#include "colors.inc"
#include "textures.inc"


light_source
{
  <10, 20, -20 >//<-10, 20, -20 ><0, 20, -20 >
  color red 1.0  green 1.0  blue 1.0
}

camera
{

  location  <10,0, -23> // position of camera <X Y Z>  //-23
  direction 2.0*z            // which way are we looking <X Y Z> & zoom
  up        y                // which way is +up <X Y Z>
  right     4/3*x            // which way is +right <X Y Z> and aspect ratio
  look_at   <0, -0.5,  0> // point center of view at this point <X Y Z>
}



#declare Glow=pigment{ wood
                    color_map { [0.00   color Orange filter 0 ]
                                [0.05 color Orange filter 0 ]
                                [0.15 color Orange filter 1 ]
                                [1 color Orange  filter 1]
                              }
                    rotate y*90
                    }

#declare Glow2=pigment{ onion
                    color_map { [0.00   color Orange filter 0 ]
                                [0.05 color Orange filter 0 ]
                                [0.15 color Orange filter 1 ]
                                [1 color Orange  filter 1]
                              }

                      }

// create a smooth blobby shape
#declare RadiusVal   = 5.0; // (0 < RadiusVal) outer sphere of influence on
other components
#declare StrengthVal = 1.0; // (+ or -) strength of component's radiating
density

#declare Dummy=
blob {

  threshold 0.6

  cylinder { <-6.125,0,0>,<6.125,0,0> , RadiusVal, StrengthVal texture
{pigment {Glow scale RadiusVal}} translate -y*6.125 }
  cylinder { <-6.125,0,0>,<6.125,0,0> , RadiusVal, StrengthVal texture
{pigment {Glow scale RadiusVal}} translate -y*6.125 rotate z*90}
  cylinder { <-6.125,0,0>,<6.125,0,0> , RadiusVal, StrengthVal texture
{pigment {Glow scale RadiusVal}} translate -y*6.125 rotate z*180}
  cylinder { <-6.125,0,0>,<6.125,0,0> , RadiusVal, StrengthVal texture
{pigment {Glow scale RadiusVal}} translate -y*6.125 rotate z*270}

  sphere { <-6.125,0,0>, RadiusVal, -StrengthVal texture {pigment {Glow2
scale RadiusVal}} translate -y*6.125 }
  sphere { <-6.125,0,0>, RadiusVal, -StrengthVal texture {pigment {Glow2
scale RadiusVal}} translate -y*6.125 rotate z*90}
  sphere { <-6.125,0,0>, RadiusVal, -StrengthVal texture {pigment {Glow2
scale RadiusVal}} translate -y*6.125 rotate z*180}
  sphere { <-6.125,0,0>, RadiusVal, -StrengthVal texture {pigment {Glow2
scale RadiusVal}} translate -y*6.125 rotate z*270}
rotate z*45

}

#declare theatre=
sphere {
  <0, 0, 0>
  1
  texture {Bright_Blue_Sky scale <0.2,0.1,0.2>}

  scale 100
  hollow
}

//#declare Mirror = plane { x,0 rotate -z*0 translate -x*2 }
#declare Mirror2=cylinder { <0, 0, 0>, <3, 0, 0>, 20 rotate -z*0 translate
-x*4 }


intersection {
        object { Dummy   }
        object {Mirror2  }
        cutaway_textures
//no_shadow
           }


object { theatre }
//object { Dummy }


Post a reply to this message

From: hughes, b 
Subject: Re: CSG doesn't work as expected
Date: 7 Jan 2003 06:57:25
Message: <3e1ac0a5@news.povray.org>
"Bert" <zuu### [at] webde> wrote in message
news:web.3e19d331d59c03852b4269f10@news.povray.org...
>
> I first thought the "cutaway_textures" parameter could solve the problem
but
> it only made it worse.

It could be that the blob primitive isn't going to go well for this, I'm not
certain. The problem seems to be that the blob as a whole lacks a texture
but in checking this out I see that the individual texturing isn't being
retained anyhow. Or at least I think it isn't from the looks of the render I
get.

So basically I don't have any answers for you, only my observation.


Post a reply to this message

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