POV-Ray : Newsgroups : povray.general : about #debug Server Time
6 Apr 2026 17:29:01 EDT (-0400)
  about #debug (Message 1 to 10 of 20)  
Goto Latest 10 Messages Next 10 Messages >>>
From: GioSeregni
Subject: about #debug
Date: 3 Apr 2026 05:50:00
Message: <web.69cf8c4f965a714211f50c6059126100@news.povray.org>
Hi all,
I'd already gone a bit off-topic in another thread and preferred not to go into
further detail because I'm working on my own transformation software and
filtering between various formats, including POV and INC files.
I use models for two purposes: both to build and populate my architectural
previews and the shapes for 3D printing. Online models are almost always huge
and full of bugs; by working across different formats, I clean them up,
streamline them, and enhance them. In short, I make them suitable for both the
total rendering memory and the precision required for 3D printing.
In POV-ray, two main errors often occur, which POV-ray reports. Typically:
1) normals at 0,0,0 in smooth triangles. This means the triangles are actually
three vertices in a line (and this entity should be removed).
2) nonexistent triangle (again, this means two vertices coincide).
I can use other exchange programs to find these elements and correct them. But
could I do this with POV-ray?
I've studied the #debug feature a bit, but I don't understand. Is there a way to
tell PovRay to generate a file with only the incorrect entities, or to rewrite
my file to clean them up?
It would save me some often long and tedious work.
Thanks in advanced!
G.


Post a reply to this message

From: jr
Subject: Re: about #debug
Date: 3 Apr 2026 08:05:00
Message: <web.69cfac7ff5eb3fcd48bf72fa6cde94f1@news.povray.org>
hi,

"GioSeregni" <gms### [at] hotmailcom> wrote:
> ...
> In POV-ray, two main errors often occur, which POV-ray reports. Typically:
> 1) normals at 0,0,0 in smooth triangles. This means the triangles are actually
> three vertices in a line (and this entity should be removed).
> 2) nonexistent triangle (again, this means two vertices coincide).
> I can use other exchange programs to find these elements and correct them. But
> could I do this with POV-ray?
> I've studied the #debug feature a bit, but I don't understand. Is there a way to
> tell PovRay to generate a file with only the incorrect entities, or to rewrite
> my file to clean them up?

I think the 'trace' function may be useful to you.
<wiki.povray.org/content/Reference:Vector_Expressions#Functions>


regards, jr.


Post a reply to this message

From: GioSeregni
Subject: Re: about #debug
Date: 3 Apr 2026 10:15:00
Message: <web.69cfcb36f5eb3fcd11f50c6059126100@news.povray.org>
"jr" <cre### [at] gmailcom> wrote:
> hi,
>
> "GioSeregni" <gms### [at] hotmailcom> wrote:
> > ...
> > In POV-ray, two main errors often occur, which POV-ray reports. Typically:
> > 1) normals at 0,0,0 in smooth triangles. This means the triangles are actually
> > three vertices in a line (and this entity should be removed).
> > 2) nonexistent triangle (again, this means two vertices coincide).
> > I can use other exchange programs to find these elements and correct them. But
> > could I do this with POV-ray?
> > I've studied the #debug feature a bit, but I don't understand. Is there a way to
> > tell PovRay to generate a file with only the incorrect entities, or to rewrite
> > my file to clean them up?
>
> I think the 'trace' function may be useful to you.
> <wiki.povray.org/content/Reference:Vector_Expressions#Functions>
>
>
> regards, jr.
thanks, I don't know if I am right, but I think I understand that with that
function I can automatically correct rendering errors. Is that right?
I'd like PovRay to intervene by filtering out nonexistent elements INTO my file,
thus saving me from having to filter out all the normals or zero-surface
triangles and recompile its file.
These things happen because with double float sometimes very small values
​​differ from each other and everything is fine, but then, when for
various reasons I happen to work and pass values ​​in single
precision, the problem arises.
I can fix them, but it would be faster if when POV found them he cleaned the
file for me

BR
G.


Post a reply to this message

From: jr
Subject: Re: about #debug
Date: 3 Apr 2026 11:55:00
Message: <web.69cfe1aef5eb3fcd48bf72fa6cde94f1@news.povray.org>
hi, "GioSeregni" <gms### [at] hotmailcom> wrote:
> "jr" <cre### [at] gmailcom> wrote:
> ...
> thanks, I don't know if I am right, but I think I understand that with that
> function ['trace'] I can automatically correct rendering errors. Is that right?
> I'd like PovRay to intervene by filtering out nonexistent elements INTO my file,
> thus saving me from having to filter out all the normals or zero-surface
> triangles and recompile its file.

perhaps it is me who misunderstands.  you are talking export POV -> yourFormat ?
 (I had thought the other way round)

re 'trace', yes, you can use the optional parameter to check the normal's not
zero and take whatever "action" is needed.

re duplicate vertices, it might be easier to revise the generating scene such
that duplicates cannot occur rather than trying to "weed them out".


> I can fix them, but it would be faster if when POV found them he cleaned the
> file for me

it would be helpful to see a pared-down scene, perhaps part of the generated
data.


regards, jr.


Post a reply to this message

From: GioSeregni
Subject: Re: about #debug
Date: 3 Apr 2026 14:15:00
Message: <web.69d00355f5eb3fcd11f50c6059126100@news.povray.org>
> re 'trace', yes, you can use the optional parameter to check the normal's not
> zero and take whatever "action" is needed.
>

sorry I can't explain myself well in English
I don't need that POV to "fixes" the errors in the final render, or give me an
error message step by step over the lines.
I'd like two alternatives.
A precise report on "where" the errors are (es. list numbers line).
Or the elimination of corrupt triangles, physically, by overwriting the file I
pass it.
My goal is to generate clean meshes.
Thanks!
G.


Post a reply to this message

From: MichaelJF
Subject: Re: about #debug
Date: 3 Apr 2026 14:44:52
Message: <69d00aa4@news.povray.org>
Am 03.04.26 um 20:13 schrieb GioSeregni:
> 
>> re 'trace', yes, you can use the optional parameter to check the normal's not
>> zero and take whatever "action" is needed.
>>
> 
> sorry I can't explain myself well in English
> I don't need that POV to "fixes" the errors in the final render, or give me an
> error message step by step over the lines.
> I'd like two alternatives.
> A precise report on "where" the errors are (es. list numbers line).
> Or the elimination of corrupt triangles, physically, by overwriting the file I
> pass it.
> My goal is to generate clean meshes.
> Thanks!
> G.
> 
> 
I fear there more than one misunderstanding here.

POV cannot debug meshes. The #debug statement displays messages to the 
log only. It can be helpful while debugging a scene but does nothing 
more than displaying text.

To fill holes, eliminate duplicate vertices, adjust wrong normals and do 
other repairs on meshes ypu should consider meshlab. Some of these tasks 
can also be achieved using Blender.

Best regards
Michael


Post a reply to this message

From: jr
Subject: Re: about #debug
Date: 3 Apr 2026 14:50:00
Message: <web.69d00a99f5eb3fcd48bf72fa6cde94f1@news.povray.org>
hi,

"GioSeregni" <gms### [at] hotmailcom> wrote:
> > re 'trace', yes, you can use the optional parameter to check the normal's not
> > zero and take whatever "action" is needed.
> sorry I can't explain myself well in English

write (an email) in Italian if you prefer.  (I've Google Translate to hand :-))


> I don't need that POV to "fixes" the errors in the final render, or give me an
> error message step by step over the lines.
> I'd like two alternatives.
> A precise report on "where" the errors are (es. list numbers line).
> Or the elimination of corrupt triangles, physically, by overwriting the file I
> pass it.
> My goal is to generate clean meshes.

the file you pass to POV-Ray already is a mesh I assume; I looked at your
'furgone' and 'bmwvintage' files.  problem 1 -- you pass a mesh to POV-Ray.
meaning, that will simply get parsed and "we" (users) get no information.
problem 2 -- selective overwriting, no can do.  if you could pass CSV files with
(sets of three) vectors, then one could read and process those, and "line
numbers" and eliminating unwanted triangles would become "doable" (if slow).
with your current file format, ie fully specified meshes, POV-Ray is the wrong
tool, imo.


regards, jr.


Post a reply to this message

From: GioSeregni
Subject: Re: about #debug
Date: 3 Apr 2026 17:30:00
Message: <web.69d03070f5eb3fcd11f50c6059126100@news.povray.org>
> (sets of three) vectors, then one could read and process those, and "line
> numbers" and eliminating unwanted triangles would become "doable" (if slow).
> with your current file format, ie fully specified meshes, POV-Ray is the wrong
> tool, imo.
>
>
> regards, jr.

Yes, POV-ray isn't responsible for editing files, but for rendering them.
But I had the idea because it can instantly identify small errors in the shape
that I'd missed when switching from double to single. So I wondered if there was
a way to have it list or correct them without having to go back and re-filter
again.....

Note :In the models I finally store, I generally save the final result in single
float with 4 decimal places.
If they're POV or INC, they're more compact and still satisfactory. If they're
3D for print, even more so, because STL requires single float.
thanks!
BR
G.


Post a reply to this message

From: Bald Eagle
Subject: Re: about #debug
Date: 6 Apr 2026 08:10:00
Message: <web.69d3a1f0f5eb3fcdda82d88b25979125@news.povray.org>
Gio,

It sounds to me like what you want to do is read in a mesh, and perform a vector
cross product calculation.

That should identify any degenerate triangles, since the cross product will be
0.

Discard those, and write the good triangles to a new file.

- BE


Post a reply to this message

From: GioSeregni
Subject: Re: about #debug
Date: 6 Apr 2026 09:10:00
Message: <web.69d3af95f5eb3fcdb9ac97ab59126100@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> Gio,
>
> It sounds to me like what you want to do is read in a mesh, and perform a vector
> cross product calculation.
>
> That should identify any degenerate triangles, since the cross product will be
> 0.
>
> Discard those, and write the good triangles to a new file.
>
> - BE
That's what I already do. I wanted to know if, alternatively (when I go from a
double float with area to a single float that becomes arealess), when POV
automatically detects and marks them, it can also do this in the file.

To avoid reprocessing all the normals in the single float.
TX
G.


Post a reply to this message

Goto Latest 10 Messages Next 10 Messages >>>

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