POV-Ray : Newsgroups : povray.general : Smooth level for smooth_triangle. : Re: Smooth level for smooth_triangle. Server Time
3 Mar 2024 06:54:04 EST (-0500)
  Re: Smooth level for smooth_triangle.  
From: Bald Eagle
Date: 22 Nov 2023 17:50:00
Message: <web.655e854984c692a31f9dae3025979125@news.povray.org>
"Kenneth" <kdw### [at] gmailcom> wrote:

> converted it to an asci-text STL
> file. The triangles-- or each vertex?-- are of this typical form (not
> 'smooth triangles', as far as I know)...
> facet normal -0.107895597816 -0.696702897549 0.709199249744
>     outer loop
>       vertex 21.3610057831 0.39481022954 -0.11346334219
>       vertex 22.4441795349 0.273843616247 -0.158073753119
>       vertex 22.0666675568 -0.210549205542 0.393470913172
>     endloop

And as you can see, that's about as close to SDL's triangle {} statement as

> In POV-ray, I took the 'facet normal' data/vector and ran it with vlength(...)
> and #debug. It turns out that ALL of the triangles have a unit-length normal:
> <1.000,0.000,0.000>, as vlength reports it.

Well yes.  Those are going to be the final surface normals, and ought to all be
1.0.   The intermediate computations for calculating what the vertex normals of
smooth_triangles are can be anything.  The final normals, however, are almost
always going to get normalized, and so end up as length 1.0.   It's really the
direction of those normals that's going to influence how the light bounces off
of the surface from the light_source to the camera, and show up as either a flat
facet, a smoothly curving surface, or a normal {} pattern.

> [off-topic here but interesting}: The MESHMIXER app (also my CURA 3-D-printing
> app) shows the STL object to have smooth edges-- even though the triangle
> data appears to be 'un-smooth'. I have no idea why. Perhaps those apps are
> automatically creating smooth triangles from the data. (Or maybe interpolating
> the data from the individual vertices?)

Yeah, I think that's just the way they get rendered.  There's likely a setting
that you can turn off, so you can see the raw stl mesh.

- BW

Post a reply to this message

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