POV-Ray : Newsgroups : povray.newusers : Rendering 3D mesh : Re: Rendering 3D mesh Server Time
2 Jun 2024 14:01:16 EDT (-0400)
  Re: Rendering 3D mesh  
From: Vincent
Date: 19 Oct 2012 01:25:09
Message: <web.5080e35c1e176d5097c1fbff0@news.povray.org>
Alain <kua### [at] videotronca> wrote:

> > Hi,
> >
> > I have a 3D mesh .inc file, including thousands of triangles like this:
> >
> > }
> >    smooth_triangle { // #763945
> >      <1.35632e-019, 1.35632e-019, 1.35632e-019>, <0.0147179, 0.999892,
> > 0.000199087>,
> >      <1.35632e-019, 1.35632e-019, 1.35632e-019>, <0.0147179, 0.999892,
> > 0.000199087>,
> >      <0.000173748, 1.35632e-019, 3.35076e+012>, <1.93994e-005, 0.992192,
> > 0.124723>
> >    }
> >
> >
> >
> >
> >
>
> The format for a smooth triangle is vertex1, normal1, vertex2, normal2,
> vertex3, normal3.
>
> If the inc file start with mesh{ and have a } at it's end, there should
> be no problem.
>
> Let see, this triangle have 2 identical points making it a degenerate
> triangle. Degenerate triangles are not rendered. If I remenmber
> correctly, 1e-19 is smaller than the epsilon value, whitch is a
> thresshold value to truncate to zero.
> Next, you have a point at 3.35e12, whitch is an extremely large value
> (3.35 millions of millions). This can cause the mesh to appear as been
> infinite even if it's not the case, and most of it's triangle degenerate
> and not rendered.
>
> If even one point of a triangle is to far away, it will probably not be
> rendered. Christian proposed scaling your mesh down by 10, 100,... In
> this particular case, you may need to scale down by 1e-7 to 1e-9 to have
> anything... This will make many triangles become sub-pixel in size, even
> if rendered at 16000 by 12000 pixels.
>
> Your range of values going from 1e-19 to 1e12 is extreeme with a
> variation of 31 orders of magnitude. You just can't render such a scene
> without busting the floating point precision limits. Try keeping the
> range of values in your scene within 6 orders of magnitude or less.
>
> Next, when a finite object surround the camera, it often register as
> infinite, as in unboundable. Try rendering this and look at the statistics:
> sphere{0, 30 pigment{bozo} finish{ambient 1}}
> //no camera so use the default one siting at the origin pointing toward +Z.
>
> Try rendering with +q0 on the command line. This will make all texture
> ambient 1 and turn off any light. It's a good debuging tool and rather
> fast. It will make any part shadowed by other to become visible.
>
>
>
>
>
> Alain

Thanks a lot Alian, you and Christian are saying the same thing, and it seems
that it should be the only solution to this problem. I'm working on it...


Post a reply to this message

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