POV-Ray : Newsgroups : povray.binaries.images : Rendering issues Server Time
2 Aug 2024 06:20:34 EDT (-0400)
  Rendering issues (Message 5 to 14 of 14)  
<<< Previous 4 Messages Goto Initial 10 Messages
From: jhu
Subject: Re: Rendering issues
Date: 13 Jan 2008 00:55:00
Message: <web.4789a6b16c6c555f7bcf5ca50@news.povray.org>
"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

From: Jan Dvorak
Subject: Re: Rendering issues
Date: 13 Jan 2008 02:20:11
Message: <4789bbab@news.povray.org>
> 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

From: Jan Dvorak
Subject: Re: Rendering issues
Date: 13 Jan 2008 02:42:04
Message: <4789c0cc@news.povray.org>
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

From: Tim Attwood
Subject: Re: Rendering issues
Date: 13 Jan 2008 03:06:56
Message: <4789c6a0@news.povray.org>
> 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'
iso_room.jpg


 

From: Jan Dvorak
Subject: Re: Rendering issues
Date: 13 Jan 2008 03:08:31
Message: <4789c6ff@news.povray.org>
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

From: jhu
Subject: Re: Rendering issues
Date: 13 Jan 2008 11:00:00
Message: <web.478a35636c6c555f7bcf5ca50@news.povray.org>
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

From: Alain
Subject: Re: Rendering issues
Date: 13 Jan 2008 13:00:16
Message: <478a51b0@news.povray.org>
nemesis nous apporta ses lumieres en ce 2008/01/12 22:28:
> 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...
> 
> 
Normals would give you different results, the sadows would be different, as well 
as the continuation between the different surfaces. That's even if you apply the 
normals to the object as a whole. Even at this scale you'd have large difference.

-- 
Alain
-------------------------------------------------
REMEMBER: WHATEVER HAPPENS, HAPPENS FOR A REASON.


Post a reply to this message

From: stbenge
Subject: Re: Rendering issues
Date: 13 Jan 2008 18:27:13
Message: <478a9e51@news.povray.org>
jhu wrote:
> Wow! Thanks for the help and tips. That's some serious isosurface-kung-fu there.

I think Tim gave you the best solution to your problem, so I'll take 
this opportunity to slip out the door :)

Sam


Post a reply to this message

From: jhu
Subject: Re: Rendering issues
Date: 14 Jan 2008 21:45:00
Message: <web.478c1d756c6c555f7bcf5ca50@news.povray.org>
I think I'm going to give up on the isosurface room. Rendering takes way too
long especially with area lights and radiosity. On the other hand, I did get to
finally learn how to use these things.

BTW, is there an isosurface to mesh2 conversion utility?


Post a reply to this message

From: Mike Williams
Subject: Re: Rendering issues
Date: 14 Jan 2008 22:09:49
Message: <Ex3K+BCWHCjHFw8h@econym.demon.co.uk>
Wasn't it jhu who wrote:

>BTW, is there an isosurface to mesh2 conversion utility?

There's Kevin Loney's Approximation Macro. It's rather slow but you only 
need to run it once, then you can save the mesh.

http://www.econym.demon.co.uk/isotut/approx.htm

If you can rewrite your isosurface as a parametric, then you can use 
Ingo Janssen's Param.Inc, which is much faster.

http://www.econym.demon.co.uk/isotut/param.htm

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

<<< Previous 4 Messages Goto Initial 10 Messages

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