|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I'm trying to make a room with stucco by subtracting out isosurfaces. As you can
see in this test render, in the room where the camera is located the stucco
renderes as it should. However, the arrows pointing toward the archway show an
area that is subtracted out but is rendering in all black. Anyone encounter
this before with a solution?
Post a reply to this message
Attachments:
Download 'error.jpg' (20 KB)
Preview of image 'error.jpg'
|
|
| |
| |
|
|
|
|
| |
| |
|
|
jhu wrote:
> I'm trying to make a room with stucco by subtracting out isosurfaces. As you can
> see in this test render, in the room where the camera is located the stucco
> renderes as it should. However, the arrows pointing toward the archway show an
> area that is subtracted out but is rendering in all black. Anyone encounter
> this before with a solution?
I'm sure you have your reasons for making an entire house from
isosurfaces! I'd like to see how this turns out :)
Could you show us your code, so we can pin down the cause of the black
areas? The solution could be a simple thing, such as raising the
max_gradient.
Sam
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Here's the relevant code with comments. It's basically a box differenced with
other objects and isosurfaces.
light_source{
<0,1,0>
White
}
camera {
location <0,1.75,0>
look_at <0,1.75,10>
rotate y*-12
translate <1.75,0,-3>
right <450/300,0,0>
}
#declare fn_Pigm=function {
pigment {
agate
color_map {
[0 color rgb 0]
[1 color rgb 1]
}
}
}
difference{
box{<-200,-1,-100>, <200,200,7.5>} //the main room
// the +z room with window
union{
box{<-2.5,-.001,2>, <2.5,10,6>}
difference{ //makes the hole for the door on the +z side of the room
#declare R=5;
#declare H=3;
cylinder{<0,0,5.9>, <0,0,10>, R}
box{<-100, -100, -100>, <-1.25,100, 100>}
box{<1.25, -100, -100>, <100,100, 100>}
box{<-100,-100,-100>, <100, 5-H,100>}
translate y*-R
translate y*H
}
}
//the camera room
box{<-2.5,-.001,-9>, <5,6.0001,1.5>} // room with camera
difference{//makes archway to connect camera room with +z room
cylinder{<0,0,.9>, <0,0,2.1>, 2.5 translate y*1.25}
box{<-100, -100, -100>, <100,-.0001,100>}
}
isosurface{//makes the camera room have stucco
function{(y*y+x*x-2.5*2.5)-fn_Pigm(x*2, y*2, z*2).gray*0.1}
accuracy 0.0001
max_gradient 9
contained_by {box {<-10,-10,.9> <10,10,2.5>}}
translate <0,1.25,0>
pigment{White}
}
isosurface{//makes the camera room have stucco
function{max((y*y-(3*3)),(x*x-(3.75*3.75)),(z*z-(5.25*5.25)))-fn_Pigm(x*2,
y*2, z*2).gray*0.1}
accuracy 0.0001
max_gradient 20
contained_by {box {-20 20}}
pigment{White}
translate <3.75-2.5,3.05,-(5.25-1.5)>
}
//the -x room
box{<-2.49999,-.001,-9>, <2.49999,6.0001,1.5> translate x*(-5.5)}
difference{//make the archway connecting the camera room to the -x room
cylinder{<-5,0,0>, <-2.4,0,0>, 2.5 translate <0,1.25,-1>}
box{<-100, -100, -100>, <100,-.0001,100>}
}
pigment{White}
}
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I can't help but ask why, why not simply normals? it's not even a close up...
there's enough issues with coincident surfaces in plain CSG, put isosurfaces to
the mix and you're asking for trouble...
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"nemesis" <nam### [at] gmailcom> wrote:
> I can't help but ask why, why not simply normals? it's not even a close up...
>
> there's enough issues with coincident surfaces in plain CSG, put isosurfaces to
> the mix and you're asking for trouble...
I was intending to use isosurfaces because they should blend in better,
especially under the arch. With normals (procedural or bump_maps) there's still
a sharp demarcation between the wall and the arch.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> With normals (procedural or bump_maps) there's still
> a sharp demarcation between the wall and the arch.
apply the textures after the transformations.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
jhu napsal(a):
> I'm trying to make a room with stucco by subtracting out isosurfaces. As you can
> see in this test render, in the room where the camera is located the stucco
> renderes as it should. However, the arrows pointing toward the archway show an
> area that is subtracted out but is rendering in all black. Anyone encounter
> this before with a solution?
>
>
>
> ------------------------------------------------------------------------
>
once I had this problem with coincident surfaces. But I can't see any in
your code.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> I'm trying to make a room with stucco by subtracting out isosurfaces. As
> you can
> see in this test render, in the room where the camera is located the
> stucco
> renderes as it should. However, the arrows pointing toward the archway
> show an
> area that is subtracted out but is rendering in all black. Anyone
> encounter
> this before with a solution?
>
Sometimes isosurfaces do that when they are used in
differences. Fortunately you can just put the differences
into the formulas for the isosurfaces...
#include "colors.inc"
global_settings {
assumed_gamma 1
}
background{White}
light_source {
<0,1,0>, color <1,0.9,0.7>
fade_distance 2
fade_power 2
}
light_source {
<0,2.5,10>, White*0.1
shadowless
}
camera {
location <0,1.75,0>
right <450/300,0,0>
look_at <0,1.75,10>
rotate y*-12
translate <1.75,0,-3>
}
#declare fn_Pigm=function {
pigment {
agate
color_map {
[0 color rgb 0]
[1 color rgb 1]
}
}
};
#declare useIso = true;
union {
// floor
box { <-200,-100,-100>, <200,0,7.5>
texture {
pigment {Brown}
finish {
specular 0.8
roughness 0.05
reflection 0.1
}
}
}
// ceiling
box { <-200,10,-100>, <200,200,7.5>
}
// near wall with arch
#if (useIso)
isosurface {
function { max( (abs(z)-0.25),
-min( max( (abs(x)-2.5),
(abs(y+2.5)-2.5)),
(sqrt(pow(x,2) + pow(y,2)) - 2.5)
)
)
+fn_Pigm(x*2, y*2, z*2).gray*0.01 // texture
}
accuracy 0.001
max_gradient 1.43
contained_by {box {<-20,-10,-2>,<20,10,2>} }
translate <0,1.25,1.75>
}
#else
difference {
box { <-200,-10,1.5>,<200,10,2>}
cylinder{<0,1.25,0.9>, <0,1.25,2.1>, 2.5}
box {<-2.5,-10,0.9>,<2.5,1.25,2.1>}
}
#end
// left wall with arch
#if (useIso)
isosurface {
function { max( (abs(x)-0.25),
-min( max( (abs(z)-2.5),
(abs(y+2.5)-2.5)
),
(sqrt(pow(z,2)+pow(y,2))-2.5)
)
)
+fn_Pigm(x*2, y*2, z*2).gray*0.01
}
accuracy 0.001
max_gradient 1.43
contained_by {box {<-1,-10,-20>,<1,10,7.5>} }
translate <-2.75,1.25,-1>
}
#else
difference {
box { <-2.5,-10,-200>,<-3,10,7.5>}
cylinder{<-5,0,0>, <-2.4,0,0>, 2.5 translate <0,1.25,-1>}
}
#end
// right wall
#if (useIso)
isosurface {
function { (abs(x)-0.25)
+fn_Pigm(x*2, y*2, z*2).gray*0.01
}
accuracy 0.001
max_gradient 1.43
contained_by {box {<-1,-10,2>,<1,10,7.5>} }
translate <2.75,0,0>
}
#else
box { <2.5,-10,2>,<3,10,7.5>
}
#end
//far wall with door
#if (useIso)
isosurface {
function { max(
(abs(z)-0.5),
-max(
(sqrt(pow(x,2) + pow(y+2,2)) - 5),
(abs(x)-1.25)
)
)
+fn_Pigm(x*2, y*2, z*2).gray*0.01
}
accuracy 0.001
max_gradient 1.43
contained_by {box {<-20,-10,-1>,<20,10,1>} }
translate <0,0,7>
}
#else
difference {
box { <-200,-10,6>,<200,10,7.5>}
//door
difference {
box {<-1.25,-200,5.9>,<1.25,5,10>}
cylinder {<0,-2,5.9>, <0,-2,10>, 5 inverse}
}
}
#end
texture {
pigment {White}
finish {
specular 0.4
roughness 0.05
}
}
}
Post a reply to this message
Attachments:
Download 'iso_room.jpg' (39 KB)
Preview of image 'iso_room.jpg'
|
|
| |
| |
|
|
|
|
| |
| |
|
|
jhu napsal(a):
> Here's the relevant code with comments. It's basically a box differenced with
> other objects and isosurfaces.
>
> light_source{
> <0,1,0>
> White
> }
> camera {
> location <0,1.75,0>
> look_at <0,1.75,10>
> rotate y*-12
> translate <1.75,0,-3>
> right <450/300,0,0>
> }
>
>
> #declare fn_Pigm=function {
> pigment {
> agate
> color_map {
> [0 color rgb 0]
> [1 color rgb 1]
> }
> }
> }
>
> difference{
> box{<-200,-1,-100>, <200,200,7.5>} //the main room
>
> // the +z room with window
> union{
> box{<-2.5,-.001,2>, <2.5,10,6>}
> difference{ //makes the hole for the door on the +z side of the room
> #declare R=5;
> #declare H=3;
> cylinder{<0,0,5.9>, <0,0,10>, R}
> box{<-100, -100, -100>, <-1.25,100, 100>}
> box{<1.25, -100, -100>, <100,100, 100>}
> box{<-100,-100,-100>, <100, 5-H,100>}
> translate y*-R
> translate y*H
> }
> }
>
> //the camera room
> box{<-2.5,-.001,-9>, <5,6.0001,1.5>} // room with camera
> difference{//makes archway to connect camera room with +z room
> cylinder{<0,0,.9>, <0,0,2.1>, 2.5 translate y*1.25}
> box{<-100, -100, -100>, <100,-.0001,100>}
> }
>
> isosurface{//makes the camera room have stucco
> function{(y*y+x*x-2.5*2.5)-fn_Pigm(x*2, y*2, z*2).gray*0.1}
> accuracy 0.0001
> max_gradient 9
> contained_by {box {<-10,-10,.9> <10,10,2.5>}}
> translate <0,1.25,0>
> pigment{White}
> }
>
>
> isosurface{//makes the camera room have stucco
> function{max((y*y-(3*3)),(x*x-(3.75*3.75)),(z*z-(5.25*5.25)))-fn_Pigm(x*2,
> y*2, z*2).gray*0.1}
> accuracy 0.0001
> max_gradient 20
> contained_by {box {-20 20}}
> pigment{White}
> translate <3.75-2.5,3.05,-(5.25-1.5)>
> }
>
>
> //the -x room
> box{<-2.49999,-.001,-9>, <2.49999,6.0001,1.5> translate x*(-5.5)}
> difference{//make the archway connecting the camera room to the -x room
> cylinder{<-5,0,0>, <-2.4,0,0>, 2.5 translate <0,1.25,-1>}
> box{<-100, -100, -100>, <100,-.0001,100>}
> }
> pigment{White}
> }
>
>
Hello again,
when I removed the stuccos the problem disappeared.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Wow! Thanks for the help and tips. That's some serious isosurface-kung-fu there.
"Tim Attwood" <tim### [at] comcastnet> wrote:
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|