POV-Ray : Newsgroups : povray.general : Why is my POV-Ray render not matching my mesh model? Server Time
28 Oct 2024 08:26:09 EDT (-0400)
  Why is my POV-Ray render not matching my mesh model? (Message 4 to 13 of 13)  
<<< Previous 3 Messages Goto Initial 10 Messages
From: ingo
Subject: Re: Why is my POV-Ray render not matching my mesh model?
Date: 7 Oct 2024 12:55:00
Message: <web.670411383d58ec0e17bac71e8ffb8ce3@news.povray.org>
"Harry Peverell" <har### [at] 163com> wrote:

> Does anyone know what might be causing this discrepancy? Any help would be much
> appreciated!

Does POV-Ray show messages about degenerate triangles?

ingo


Post a reply to this message

From: MichaelJF
Subject: Re: Why is my POV-Ray render not matching my mesh model?
Date: 7 Oct 2024 15:03:37
Message: <67043089$1@news.povray.org>
Am 07.10.2024 um 18:22 schrieb Bald Eagle:
> "Harry Peverell" <har### [at] 163com> wrote:
> 
>> Does anyone know what might be causing this discrepancy? Any help would be much
>> appreciated!
>>
>> Harry
> 
> As jr pointed out, it may be a result of surface normal "flipping".
> 
> I would assign your texture to be something dark, and then add an
> interior_texture with a bright color and finish {emission 1}, then render a
> straight-down view in orthographic to see if you have any flipped triangles.
> 
> You also have some dark areas near the center of the render, which is why I'm
> suggesting this specific approach.
> 
> - BW
> 
This should actually help to recognize flipped normals. I probably 
wouldn't have had this brilliant idea...

But unfortunately, the diagnosis does not yet cure the disease and, as 
far as I know, POV does not offer an option for this. With Blender, 
however, you can display normals and there are several tools to invert them.

Since you are working with Blender anyway, you should repair the mesh 
there and then export it to POV.

Best regards
Michael


Post a reply to this message

From: Thomas de Groot
Subject: Re: Why is my POV-Ray render not matching my mesh model?
Date: 8 Oct 2024 02:14:50
Message: <6704cdda$1@news.povray.org>
Op 07/10/2024 om 21:03 schreef MichaelJF:
> Am 07.10.2024 um 18:22 schrieb Bald Eagle:
>> "Harry Peverell" <har### [at] 163com> wrote:
>>
>>> Does anyone know what might be causing this discrepancy? Any help 
>>> would be much
>>> appreciated!
>>>
>>> Harry
>>
>> As jr pointed out, it may be a result of surface normal "flipping".
>>
>> I would assign your texture to be something dark, and then add an
>> interior_texture with a bright color and finish {emission 1}, then 
>> render a
>> straight-down view in orthographic to see if you have any flipped 
>> triangles.
>>
>> You also have some dark areas near the center of the render, which is 
>> why I'm
>> suggesting this specific approach.
>>
>> - BW
>>
> This should actually help to recognize flipped normals. I probably 
> wouldn't have had this brilliant idea...
> 
> But unfortunately, the diagnosis does not yet cure the disease and, as 
> far as I know, POV does not offer an option for this. With Blender, 
> however, you can display normals and there are several tools to invert 
> them.
> 
> Since you are working with Blender anyway, you should repair the mesh 
> there and then export it to POV.
> 
> Best regards
> Michael

A very straightforward way to correct normal orientations in a mesh is 
with the help of Poseray:

https://sites.google.com/site/poseray/

very easy to use and free (!)  ;-)

-- 
Thomas


Post a reply to this message

From: Harry Peverell
Subject: Re: Why is my POV-Ray render not matching my mesh model?
Date: 9 Oct 2024 08:50:00
Message: <web.67067b443d58ec0e3bb2382ab1b44dfe@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> "Harry Peverell" <har### [at] 163com> wrote:
>
> > Does anyone know what might be causing this discrepancy? Any help would be much
> > appreciated!
> >
> > Harry
>
> As jr pointed out, it may be a result of surface normal "flipping".
>
> I would assign your texture to be something dark, and then add an
> interior_texture with a bright color and finish {emission 1}, then render a
> straight-down view in orthographic to see if you have any flipped triangles.
>
> You also have some dark areas near the center of the render, which is why I'm
> suggesting this specific approach.
>
> - BW
Dear Bw,

Thank you for your detailed suggestion on addressing the issue with the mesh
normals. I appreciate the guidance you've provided.

Initially, I was exporting a .ply file from Blender and converting it to a .pov
file using AccuTrans. I wasn't certain if the normals were preserved in that
conversion process. However, after converting the mesh to an .obj file using
MeshLab and then back to a .pov file with AccuTrans, the rendering errors in
Povray seemed to vanish.

Following your advice, I will now test the mesh to understand the root cause of
the issue. Since I'm working with a .ply file exported from Blender and then
converted to a .pov file, I'm not quite clear on how to assign textures to the
interior and exterior within Povray, especially since I've stripped all textures
from the original mesh in AccuTrans.

Could you please provide some guidance on how to apply textures to the interior
and exterior in Povray? I'm looking forward to implementing your suggestion of
using a dark texture with a bright interior_texture to check for flipped
triangles and to illuminate the dark areas in the center of the render.

Harry


Post a reply to this message

From: Harry Peverell
Subject: Re: Why is my POV-Ray render not matching my mesh model?
Date: 9 Oct 2024 08:50:00
Message: <web.67067ba73d58ec0e3bb2382ab1b44dfe@news.povray.org>
"ingo" <nomail@nomail> wrote:
> "Harry Peverell" <har### [at] 163com> wrote:
>
> > Does anyone know what might be causing this discrepancy? Any help would be much
> > appreciated!
>
> Does POV-Ray show messages about degenerate triangles?
>
> ingo

Thank you for your continued assistance with this issue.

I've checked, and Povray doesn't seem to be showing any messages about
degenerate triangles.

Harry


Post a reply to this message

From: Harry Peverell
Subject: Re: Why is my POV-Ray render not matching my mesh model?
Date: 9 Oct 2024 08:55:00
Message: <web.67067c653d58ec0e3bb2382ab1b44dfe@news.povray.org>
MichaelJF <fri### [at] t-onlinede> wrote:
> Am 07.10.2024 um 18:22 schrieb Bald Eagle:
> > "Harry Peverell" <har### [at] 163com> wrote:
> >
> >> Does anyone know what might be causing this discrepancy? Any help would be much
> >> appreciated!
> >>
> >> Harry
> >
> > As jr pointed out, it may be a result of surface normal "flipping".
> >
> > I would assign your texture to be something dark, and then add an
> > interior_texture with a bright color and finish {emission 1}, then render a
> > straight-down view in orthographic to see if you have any flipped triangles.
> >
> > You also have some dark areas near the center of the render, which is why I'm
> > suggesting this specific approach.
> >
> > - BW
> >
> This should actually help to recognize flipped normals. I probably
> wouldn't have had this brilliant idea...
>
> But unfortunately, the diagnosis does not yet cure the disease and, as
> far as I know, POV does not offer an option for this. With Blender,
> however, you can display normals and there are several tools to invert them.
>
> Since you are working with Blender anyway, you should repair the mesh
> there and then export it to POV.
>
> Best regards
> Michael
Dear Michael

Thank you for your suggestion. I appreciate the thought you've put into this.
Initially, I was using a .ply file exported from Blender and then converted it
to a .pov file using AccuTrans. I wasn't certain if the normals were included in
that process. However, when I converted the mesh to an .obj file using MeshLab
and then back to a .pov file with AccuTrans, the errors in the Povray rendering
mysteriously disappeared. I will now proceed to test the mesh according to your
method to identify the cause of the issue.

As for applying textures in Povray, especially since I've removed all textures
from the original mesh in AccuTrans, I will need to revisit Blender to repair
the mesh there and then export it to POV, as you suggested .

Harry


Post a reply to this message

From: Harry Peverell
Subject: Re: Why is my POV-Ray render not matching my mesh model?
Date: 9 Oct 2024 08:55:00
Message: <web.67067cdc3d58ec0e3bb2382ab1b44dfe@news.povray.org>
Thomas de Groot <tho### [at] degrootorg> wrote:
> Op 07/10/2024 om 21:03 schreef MichaelJF:
> > Am 07.10.2024 um 18:22 schrieb Bald Eagle:
> >> "Harry Peverell" <har### [at] 163com> wrote:
> >>
> >>> Does anyone know what might be causing this discrepancy? Any help
> >>> would be much
> >>> appreciated!
> >>>
> >>> Harry
> >>
> >> As jr pointed out, it may be a result of surface normal "flipping".
> >>
> >> I would assign your texture to be something dark, and then add an
> >> interior_texture with a bright color and finish {emission 1}, then
> >> render a
> >> straight-down view in orthographic to see if you have any flipped
> >> triangles.
> >>
> >> You also have some dark areas near the center of the render, which is
> >> why I'm
> >> suggesting this specific approach.
> >>
> >> - BW
> >>
> > This should actually help to recognize flipped normals. I probably
> > wouldn't have had this brilliant idea...
> >
> > But unfortunately, the diagnosis does not yet cure the disease and, as
> > far as I know, POV does not offer an option for this. With Blender,
> > however, you can display normals and there are several tools to invert
> > them.
> >
> > Since you are working with Blender anyway, you should repair the mesh
> > there and then export it to POV.
> >
> > Best regards
> > Michael
>
> A very straightforward way to correct normal orientations in a mesh is
> with the help of Poseray:
>
> https://sites.google.com/site/poseray/
>
> very easy to use and free (!)  ;-)
>
> --
> Thomas

Thank you for the suggestion and the link to Poseray. I'll check it out and see
how it can assist with correcting normal orientations in the mesh. Appreciate
the help!

Harry


Post a reply to this message

From: Kenneth
Subject: Re: Why is my POV-Ray render not matching my mesh model?
Date: 14 Oct 2024 09:55:00
Message: <web.670d22503d58ec0e91c33a706e066e29@news.povray.org>
"Harry Peverell" <har### [at] 163com> wrote:
>
> Could you please provide some guidance on how to apply textures to the interior
> and exterior in Povray? I'm looking forward to implementing your suggestion of
> using a dark texture with a bright interior_texture to check for flipped
> triangles and to illuminate the dark areas in the center of the render.
>

Like this example (in case you are not using any light sources):

object{ ...your mesh object...
// a dark texture...
texture{pigment{rgb .2} finish{ambient 1 emission 0 diffuse 0}}
                      // or   {ambient 0 emission 1 diffuse 0}}

interior_texture{pigment{rgb <1,0,0>}finish{ambient 1 emission 0 diffuse 0}}
                                     // or {ambient 0 emission 1 diffuse 0}}
                }
      }

(ambient 1 will cause a non-fatal warning message, so use emission 1 instead.)
By the way: The first or main texture is actually applied to both the inner AND
outer surfaces of the mesh object-- unless an interior_texture is added.

IF the problem with your mesh is indeed flipped normals in certain places, the
bright red interior_texture will show them. That's because the 'inside' surfaces
of those triangles are actually facing outward.

(Instead of using an interior_texture, you *could* place a red light_source
*inside* the mesh object, and the lighting on the bad triangles would show up on
the outside. I think!)


Post a reply to this message

From: Bald Eagle
Subject: Re: Why is my POV-Ray render not matching my mesh model?
Date: 14 Oct 2024 13:40:00
Message: <web.670d571c3d58ec0ed5cc4ae625979125@news.povray.org>
"Kenneth" <kdw### [at] gmailcom> wrote:

> (Instead of using an interior_texture, you *could* place a red light_source
> *inside* the mesh object, and the lighting on the bad triangles would show up on
> the outside. I think!)

Very nice insight, Kenneth.
An interesting experiment would be to place 2 light sources of different color
on either side of the mesh.

I also wonder what that would yield if smooth_triangles were rendered, with 1
vertex set "up" or "toward", one perpendicular to the direction / parallel to
the view plane, and one "down" or "away".

- BW


Post a reply to this message

From: Alain Martel
Subject: Re: Why is my POV-Ray render not matching my mesh model?
Date: 14 Oct 2024 13:56:38
Message: <670d5b56$1@news.povray.org>
Le 2024-10-14 à 13:38, Bald Eagle a écrit :

> I also wonder what that would yield if smooth_triangles were rendered, with 1
> vertex set "up" or "toward", one perpendicular to the direction / parallel to
> the view plane, and one "down" or "away".
> 
> - BW
> 

In that case, I would expect the normal to get interpolated between the 
two, causing part of the triangle to be treated as outside and part to 
be treated as inside. So, smaller red triangle or a red trapezoid to be 
visible depending if 1 or 2 of the normals are pointing the wrong way.


Post a reply to this message

<<< Previous 3 Messages Goto Initial 10 Messages

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