POV-Ray : Newsgroups : povray.newusers : Weird side-effect of wrinkles in a normal... : Weird side-effect of wrinkles in a normal... Server Time
29 Jul 2024 18:17:09 EDT (-0400)
  Weird side-effect of wrinkles in a normal...  
From: JYR
Date: 8 May 2005 20:25:00
Message: <web.427ea840bc5bff406a3607400@news.povray.org>
Hi everybody!
I attempted to use "wrinkles" in a "normal" statement to give a rough finish
to the outer walls of some imaginary building. It is constructed
recursively and implies that its modules be rotated by 0, 90, 180, 270
degrees around the y-axis to take place at each corner. Now, i noticed a
slight difference in the appearance of the different modules. Investigating
further, i gathered the following minimal source to demonstrate a strange
behaviour...

//--------------------------------------------------
#version 3.6;

global_settings {assumed_gamma 1.0}

#declare degre=3;
#declare pdd=pow(2,degre);

camera {
    location  <-.25*pdd, .85*pdd, -1.6*pdd>
    look_at   (2-pdd)*y
}

light_source {<-500, 260, -240> rgb 1}

#macro cell (n)
    box {-n, n}
    texture {
        pigment {rgb 1}
        normal {wrinkles  scale .2}
    }
#end //macro cell (n)

#macro pyramide (n)
    #if (n=1)
        object {cell (1)}
    #else
        union {
            #local quadrant=0;
            #while (quadrant<4)
                object {
                    pyramide (n-1)
                    translate -pow(2,n-1)/2
                    rotate quadrant*90*y
                }
                #local quadrant=quadrant+1;
            #end //while
        }
    #end //if
#end //macro pyramide (n)

object {pyramide (degre)}

//--------------------------------------------------

You should see 16 distinct cubes grouped together, some of them much lighter
than the others. Yet stranger: if i set #version to 3.1, the 16 cubes
suddenly appear as one solid stone slab, as i expected them to. With
#version set to 3.2 or higher, the difference in color shows up. I tried to
change "noise_generator" to no avail.

Using POV-Ray for Windows, version 3.6.1a.icl8.win32, straight from the
official download site.

Any insight or explanation would be greatly appreciated!!!

J-Y

PS : a preview of said imaginary building is posted in p.b.i ...


Post a reply to this message

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