POV-Ray : Newsgroups : povray.newusers : difficulties rendering hexagonal crystal group : Re: difficulties rendering hexagonal crystal group Server Time
28 Jul 2024 14:18:30 EDT (-0400)
  Re: difficulties rendering hexagonal crystal group  
From: Bob
Date: 16 Mar 2009 19:19:53
Message: <49bede99$1@news.povray.org>
"engelbert_buxbaum" <eng### [at] hotmailcom> wrote in message 
news:web.49be542b519610b7604827740@news.povray.org...
> Both the hexagonal crystal and the cut-out hexagon render fine by 
> themselfs, but
> in combination the crystal looses colour, also, the surface of the crystal 
> in
> contact with the cut-out becomes invisible. I have fiddled with lighting 
> and
> optical properties of the bodies for days, but I just don't get it. Any 
> ideas?

You might want to use clipped_by {} instead of difference{}, that way the 
faces of the cutout part won't show at all.
And, if you can use it, changing background to white or something other than 
black seems to make this show better, likewise no_shadow could help not 
confuse the shape.
I tried the following with changed filter colors to transmit colors:

#declare Hexagonal =
      intersection{
         object{ Hexagon
               }
         object{ Hexagon
                   translate <0, 0.58, 1>
               }
         texture
            { pigment {color rgbt <0.1, 0.15, 0.5, 0.7> }         // blue
              finish { ambient 0.5 diffuse 0.1 phong 0.2 }
             }
         interior
             { refraction on
               ior 1.0
               fade_color <0.1, 0.15, 0.5>
               fade_distance 2//10
               fade_power 2//0.2
             }
      }

#declare CutOut =
     //difference{
         object{ Hexagon
              // }
              clipped_by{
         object{ Hexagon inverse
                   scale 1.001
                   translate <0, 0.58, 1>
                                       }
                                       }
         texture
               { pigment {color rgbt <0.2, 0.2, 0.2, 0.7> }         // grey
                 finish { ambient 0.5 diffuse 0.1 phong 0.05 }
               }
         interior
             { refraction on
               ior 1.0
               fade_color <0.2, 0.2, 0.2>
               fade_distance 2//10
               fade_power 2//0.2
             }
     }

background {<1,1,1>}

You hadn't given the fade_* a color so I used the ones from pigments, also 
making the distance less and power more.
This shows the crystal parts, with color fading, like I think you're trying 
to do. Main thing is probably that clipped_by being added (with inverse on 
object).

Hopefully that's some help to you. Oh, and not sure from the quick look at 
it but I when I moved one of the parts once while checking on it the 
position didn't seem to relate to the axis arrows. Maybe just my 
perception...

Bob H.


Post a reply to this message

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