POV-Ray : Newsgroups : povray.pov4.discussion.general : On triangle and smooth_triangle shapes. : Re: On triangle and smooth_triangle shapes. Server Time
16 Apr 2024 06:46:39 EDT (-0400)
  Re: On triangle and smooth_triangle shapes.  
From: Bald Eagle
Date: 12 Nov 2023 22:10:00
Message: <web.6551936d3d3331871f9dae3025979125@news.povray.org>
William F Pokorny <ano### [at] anonymousorg> wrote:

> The bottom two rows are an open question for me. These rows are
> duplicates of the middle two rows except I invert one (or it can be two)
> of the normals. This does cause a degenerate triangle warning, but I
> suddenly get a black result - why the latter? My naive thought is if bad
> normals are the reason for the degenerate condition, the normals should
> all be ignored and the ccw or cw order used instead. I think we should
> get the interior or exterior texture no matter how mangled the normals.

It looks like you might be running into what I discovered here: ?

http://news.povray.org/povray.advanced-users/thread/%3Cweb.5f763c8daf8e23f91f9dae300%40news.povray.org%3E/

I'm guessing that you'll likely have to implement some debugging capability to
output or make visible the normal vectors.

If the normal vector is <0, 0, 0> does that result in a degenerate triangle?
If the normal is zero, very small, or perpendicular to the triangle surface,
wouldn't that result in a black/non-visible triangle?

You might try rendering arrows for the vertex and face normals, and show
warnings/symbols for <0, 0, 0> or <(<threshhold), (<threshhold), (<threshhold)>
normal vectors, and see what that gives you.

Rendering problematic triangles individually, and mapping the surface normals by
interpolating the vertex normals across the face might reveal something wonky
that's hard to do in any other way.

See the excellent link that TOK posted:
https://codeplea.com/triangular-interpolation


- BW


Post a reply to this message

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