POV-Ray : Newsgroups : povray.general : Normal vs. smooth triangle mesh Server Time
1 Nov 2024 06:16:45 EDT (-0400)
  Normal vs. smooth triangle mesh (Message 1 to 6 of 6)  
From: Greg M  Johnson
Subject: Normal vs. smooth triangle mesh
Date: 23 Aug 2000 08:41:34
Message: <39A3C544.CD6E741F@my-dejanews.com>
I have been unable to get normals to show up on a DXF object that I
imported into pov (as a smooth triangle mesh? I think) using 3DWin.
Is there some trick to this?

Also, how can I get something to work like (yes, asked question 2-3
times before, not satisfied)

    normal{
        gradient x
        normal_map{
            [0.0    down]
            [0.2    down]
            [0.21    up]
            [1.0    up]
            }
    }

I find the SLOPE map to be pretty much useless, I'm not worried about
slope, I just want it UP in some places and DOWN in others, to my
specification.


Post a reply to this message

From: Warp
Subject: Re: Normal vs. smooth triangle mesh
Date: 23 Aug 2000 09:33:10
Message: <39a3d296@news.povray.org>
Greg M. Johnson <gre### [at] my-dejanewscom> wrote:
: I have been unable to get normals to show up on a DXF object that I
: imported into pov (as a smooth triangle mesh? I think) using 3DWin.
: Is there some trick to this?

  Are you sure they are smooth_triangles? Have you checked the contents
of the file the program exports?

: Also, how can I get something to work like (yes, asked question 2-3
: times before, not satisfied)

:     normal{
:         gradient x
:         normal_map{
:             [0.0    down]
:             [0.2    down]
:             [0.21    up]
:             [1.0    up]
:             }
:     }

: I find the SLOPE map to be pretty much useless, I'm not worried about
: slope, I just want it UP in some places and DOWN in others, to my
: specification.

  But that's exactly what slope maps are for. Your example would be something
like:

normal
{ gradient x 1  // note that your example lacks this "amount" number
  slope_map
  { [0.0 <1,-1>]
    [0.2 <0,-1>]
    [0.21 <0,1>]
    [1.0 <1,1>]
  }
}

  The two numbers in the 2D-vector have the following meaning:

  - The first number is the "height" of the surface at that point (of course
    only the apparent height). I don't remember if the allowed range for this
    value was from 0 to 1 or if you can go outside that range, but 0-1 will
    suffice for most things.

  - The second number is the "slope" of the surface at that point (again,
    only the apparent slope).
    0 means unmodified surface normal, a positive value means upwards slope and
    a negative value means downwards slope. (As with all slopes, this value
    is the tangent of the angle, that is, a value of 1 would mean a slope of
    45 degrees and -1 would mean a slope of -45 degrees.)

  So what does this:

[0.0 <1,-1>]
[0.2 <0,-1>]
[0.21 <0,1>]
[1.0 <1,1>]

mean?

  - At a pattern value 0 the surface "height" will be at 1 (ie. like 1 unit
"above" the actual surface) and the "slope" of the surface will be 45 degrees
down.
  - At a pattern value of 0.2 the "height" will be at 0 (like at the height
of the actual surface) and the "slope" will still be 45 degrees down.
  - At a pattern value of 0.21 the "height" is 0 but now the "slope" will be
45 degrees up.
  - And finally at value 1 we are back to "height" 1 with "slope" of 45
degrees up.

-- 
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: Greg M  Johnson
Subject: Re: Normal vs. smooth triangle mesh
Date: 23 Aug 2000 09:49:29
Message: <39A3D52D.DB29E3FD@my-dejanews.com>
Warp wrote:

> Greg M. Johnson <gre### [at] my-dejanewscom> wrote:
> : I have been unable to get normals to show up on a DXF object that I
> : imported into pov (as a smooth triangle mesh? I think) using 3DWin.
> : Is there some trick to this?
>
>   Are you sure they are smooth_triangles? Have you checked the contents
> of the file the program exports?

Will check later. This makes a difference?

> normal
> { gradient x 1  // note that your example lacks this "amount" number
>   slope_map
>   { [0.0 <1,-1>]
>     [0.2 <0,-1>]
>     [0.21 <0,1>]
>     [1.0 <1,1>]
>   }
> }

Wow, thanks much for the explanation.  My brain may have been trying to force a
different meaning on these two numbers.
Maybe part of my problem was the lacking of this "amount number".  Is "1" good
enough for all cases?


Post a reply to this message

From: Chris Huff
Subject: Re: Normal vs. smooth triangle mesh
Date: 23 Aug 2000 10:18:00
Message: <chrishuff-D61BCE.09192323082000@news.povray.org>
In article <39A3D52D.DB29E3FD@my-dejanews.com>, 
gre### [at] my-dejanewscom wrote:

> Maybe part of my problem was the lacking of this "amount number".  Is 
> "1" good enough for all cases?

It is just the "depth" of the normal, I think "bump_size" does the exact 
same thing. I think 1 is the default value, adjust it to whatever depth 
you want.

-- 
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: Normal vs. smooth triangle mesh
Date: 23 Aug 2000 13:38:56
Message: <39A40AFF.A863FD3A@my-dejanews.com>
I checked during lunch and it was a smooth_triangle.  But with your advice I got a
wonderful texture.   Is there some reason not to use smooth_triangle?

Warp wrote:

> Greg M. Johnson <gre### [at] my-dejanewscom> wrote:
> : I have been unable to get normals to show up on a DXF object that I
> : imported into pov (as a smooth triangle mesh? I think) using 3DWin.
> : Is there some trick to this?
>
>   Are you sure they are smooth_triangles? Have you checked the contents
> of the file the program exports?


Post a reply to this message

From: Chris Huff
Subject: Re: Normal vs. smooth triangle mesh
Date: 23 Aug 2000 14:22:05
Message: <chrishuff-464259.13232923082000@news.povray.org>
In article <39A40AFF.A863FD3A@my-dejanews.com>, 
gre### [at] my-dejanewscom wrote:

> I checked during lunch and it was a smooth_triangle.  But with your 
> advice I got a wonderful texture.   Is there some reason not to use 
> smooth_triangle?

The smooth_triangle primitive is simply a triangle with per-vertex 
normals which get interpolated across the surface...it is probably 
slightly slower than ordinary triangles(which don't have to do 
interpolation of normals), takes extra memory for the extra normals, and 
isn't any more useful than ordinary triangles for some objects.

-- 
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

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