|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> 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.
That *is* weird. It looks like rotating the cubes is causing the normal
pattern to respond to light differently.
- Slime
[ http://www.slimeland.com/ ]
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Wasn't it JYR who wrote:
>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...
I don't know why it happens, but if you're interested in a workround,
it's possible to arrange rotate the normals in the opposite direction to
the rotation of the quadrants, so that the cubes rotate but the wrinkles
don't.
#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,Rot)
box {-n, n}
texture {
pigment {rgb 1}
normal {wrinkles scale .2 rotate -Rot*90*y}
}
#end //macro cell (n)
#macro pyramide (n,Rot)
#if (n=1)
object {cell (1,Rot)}
#else
union {
#local quadrant=0;
#while (quadrant<4)
object {
pyramide (n-1,Rot+quadrant)
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,0)}
--
Mike Williams
Gentleman of Leisure
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> Any insight or explanation would be greatly appreciated!!!
>
> J-Y
>
> PS : a preview of said imaginary building is posted in p.b.i ...
No big insight, except that it might be related to the original normal
perturbation function used by wrinkles. Try substituting
pigment_pattern{wrinkles} or function{f_wrinkles(x,y,z)} (along with
functions.inc) for wrinkles. It's not a perfect solution, but at least it
is close.
Abe
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Abe" <bul### [at] taconicnet> wrote:
> No big insight, except that it might be related to the original normal
> perturbation function used by wrinkles. Try substituting
> pigment_pattern{wrinkles} or function{f_wrinkles(x,y,z)} (along with
> functions.inc) for wrinkles. It's not a perfect solution, but at least it
> is close.
>
> Abe
Thanks to all for your answers! Abe, "pigment_pattern{wrinkles}" works just
fine. I really didn't think of converting a pattern initially created for
normal (ditto POV-Ray manual, 3.5.11.37) into a pigment pattern to use it
in a normal. And even better: i think your workaround makes a better rough
wall finish than directly applying a "wrinkles" normal pattern.
I can now go on with my scene, but I guess that leaves the following issue
open: "is it a bug or a feature?" ;-)
J-Y
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|