POV-Ray : Newsgroups : povray.binaries.images : The brick size in normals. Server Time
26 Apr 2024 02:24:27 EDT (-0400)
  The brick size in normals. (Message 1 to 8 of 8)  
From: LanuHum
Subject: The brick size in normals.
Date: 8 May 2016 02:10:01
Message: <web.572ed7046734ae347a3e03fe0@news.povray.org>
Problem.
If I use custom brick_size I have the incorrect image.

#version 3.7;

#include "functions.inc"
global_settings {
    assumed_gamma 1.000000
    max_trace_level 3
    charset utf8
}
sky_sphere {
    pigment {rgb<0.050, 0.050, 0.050>}
}

#declare Default_texture = texture{pigment {rgb 0.8}}

#declare Material = texture{
    pigment{color srgbft <0.8000,0.8000,0.8000,0.0000,0.0000>}
    normal{ brick 0.9000
        brick_size <0.2500,0.0525,0.1250> mortar 0.0100
        warp {planar z 1}
        translate <0.0000,0.0000,0.0000>
        rotate <0.0000,0.0000,0.0000>
        scale <1.0000,1.0000,1.0000>
        }
    finish{
        diffuse 0.8000
        brilliance 1.8000
        crand 0.0000
        emission 0.0000
        ambient <0.0000,0.0000,0.0000>
          }
}
#declare data_Plane_dec =
mesh2 {
    vertex_vectors {
    4
    <-1.000000,-1.000000,0.000000>
    <1.000000,-1.000000,0.000000>
    <-1.000000,1.000000,0.000000>
    <1.000000,1.000000,0.000000>
    }
    normal_vectors {
    2
    <-0.000000,0.000000,1.000000>
    <0.000000,0.000000,1.000000>
    }
    uv_vectors {
    4
    <0.000100, 0.000100>
    <0.000100, 0.999900>
    <0.999900, 0.000100>
    <0.999900, 0.999900>
    }
    texture_list {
    1
    texture {Material}
    }
    face_indices {
    2
    <1,3,2>,0,0,0
    <0,1,2>,0,0,0
    }
    normal_indices {
    2
    <0,0,0>
    <1,1,1>
    }
    uv_indices {
    2
    <2,3,1>
    <0,2,1>
}
}

object {data_Plane_dec
    matrix <3.003955, 0.000000, 0.000000,  0.000000, -0.000000, -3.003955,
0.000000, 3.003955, -0.000000,  0.000000, 0.000000, 0.000000>
}

light_source {
    <5.07,5.58,4.28>
    color rgb<1, 1, 1>
    fade_distance 25.0000000000
    fade_power 1
}
camera {
    perspective
    location  <0,0,0>
    look_at  <0,0,-1>
    right <-1.7777777777777777, 0, 0>
    up <0, 1, 0>
    angle  49.134343
    rotate  <-27.098163, 46.688390, -0.903519>
    translate <7.481132, 5.343666, 6.507640>
}


Post a reply to this message


Attachments:
Download 'custom_brick_size.jpg' (102 KB)

Preview of image 'custom_brick_size.jpg'
custom_brick_size.jpg


 

From: Jaime Vives Piqueres
Subject: Re: The brick size in normals.
Date: 8 May 2016 03:20:39
Message: <572ee8c7@news.povray.org>

> Problem. If I use custom brick_size I have the incorrect image.
>

 From http://www.povray.org/documentation/view/3.7.0/368/ :

"The bricks are offset by half a brick length on every other row in the
x- and z-directions."

   Thant means it will only look good on the x-y and z-y planes. If you
want it to show correctly on the x-z plane, you should rotate it (i.e.
rotate 90*x).

--
jaime


Post a reply to this message

From: LanuHum
Subject: Re: The brick size in normals.
Date: 8 May 2016 04:40:01
Message: <web.572efa7ad3c58d897a3e03fe0@news.povray.org>
Jaime Vives Piqueres <jai### [at] ignoranciaorg> wrote:

> > Problem. If I use custom brick_size I have the incorrect image.
> >
>
>  From http://www.povray.org/documentation/view/3.7.0/368/ :
>
> "The bricks are offset by half a brick length on every other row in the
> x- and z-directions."
>
>    Thant means it will only look good on the x-y and z-y planes. If you
> want it to show correctly on the x-z plane, you should rotate it (i.e.
> rotate 90*x).
>
> --
> jaime

The source code is written above. Turn, please, and show!
I already overwound everything. I tried to use uv_mapping, warp planar (x,y,z)
rotate(x,y,z,xy,xz,yz,xyz)


Post a reply to this message

From: Jaime Vives Piqueres
Subject: Re: The brick size in normals.
Date: 8 May 2016 09:34:04
Message: <572f404c$1@news.povray.org>

> The source code is written above. Turn, please, and show! I already
> overwound everything. I tried to use uv_mapping, warp planar (x,y,z)
> rotate(x,y,z,xy,xz,yz,xyz)
>

   I was wrong... you are already applying correctly the normal, but it
seems like the brick pattern isn't behaving correctly on a normal statement.

   Using this one:

#declare Material = texture{
     pigment{brick brick_size <0.2500,0.0525,0.1250> mortar 0.0100}
     finish{
         diffuse 0.8000
         brilliance 1.8000
         crand 0.0000
         emission 0.0000
         ambient <0.0000,0.0000,0.0000>
           }
}

   the pigment shows correctly.

   But adding a matching normal:

#declare Material = texture{
     pigment{brick brick_size <0.2500,0.0525,0.1250> mortar 0.0100}
     normal{brick brick_size <0.2500,0.0525,0.1250> mortar 0.0100}
     finish{
         diffuse 0.8000
         brilliance 1.8000
         crand 0.0000
         emission 0.0000
         ambient <0.0000,0.0000,0.0000>
           }
}

   the result shows a mismatched normal. Don't know why... I think I used
this on the past and it worked fine.

--
jaime


Post a reply to this message

From: clipka
Subject: Re: The brick size in normals.
Date: 8 May 2016 10:00:10
Message: <572f466a@news.povray.org>
Am 08.05.2016 um 08:04 schrieb LanuHum:
> Problem.
> If I use custom brick_size I have the incorrect image.
...
> #declare Material = texture{
>     pigment{color srgbft <0.8000,0.8000,0.8000,0.0000,0.0000>}
>     normal{ brick 0.9000
>         brick_size <0.2500,0.0525,0.1250> mortar 0.0100

To compute normal perturbations for most patterns, POV-Ray samples the
pattern at 4 points in the vicinity of the surface point.

Obviously, the distance between those 4 sample points is not infinitely
small; as a matter of fact, it is in the order of magnitude of 0.02. As
you will notice, your brick_size parameters are close to that value.

To get the desired effect, it is sufficient to increase the brick_size
and mortar values, and instead make use of "scale" to get the desired size.


Post a reply to this message

From: LanuHum
Subject: Re: The brick size in normals.
Date: 8 May 2016 11:30:00
Message: <web.572f5ab1d3c58d897a3e03fe0@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
> Am 08.05.2016 um 08:04 schrieb LanuHum:
> > Problem.
> > If I use custom brick_size I have the incorrect image.
> ...
> > #declare Material = texture{
> >     pigment{color srgbft <0.8000,0.8000,0.8000,0.0000,0.0000>}
> >     normal{ brick 0.9000
> >         brick_size <0.2500,0.0525,0.1250> mortar 0.0100
>
> To compute normal perturbations for most patterns, POV-Ray samples the
> pattern at 4 points in the vicinity of the surface point.
>
> Obviously, the distance between those 4 sample points is not infinitely
> small; as a matter of fact, it is in the order of magnitude of 0.02. As
> you will notice, your brick_size parameters are close to that value.
>
> To get the desired effect, it is sufficient to increase the brick_size
> and mortar values, and instead make use of "scale" to get the desired size.


Your recommendations don't work. Please, give me the working source code for
study.


Post a reply to this message

From: clipka
Subject: Re: The brick size in normals.
Date: 8 May 2016 11:41:52
Message: <572f5e40$1@news.povray.org>
Am 08.05.2016 um 17:26 schrieb LanuHum:
> clipka <ano### [at] anonymousorg> wrote:
>> Am 08.05.2016 um 08:04 schrieb LanuHum:
>>> Problem.
>>> If I use custom brick_size I have the incorrect image.
>> ...
>>> #declare Material = texture{
>>>     pigment{color srgbft <0.8000,0.8000,0.8000,0.0000,0.0000>}
>>>     normal{ brick 0.9000
>>>         brick_size <0.2500,0.0525,0.1250> mortar 0.0100
>>
>> To compute normal perturbations for most patterns, POV-Ray samples the
>> pattern at 4 points in the vicinity of the surface point.
>>
>> Obviously, the distance between those 4 sample points is not infinitely
>> small; as a matter of fact, it is in the order of magnitude of 0.02. As
>> you will notice, your brick_size parameters are close to that value.
>>
>> To get the desired effect, it is sufficient to increase the brick_size
>> and mortar values, and instead make use of "scale" to get the desired size.
> 
> 
> Your recommendations don't work. Please, give me the working source code for
> study.

My recommendations *do* work; I know because I tested them. You may have
difficulty understanding or implementing them, that's all.

    #declare BRICK_SCALE = 10;
    brick_size <0.2500,0.0525,0.1250> * BRICK_SCALE
    mortar 0.0100 * BRICK_SCALE
    ...
    scale 1/BRICK_SCALE

does the trick.


Post a reply to this message

From: LanuHum
Subject: Re: The brick size in normals.
Date: 8 May 2016 13:30:01
Message: <web.572f777ad3c58d897a3e03fe0@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:

>
> My recommendations *do* work; I know because I tested them. You may have
> difficulty understanding or implementing them, that's all.
>
>     #declare BRICK_SCALE = 10;
>     brick_size <0.2500,0.0525,0.1250> * BRICK_SCALE
>     mortar 0.0100 * BRICK_SCALE
>     ...
>     scale 1/BRICK_SCALE
>
> does the trick.

5 or 10: how I could guess?

#declare BRICK_SCALE = 4;
#declare BRICK_SCALE = 40;
Very small it is necessary to multiply for 1000 or 10000. :)

Thank you!


Post a reply to this message


Attachments:
Download 'scale.jpg' (111 KB)

Preview of image 'scale.jpg'
scale.jpg


 

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