|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hello,
I am trying to model my top floor,
At the staircase I try to use difference to remove a part op the floor for the
staircase.
I only get a black intersection, not a transparant one.
What do I do wrong?
Kind regards,
Mark
#include "colors.inc" // The include files contain
#include "textures.inc" // pre-defined scene elements
#include "shapes.inc"
#include "glass.inc"
#include "metals.inc"
#include "stones.inc"
#include "woods.inc"
background { color Cyan }
camera {
location <5.3, 2, -10>
look_at <5.3, 2, -1>
}
difference{
box {
< 0, 0, 0>, // Near lower left corner
< 10.6, -0.30, 5.65> // Far upper right corner
texture { T_Wood1 }
}
box {
< 3.65, 0.1, 3.65>, // Near lower left corner
< 5.65, -0.4, 5.65> // Far upper right corner
}
//pigment { Red }
}
//roof left top part
box {
< 0, 0.0, 0>, // Near lower left corner
< 7.7, 0.2, 5.65> // Far upper right corner
pigment { White }
rotate z*45 // Equivalent to "rotate <0,20,0>"
translate <0, 0, 0>
}
//roof right top part
box {
< 0, 0.0, 0>, // Near lower left corner
< 7.7, -0.2, 5.65> // Far upper right corner
pigment { White }
rotate z*135 // Equivalent to "rotate <0,20,0>"
translate <10.6, 0, 0>
}
box {
< 1.78, 0.0, 0>, // Near lower left corner
< 1.8, 1.8, 5.65> // Far upper right corner
pigment { White }
}
box {
< 8.8, 0.0, 0>, // Near lower left corner
< 8.82, 1.8, 5.65> // Far upper right corner
pigment { White }
}
light_source { <5.3, 2, 5> color White}
light_source { <5.3, 2, -2> color White}
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Wasn't it Mark who wrote:
>Hello,
>
>I am trying to model my top floor,
>At the staircase I try to use difference to remove a part op the floor for the
>staircase.
>I only get a black intersection, not a transparant one.
>
>What do I do wrong?
When you do the difference, the parts of the surface that came from the
second box use the texture that you applied to that second box.
If you want the whole object to have the same texture on all its
surfaces, you can write it like this, with the texture applied to the
whole difference:
difference{
box {
< 0, 0, 0>, // Near lower left corner
< 10.6, -0.30, 5.65> // Far upper right corner
}
box {
< 3.65, 0.1, 3.65>, // Near lower left corner
< 5.65, -0.4, 5.65> // Far upper right corner
}
texture { T_Wood1 }
}
--
Mike Williams
Gentleman of Leisure
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> If you want the whole object to have the same texture on all its
> surfaces, you can write it like this, with the texture applied to the
> whole difference:
Or, just specify cutaway_textures in the difference, which is
useful when the base object is itself composed of multiple parts
and does not have a uniform texture.
Of course, this just solves the black texture, to actually
see something like a hole, move the camera up a bit ;)
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Mark nous apporta ses lumieres en ce 2008/03/17 04:19:
> Hello,
>
> I am trying to model my top floor,
> At the staircase I try to use difference to remove a part op the floor for the
> staircase.
> I only get a black intersection, not a transparant one.
>
> What do I do wrong?
>
> Kind regards,
>
> Mark
>
The difference have the default texture: texture{pigment{rgb 0}finish{ambient
0.1 diffuse 0.6}}}
> difference{
> box {
> < 0, 0, 0>, // Near lower left corner
> < 10.6, -0.30, 5.65> // Far upper right corner
> texture { T_Wood1 }
> }
The outer box have a texture applied.
> box {
> < 3.65, 0.1, 3.65>, // Near lower left corner
> < 5.65, -0.4, 5.65> // Far upper right corner
> }
> //pigment { Red }
> }
>
The cutting box don't have any texture, so it inherit the texture of the whole
difference, and that texture is blakc.
Just apply your texture to the difference, not it's elements.
--
Alain
-------------------------------------------------
When the people fear their government, there is tyranny; when the government
fears the people, there is liberty.
Thomas Jefferson
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|