![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
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](/povray.binaries.images/attachment/%3C48bd4ab6%40news.povray.org%3E/blob%20issue%202%20-%20no%20difference%2C%20left%20right%20and%20object%20textured.png?ttop=443866&toff=3050&preview=1)
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](/povray.binaries.images/attachment/%3C48bd4ab6%40news.povray.org%3E/blob%20issue%202%20-%20difference%2C%20no%20cutaway%2C%20left%20right%20and%20object%20textured.png?ttop=443866&toff=3050&preview=1)
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](/povray.binaries.images/attachment/%3C48bd4ab6%40news.povray.org%3E/blob%20issue%202%20-%20difference%2C%20cutaway%2C%20left%20right%20and%20object%20textured.png?ttop=443866&toff=3050&preview=1)
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](/povray.binaries.images/attachment/%3C48bd4ab6%40news.povray.org%3E/blob%20issue%202%20-%20difference%2C%20cutaway%2C%20left%20and%20right%20textured%2C%20object%20untextured.png?ttop=443866&toff=3050&preview=1)
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |