POV-Ray : Newsgroups : povray.binaries.images : Blob Issue 2 Server Time
1 Aug 2024 12:27:46 EDT (-0400)
  Blob Issue 2 (Message 1 to 2 of 2)  
From: Blue Herring
Subject: Blob Issue 2
Date: 2 Sep 2008 10:16:22
Message: <48bd4ab6@news.povray.org>
Hello,
   This is the second issue I ran into with blobs lately.  What is 
happening is that when a blob with individually textured components has 
something removed using a difference, and the difference uses the 
"cutaway_textures" option, then the texturing of the components is lost. 
  What it seems like its doing is reapplying the texture from the object 
level of the blob, but not the component level.

An example scene:

#version 3.61;

#declare Use_Difference = yes;
#declare Use_Cutaway = yes;
#declare Use_Object_Texture = yes;
#declare Use_Left_Texture = yes;

#default { finish { ambient 0.1 diffuse 0.9 } }

#include "colors.inc"

global_settings {
   assumed_gamma 1.0
   max_trace_level 6
}

camera {
   location <0, 4, -7>
   up y
   right x * image_width/image_height
   look_at y * 2
}

light_source {
   <20, 10, -30>, White
}

box {
   <-50, -1, -50>, <50, 50, 10>
   inverse
   texture {
     pigment { White }
   }
}

plane {
   y, 0
   texture {
     pigment {
       checker White, Black
       scale <2.5, 1, 2.5>
     }
   }
}

#declare Glass_F =
   finish {
     ambient 0
     specular 0.9
     roughness 0.001
     reflection {
       0, 1
       fresnel
     }
     conserve_energy
   }

#declare Yellow_Glass =
   texture {
     pigment { Yellow }
     finish { Glass_F }
   }

#declare Blue_Glass =
   texture {
     pigment { Blue }
     finish { Glass_F }
   }

#declare Red_Glass =
   texture {
     pigment { Red }
     finish { Glass_F }
   }

#declare Green_Glass =
   texture {
     pigment { Green }
     finish { Glass_F }
   }


#declare Obj =
   blob {
     threshold 1

     sphere { <-1.5, 2, 0>, 3.696, 2
       #if(Use_Left_Texture)
         texture { Red_Glass }
       #end
     }

     sphere {
       <1.5, 2, 0>, 3.696, 2
       texture { Yellow_Glass }
     }

     #if(Use_Object_Texture)
       texture { Blue_Glass }
     #end

     interior {
       ior 1.62725
     }
   }

#if(Use_Difference)
   #declare Obj =
     difference {
       object { Obj }
       box {
         <-0.75, -0.75, -10>, <0.75, 0.75, 10>
         rotate z * 45
         translate y * 2
         #if(! Use_Cutaway)
           texture { Green_Glass }
         #end
       }
       #if(Use_Cutaway)
         cutaway_textures
       #end
       bounded_by {
         box { min_extent(Obj), max_extent(Obj) }
       }
     }
#end

object { Obj }

I've attached some sample images.  The first is just the blob with 
textures on the left and right components and the object as a whole. 
The second is a box differenced from the same blob.  The third is the 
same difference with the cutaway_textures keyword applied.  The last is 
the same as the third, but the object texture has been removed.  Note 
the last one generates a parse error about a missing pigment, and the 
texture looks the be the global default.

It seems component textures are just not supported with 
cutaway_textures. If this is documented somewhere and I just missed it, 
someone please let me know.

-- 
-The Mildly Infamous Blue Herring


Post a reply to this message


Attachments:
Download 'blob issue 2 - no difference, left right and object textured.png' (34 KB) Download 'blob issue 2 - difference, no cutaway, left right and object textured.png' (34 KB) Download 'blob issue 2 - difference, cutaway, left right and object textured.png' (31 KB) Download 'blob issue 2 - difference, cutaway, left and right textured, object untextured.png' (11 KB)

Preview of image 'blob issue 2 - no difference, left right and object textured.png'
blob issue 2 - no difference, left right and object textured.png

Preview of image 'blob issue 2 - difference, no cutaway, left right and object textured.png'
blob issue 2 - difference, no cutaway, left right and object textured.png

Preview of image 'blob issue 2 - difference, cutaway, left right and object textured.png'
blob issue 2 - difference, cutaway, left right and object textured.png

Preview of image 'blob issue 2 - difference, cutaway, left and right textured, object untextured.png'
blob issue 2 - difference, cutaway, left and right textured, object untextured.png


 

From: Alain
Subject: Re: Blob Issue 2
Date: 2 Sep 2008 13:16:35
Message: <48bd74f3$1@news.povray.org>
Blue Herring nous illumina en ce 2008-09-02 10:16 -->
> Hello,
>   This is the second issue I ran into with blobs lately.  What is 
> happening is that when a blob with individually textured components has 
> something removed using a difference, and the difference uses the 
> "cutaway_textures" option, then the texturing of the components is lost. 
>  What it seems like its doing is reapplying the texture from the object 
> level of the blob, but not the component level.
> 
> An example scene:
> 
> #version 3.61;
> 
> #declare Use_Difference = yes;
> #declare Use_Cutaway = yes;
> #declare Use_Object_Texture = yes;
> #declare Use_Left_Texture = yes;
> 
> #default { finish { ambient 0.1 diffuse 0.9 } }
> 
> #include "colors.inc"
> 
> global_settings {
>   assumed_gamma 1.0
>   max_trace_level 6
> }
> 
> camera {
>   location <0, 4, -7>
>   up y
>   right x * image_width/image_height
>   look_at y * 2
> }
> 
> light_source {
>   <20, 10, -30>, White
> }
> 
> box {
>   <-50, -1, -50>, <50, 50, 10>
>   inverse
>   texture {
>     pigment { White }
>   }
> }
> 
> plane {
>   y, 0
>   texture {
>     pigment {
>       checker White, Black
>       scale <2.5, 1, 2.5>
>     }
>   }
> }
> 
> #declare Glass_F =
>   finish {
>     ambient 0
>     specular 0.9
>     roughness 0.001
>     reflection {
>       0, 1
>       fresnel
>     }
>     conserve_energy
>   }
> 
> #declare Yellow_Glass =
>   texture {
>     pigment { Yellow }
>     finish { Glass_F }
>   }
> 
> #declare Blue_Glass =
>   texture {
>     pigment { Blue }
>     finish { Glass_F }
>   }
> 
> #declare Red_Glass =
>   texture {
>     pigment { Red }
>     finish { Glass_F }
>   }
> 
> #declare Green_Glass =
>   texture {
>     pigment { Green }
>     finish { Glass_F }
>   }
> 
> 
> #declare Obj =
>   blob {
>     threshold 1
> 
>     sphere { <-1.5, 2, 0>, 3.696, 2
>       #if(Use_Left_Texture)
>         texture { Red_Glass }
>       #end
>     }
> 
>     sphere {
>       <1.5, 2, 0>, 3.696, 2
>       texture { Yellow_Glass }
>     }
> 
>     #if(Use_Object_Texture)
>       texture { Blue_Glass }
>     #end
> 
>     interior {
>       ior 1.62725
>     }
>   }
> 
> #if(Use_Difference)
>   #declare Obj =
>     difference {
>       object { Obj }
>       box {
>         <-0.75, -0.75, -10>, <0.75, 0.75, 10>
>         rotate z * 45
>         translate y * 2
>         #if(! Use_Cutaway)
>           texture { Green_Glass }
>         #end
>       }
>       #if(Use_Cutaway)
>         cutaway_textures
>       #end
>       bounded_by {
>         box { min_extent(Obj), max_extent(Obj) }
>       }
>     }
> #end
> 
> object { Obj }
> 
> I've attached some sample images.  The first is just the blob with 
> textures on the left and right components and the object as a whole. The 
> second is a box differenced from the same blob.  The third is the same 
> difference with the cutaway_textures keyword applied.  The last is the 
> same as the third, but the object texture has been removed.  Note the 
> last one generates a parse error about a missing pigment, and the 
> texture looks the be the global default.
> 
> It seems component textures are just not supported with 
> cutaway_textures. If this is documented somewhere and I just missed it, 
> someone please let me know.
> 
>
I have reproduced your problem with both 3.6 and 3.7.

-- 
Alain
-------------------------------------------------
Conquest is not in our principles. It is inconsistent with our government.
Thomas Jefferson


Post a reply to this message

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