POV-Ray : Newsgroups : povray.binaries.images : Blob object, CSG difference Server Time
31 Jul 2024 04:20:01 EDT (-0400)
  Blob object, CSG difference (Message 1 to 4 of 4)  
From: StephenS
Subject: Blob object, CSG difference
Date: 29 Mar 2010 10:05:01
Message: <web.4bb0b2c7d6244a6320bec040@news.povray.org>
I'm getting different results with using a blob object in a CSG difference,
using version 3.7b36 and 3.6.1c.
The output was BMP, same file except #version number changed to match povray
used.
The bottom left is the blob, some components have texture one does not. The blob
object has a material of yellow. The bottom right is using cutaway_texture in
the CSG, but I may be using it wrong.
I'm still working my way thought some combinations, but wanted to let people
know before I forget.

Stephen S


Post a reply to this message


Attachments:
Download 'test_blob_dif.png' (31 KB)

Preview of image 'test_blob_dif.png'
test_blob_dif.png


 

From: StephenS
Subject: Re: Blob object, CSG difference
Date: 29 Mar 2010 10:10:01
Message: <web.4bb0b4976340747120bec040@news.povray.org>
"StephenS" <nomail@nomail> wrote:
> I'm getting different results with using a blob object in a CSG difference,
> using version 3.7b36 and 3.6.1c.
....
And the code:


//#version 3.6;
#version 3.7;
background { color rgb <0.502,0.502,0.502> }

#declare Default_Red =
texture {
  pigment {
    color rgbft <1.000,0.000,0.000,0.000,0.000>
  }

}

#default{ texture{ Default_Red } }

#declare Light_blue =
texture {
  pigment {
    color rgbft <0.000,1.000,1.000,0.000,0.000>
  }

}

#declare Patterned_Texture =
texture {
  checker
  texture {
    pigment {
      color rgbft <0.000,0.537,0.000,0.000,0.000>
    }

  }

  texture {
    pigment {
      color rgbft <0.859,0.000,0.371,0.000,0.000>
    }

  }

  scale     <0.500,0.500,0.500>
}

#declare M_yellow =
material{
  texture {
    pigment {
      color rgbft <1.000,1.000,0.502,0.000,0.000>
    }

  }

  interior{
    ior                 1.000
    caustics            0.000
    dispersion          1.000
    dispersion_samples  7.000
    fade_power          0.000
    fade_distance       0.000
    fade_color          rgb <0.000,0.000,0.000>
  }

}

#declare Camera =
camera {
  perspective
  location <-3.157,7.114,-11.731>
  up y
  right 1.333*x
  angle 32.822
  sky <0.186,0.890,0.416>
  look_at < 1.941, 0.738, -0.357 >
}

#declare Blob0 =
blob {
  threshold 0.100
  sphere {  // spherical_component0
    0, 1.000000
    strength 1.000000
      texture { Patterned_Texture }
  }
  sphere {  // spherical_component1
    0, 1.000000
    strength 1.000000
    translate <0.593750,0.000000,0.000000>
  }
  sphere {  // spherical_component2
    0, 0.522000
    strength -2.000000
      texture { Light_blue }
    translate <-0.562500,0.000000,-0.593750>
  }
  sturm
  material{ M_yellow }
}


light_source {  // Light_Source
  < 0.000000, 0.000000, 0.000000 >, color rgb <1.000,1.000,1.000>
  fade_power 0.000
  fade_distance 100.000
  media_attenuation off
  media_interaction on
  translate <-6.343750,10.000000,-12.500000>
}

object{ Blob0 }

difference {  // CSG2
  cone {  // Cone0
    -0.5000000*y,0.500,0.5000000*y,0.000
    texture{ Patterned_Texture }
  }

  box {  // Box2
    < -1.9060000, -0.9850000, -0.3815000 >, < 1.9060000, 0.9850000, 0.3815000 >
    translate <0.312500,0.000000,-0.500000>
  }

  cutaway_textures
  texture{ Light_blue }
  translate <5.343750,2.125000,1.250000>
}

difference {  // CSG0
  object {  // Reference0
    Blob0
  }
  box {  // Box0
    < -1.9060000, -0.9850000, -0.3815000 >, < 1.9060000, 0.9850000, 0.3815000 >
    translate <0.312500,0.000000,-0.875000>
  }

  texture{ Light_blue }
  translate <1.937500,2.125000,1.250000>
}

difference {  // CSG1
  object {  // Reference0
    Blob0
  }

  box {  // Box1
    < -1.9060000, -0.9850000, -0.3815000 >, < 1.9060000, 0.9850000, 0.3815000 >
    translate <0.312500,0.000000,-0.875000>
  }

  cutaway_textures
  texture{ Light_blue }
  translate <3.968750,0.000000,0.000000>
}


camera{ Camera }


Post a reply to this message

From: Alain
Subject: Re: Blob object, CSG difference
Date: 29 Mar 2010 17:51:47
Message: <4bb120f3$1@news.povray.org>

> I'm getting different results with using a blob object in a CSG difference,
> using version 3.7b36 and 3.6.1c.
> The output was BMP, same file except #version number changed to match povray
> used.
> The bottom left is the blob, some components have texture one does not. The blob
> object has a material of yellow. The bottom right is using cutaway_texture in
> the CSG, but I may be using it wrong.
> I'm still working my way thought some combinations, but wanted to let people
> know before I forget.
>
> Stephen S

When using cutaway_texture, the object used to cut away part of the rest 
must NOT have any texture.

You use something like:
difference{
  blob{...}
  box{... pigment{rgb<0,1,1>}} <--- that texture must be removed.
  cutaway_texture
}


Alain


Post a reply to this message

From: Kenneth
Subject: Re: Blob object, CSG difference
Date: 30 Mar 2010 09:50:01
Message: <web.4bb2003f6340747165f302820@news.povray.org>
"StephenS" <nomail@nomail> wrote:

> And the code:
> ......
>   box {  // Box1
>     < -1.9060000, -0.9850000, -0.3815000 >, < 1.9060000, 0.9850000, 0.3815000 >
>     translate <0.312500,0.000000,-0.875000>
>   }
>
>   cutaway_textures
>   texture{ Light_blue }
>   translate <3.968750,0.000000,0.000000>
> }
> ......

Another problem could be *where* you've added texture{Light_Blue} (and a few
other places in your code as well.)  The cutaway_textures documentation seems to
imply that its keyword needs to be the final thing in a CSG difference. (That's
how I've always used it, anyway.) Here, texture{Light_Blue} comes after it.

Ken


Post a reply to this message

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