POV-Ray : Newsgroups : povray.general : Needed: up & down in normals! Server Time
8 Aug 2024 14:17:50 EDT (-0400)
  Needed: up & down in normals! (Message 1 to 10 of 11)  
Goto Latest 10 Messages Next 1 Messages >>>
From: Greg M  Johnson
Subject: Needed: up & down in normals!
Date: 15 Dec 2000 08:24:14
Message: <3A3A1A19.B90A2BF0@my-dejanews.com>
I have a building texture for a city where I have a texture map:

texture {
   gradient y
    texture_map{
         [0.00 Bricktex]
         [0.35 Bricktex]
         [0.35 BlackGlasstex]
         [0.65 BlackGlasstex]
         [0.65 Bricktex]
         [1.00 Bricktex]
         }
         scale 1/10
       }

The Bricktex defintion includes a normal{bumps scale 0.01} .

I want the BlackGlasstex definition to have its normal be "inny",
"down", or  "flat & depressed"  **RELATIVE** to the bricks.  How do I do
this?

I think it would be wonderful if I could simply say normal{down} .


Post a reply to this message

From: Gilles Tran
Subject: Re: Needed: up & down in normals!
Date: 15 Dec 2000 08:46:58
Message: <3A3A213E.EDA2A82D@inapg.inra.fr>
"Greg M. Johnson" wrote:

> I want the BlackGlasstex definition to have its normal be "inny",
> "down", or  "flat & depressed"  **RELATIVE** to the bricks.  How do I do
> this?
>

It may not be what you're looking for, but specifying negative values for
the bump_size parameter inverts the apparence of the normal.
normal{bumps bump_size -0.5}

G.


Post a reply to this message

From: Christoph Hormann
Subject: Re: Needed: up & down in normals!
Date: 15 Dec 2000 09:30:14
Message: <3A3A2AEB.92A70DA8@gmx.de>
"Greg M. Johnson" wrote:
> [...]
> The Bricktex defintion includes a normal{bumps scale 0.01} .
> 
> I want the BlackGlasstex definition to have its normal be "inny",
> "down", or  "flat & depressed"  **RELATIVE** to the bricks.  How do I do
> this?
> 
> I think it would be wonderful if I could simply say normal{down} .

I'm not sure if i understand what you mean, but have you tried slope_maps?
Furthermore remember that normal{} only changes the normal vector but not
the geometry.  

Christoph

-- 
Christoph Hormann <chr### [at] gmxde>
IsoWood include, radiosity tutorial, TransSkin and other 
things on: http://www.schunter.etc.tu-bs.de/~chris/


Post a reply to this message

From: Greg M  Johnson
Subject: Re: Needed: up & down in normals!
Date: 15 Dec 2000 13:23:32
Message: <3A3A6040.9A128B84@my-dejanews.com>
Christoph Hormann wrote:

> "Greg M. Johnson" wrote:
> > I think it would be wonderful if I could simply say normal{down} .
>
> I'm not sure if i understand what you mean, but have you tried slope_maps?
> Furthermore remember that normal{} only changes the normal vector but not
> the geometry.

Consider this analogy.

Many people might like to use the wrinkles pattern to describe a color map,
where one might ascribe the color "black" to where the function is 0, and
"white" where the function is 1.   Some other people might want an all-black
image. Instead of going through a color_map, they are allowed so simply say
pigment{Black}.  There are situations, mine most acute, where it would be
wonderful to say "normal{down}".  Using an analogy comparing an unideal normal
nomenclature  to pigment, we'd be forcing someone to say:

    pigment{
        gradient y  //or wrinkles
        pigment_map{
            [0 Black]
            [1 Black]
        }}


Post a reply to this message

From: Chris Huff
Subject: Re: Needed: up & down in normals!
Date: 15 Dec 2000 13:54:48
Message: <chrishuff-A7C4B7.13554915122000@news.povray.org>
In article <3A3A6040.9A128B84@my-dejanews.com>, 
gre### [at] my-dejanewscom wrote:

> There are situations, mine most acute, where it would be
> wonderful to say "normal{down}". 

How would this be useful at all?
I suspect that you do not understand how the normal feature works. The 
normal to a surface at each point is a vector with a length of 1 that is 
perpendicular to the surface at that point. The "normal" feature 
generally takes a pattern, figures out how it is changing at that point, 
and modifies the calculated normal using this information. The result is 
that it can simulate the shading of bumps without actually moving the 
surface. It does not define "height", and "normal {down}" doesn't make 
much sense, and I certainly don't see any use for it...

It sounds like you are looking for the slope_map feature, which can do 
some of what you seem to want. However, this was suggested before and 
you ignored it, what doesn't it do that you want? If you need the actual 
shape of the surface to change, try using CSG to actually model those 
situations, or maybe use a height_field object to do the job.

-- 
Christopher James Huff
Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/

<><


Post a reply to this message

From: Greg M  Johnson
Subject: Re: Needed: up & down in normals!
Date: 15 Dec 2000 14:55:03
Message: <3A3A75AB.C699C2C4@my-dejanews.com>
Chris Huff wrote:

> I suspect that you do not understand how the normal feature works.

It's possible.

>  The "normal" feature
> generally takes a pattern, figures out how it is changing at that point,
> and modifies the calculated normal using this information.

Aren't the bright spots "up" and the dark ones "down" ?

> It sounds like you are looking for the slope_map feature, which can do
> some of what you seem to want.

I'd really like to have, as I said,
    texture{
        gradient y
        texture_map{
            [ n1    Texture_1]
            [ n2    Texture_1]
            [ n3    Texture_2]
            [ n4    Texture_2]
        }
    }

Where Texture_1 contains normal{bumps}.

If I use a slope map, I assume I have the following problems:
1. I have to break normal out of the texture_map and instead use pigment_map
and a normal_map: more typing .
2. I'm frequently a adjusting n1,n2,n3.. etc. to get the right look: more
editing in two or three places each time, depending on how I set it up.
3. I don't understand a slope_map when I just want it all to be "down", or
like in the color_map, all black.
   Is the suggestion that I define Texture_2 as:

#declare Texture_2=texture{
    pigment{rgb ....
    finish{ rgb ...
    normal {
      gradient x
      slope_map {
      [0   <-1, 0>]
      [1   <-1,0>]
      }
      }
      }




Hopefully annoying only by my ignorance and not by my disrespect or failure
to RTFM,
greg.


Post a reply to this message

From: Chris Huff
Subject: Re: Needed: up & down in normals!
Date: 15 Dec 2000 15:52:25
Message: <chrishuff-538756.15532515122000@news.povray.org>
In article <3A3A75AB.C699C2C4@my-dejanews.com>, 
gre### [at] my-dejanewscom wrote:

> Aren't the bright spots "up" and the dark ones "down" ?

Nope. The bright spots are facing the light source more, the darker ones 
are facing away from it. Try using multiple light sources, each with a 
different color, and a highlight in your texture.
Or were you talking about the "brightness" of the pattern? Well, the 
answer is still no. Only the change in the pattern matters. For example, 
if you use a "checker" pattern as a normal, only areas along the edges 
of the pattern will have any effect, the "interior" of the cubes will be 
constant, whether they are "black" or "white" cubes. It doesn't modify 
the height of the surface, it just modifies the direction it considers 
"up" at each point. Since the "low" parts will have the same "up" 
direction as the "high" parts, the lighting will be the same for them.


> If I use a slope map, I assume I have the following problems:
> 1. I have to break normal out of the texture_map and instead use 
> pigment_map and a normal_map: more typing .

Yes, it's more typing, but that is how you do it. However, I suspect 
slope_map won't do what you want, because you seem to need large, sharp 
variations in height. You need to actually model the shapes in your 
scene.


> 2. I'm frequently a adjusting n1,n2,n3.. etc. to get the right look: more
> editing in two or three places each time, depending on how I set it up.

Just declare the slope_map and use it in all the textures if you have it 
multiple times.


> 3. I don't understand a slope_map when I just want it all to be "down", 
> or like in the color_map, all black.

Well, that doesn't really mean anything...normals aren't "up" or "down". 
Again, the normal feature is just a way to simulate the effects of small 
surface variations. You need real geometry in your scene.

-- 
Christopher James Huff
Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/

<><


Post a reply to this message

From: Christoph Hormann
Subject: Re: Needed: up & down in normals!
Date: 15 Dec 2000 16:24:58
Message: <3A3A8C2A.9712E1E2@gmx.de>
"Greg M. Johnson" wrote:
> 
> [...]
> I'd really like to have, as I said,
>     texture{
>         gradient y
>         texture_map{
>             [ n1    Texture_1]
>             [ n2    Texture_1]
>             [ n3    Texture_2]
>             [ n4    Texture_2]
>         }
>     }
> 
> Where Texture_1 contains normal{bumps}.
> 
> If I use a slope map, I assume I have the following problems:
> 1. I have to break normal out of the texture_map and instead use pigment_map
> and a normal_map: more typing .
> 2. I'm frequently a adjusting n1,n2,n3.. etc. to get the right look: more
> editing in two or three places each time, depending on how I set it up.
> 3. I don't understand a slope_map when I just want it all to be "down", or
> like in the color_map, all black.
>    Is the suggestion that I define Texture_2 as:
> 
> #declare Texture_2=texture{
>     pigment{rgb ....
>     finish{ rgb ...
>     normal {
>       gradient x
>       slope_map {
>       [0   <-1, 0>]
>       [1   <-1,0>]
>       }
>       }
>       }
> 

I'm no expert in this stuff, but i think in this case it would suffice to
declare one normal like:

    normal{
        gradient y
        normal_map{
            [ n1 bumps 0]
            [ n2 bumps 0]
            [ n3 bumps 1]
            [ n4 bumps 1]
        }
    }

And use it in all textures of the texture_map.  

Christoph

-- 
Christoph Hormann <chr### [at] gmxde>
IsoWood include, radiosity tutorial, TransSkin and other 
things on: http://www.schunter.etc.tu-bs.de/~chris/


Post a reply to this message

From: Warp
Subject: Re: Needed: up & down in normals!
Date: 18 Dec 2000 08:27:21
Message: <3a3e10b9@news.povray.org>
Greg M. Johnson <gre### [at] my-dejanewscom> wrote:
: 3. I don't understand a slope_map

  Then you should learn it, don't you think?

: when I just want it all to be "down"

  That doesn't make any sense.
  How can a normal be "all down"? What does that mean?

  A slope map can have positive and negative slopes (or 0 slopes for that
matter).
  There's no such thing as "slope which is down" or "slope which is up".
Slopes do not express the height of anything. Slopes express the change
in height. There's a difference there.
  A negative slope means that the surface is "going down". It doesn't define
the actual height of the surface.

  If you want a normal pattern at a constant height, then don't define a
normal pattern at all. Then you'll get an unmodified surface normal.

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):_;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

From: Ron Parker
Subject: Re: Needed: up & down in normals!
Date: 20 Dec 2000 14:56:28
Message: <slrn9423nd.i6.ron.parker@fwi.com>
On 18 Dec 2000 08:27:21 -0500, Warp wrote:
>  There's no such thing as "slope which is down" or "slope which is up".
>Slopes do not express the height of anything. Slopes express the change
>in height. There's a difference there.

Just don't anyone mention derivatives and we'll be okay.

-- 
Ron Parker   http://www2.fwi.com/~parkerr/traces.html
My opinions.  Mine.  Not anyone else's.


Post a reply to this message

Goto Latest 10 Messages Next 1 Messages >>>

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