POV-Ray : Newsgroups : povray.newusers : Rendering 3D mesh Server Time
14 May 2024 12:55:45 EDT (-0400)
  Rendering 3D mesh (Message 1 to 10 of 20)  
Goto Latest 10 Messages Next 10 Messages >>>
From: Vincent
Subject: Rendering 3D mesh
Date: 17 Oct 2012 01:50:07
Message: <web.507e4659dc26c95e97c1fbff0@news.povray.org>
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>
  }


, I know what should I expect by rendering it in POV-ray, but somthing strange
is observed, maybe just 2 or3 triangles.
Could anybody please show me how I can render a mesh in povray?
Do I need to use Mesh in the script in povray?
How I have to decide about the position of camera and light source??
Thanks!
Vincent


Post a reply to this message

From: Anthony D  Baye
Subject: Re: Rendering 3D mesh
Date: 17 Oct 2012 02:55:01
Message: <web.507e55451e176d50d97ee2b90@news.povray.org>
"Vincent" <nomail@nomail> 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>
>   }
>
>
> , I know what should I expect by rendering it in POV-ray, but somthing strange
> is observed, maybe just 2 or3 triangles.
> Could anybody please show me how I can render a mesh in povray?
> Do I need to use Mesh in the script in povray?
> How I have to decide about the position of camera and light source??
> Thanks!
> Vincent

I won't say RTFM... because that would be rude...
I also wish I could be more helpful than just directing you to the
documentation, but I haven't used any mesh objects.

It might help people understand your problem if you posted an image in
povray.binaries.images...

http://www.povray.org/documentation/view/3.6.0/292/
http://www.povray.org/documentation/view/3.6.2/67/
http://wiki.povray.org/content/Reference:Mesh

Happy rendering.

Regards,
A.D.B.


Post a reply to this message

From: Vincent
Subject: Re: Rendering 3D mesh
Date: 17 Oct 2012 19:45:01
Message: <web.507f41a11e176d5097c1fbff0@news.povray.org>
"Anthony D. Baye" <Sha### [at] spamnomorehotmailcom> wrote:
> "Vincent" <nomail@nomail> 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>
> >   }
> >
> >
> > , I know what should I expect by rendering it in POV-ray, but somthing strange
> > is observed, maybe just 2 or3 triangles.
> > Could anybody please show me how I can render a mesh in povray?
> > Do I need to use Mesh in the script in povray?
> > How I have to decide about the position of camera and light source??
> > Thanks!
> > Vincent
>
> I won't say RTFM... because that would be rude...
> I also wish I could be more helpful than just directing you to the
> documentation, but I haven't used any mesh objects.
>
> It might help people understand your problem if you posted an image in
> povray.binaries.images...
>
> http://www.povray.org/documentation/view/3.6.0/292/
> http://www.povray.org/documentation/view/3.6.2/67/
> http://wiki.povray.org/content/Reference:Mesh
>
> Happy rendering.
>
> Regards,
> A.D.B.

Thanks, at least now i know that i have to look for the answer in no place but
the manual (though i already had read the manual). But, the problem is that i
can not add all the triangles in the script (and I think it wouldn't be
necessary), so instead of using the mesh command, I use the #include and then
address the inc file(whihc is converted from STL data set). I think, maybe the
whole object is rendered but the position of the camera and look_at vector are
not correctly choosed. I don't have any idea on chosing the correct place for
the camera.
I used the Poseray, it dosn't give a preview (I recived and error about FLOATING
NUMBER...).
Something is wrong but i don't know what is it.


Post a reply to this message

From: Anthony D  Baye
Subject: Re: Rendering 3D mesh
Date: 17 Oct 2012 19:55:02
Message: <web.507f443f1e176d50d97ee2b90@news.povray.org>
> Thanks, at least now i know that i have to look for the answer in no place but
> the manual (though i already had read the manual). But, the problem is that i
> can not add all the triangles in the script (and I think it wouldn't be
> necessary), so instead of using the mesh command, I use the #include and then
> address the inc file(whihc is converted from STL data set). I think, maybe the
> whole object is rendered but the position of the camera and look_at vector are
> not correctly choosed. I don't have any idea on chosing the correct place for
> the camera.
> I used the Poseray, it dosn't give a preview (I recived and error about FLOATING
> NUMBER...).
> Something is wrong but i don't know what is it.

you might try posting your question in povray.general, but you can't attach
files there either, so you would have to copy the scene file in - I don't
recommend that given that you said it was pretty big - but you could post the
scene files in p.b.s.f and direct people there in your question.

I really do wish I could be more helpful.

Regards,
A.D.B.


Post a reply to this message

From: Christian Froeschlin
Subject: Re: Rendering 3D mesh
Date: 17 Oct 2012 20:52:44
Message: <507f52dc@news.povray.org>
Vincent wrote:

> address the inc file(whihc is converted from STL data set). I think, maybe the
> whole object is rendered but the position of the camera and look_at vector are
> not correctly choosed.

for testing purposes: Wrap all triangles in a union { ... }

give them a texture with ambient finish (and render without radiosity
so you can see the geometry even if lighting is not yet good)

try adding "scale 0.1, scale 0.01, ..." to the union to see if
you can get an overview of where you are in the geometry.

the camera should be looking at the origin from outward for this.


Post a reply to this message

From: Thomas de Groot
Subject: Re: Rendering 3D mesh
Date: 18 Oct 2012 03:30:26
Message: <507fb012@news.povray.org>
On 18-10-2012 1:39, Vincent wrote:
> I used the Poseray, it dosn't give a preview (I recived and error about FLOATING
> NUMBER...).
> Something is wrong but i don't know what is it.

Hint: If Poseray does not show a preview and gives an error, I am afraid 
something is wrong with some of the triangles somewhere...

Try what Christian suggests and see where that gets you.

Thomas


Post a reply to this message

From: Vincent
Subject: Re: Rendering 3D mesh
Date: 18 Oct 2012 04:45:00
Message: <web.507fc1041e176d5097c1fbff0@news.povray.org>
Thomas de Groot <tho### [at] degrootorg> wrote:
> On 18-10-2012 1:39, Vincent wrote:
> > I used the Poseray, it dosn't give a preview (I recived and error about FLOATING
> > NUMBER...).
> > Something is wrong but i don't know what is it.
>
> Hint: If Poseray does not show a preview and gives an error, I am afraid
> something is wrong with some of the triangles somewhere...
>
> Try what Christian suggests and see where that gets you.
>
> Thomas

It's crazy (the mesh)!
I tried the Chrisitan suggestion, but nothing happened, at least not a something
obvious, in some cases I lost the scene.
and I don't think that there would be something wrong with triangles (though I
prefer this one)becuase the STL file is generated by a 3D modeller software.
But interestingly, when i check the scene statisitics, my object has been
recognized as an INFINITE object not a FINITE object, dose it seems rational????
By the way, many thanks for suggestions guys so far.
If I find the solution will inform you.


Post a reply to this message

From: Christian Froeschlin
Subject: Re: Rendering 3D mesh
Date: 18 Oct 2012 14:42:37
Message: <50804d9d$1@news.povray.org>
Vincent wrote:

> and I don't think that there would be something wrong with triangles (though I
> prefer this one)becuase the STL file is generated by a 3D modeller software.


Looking a bit closer I think something is *seriously* wrong with
your triangles

  <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>,

You don't want vertexs anywhere near z= e+012 ... ;)

And the e-019 is also suspicious although it might just
be a 0 with numerical errors.


Post a reply to this message

From: Alain
Subject: Re: Rendering 3D mesh
Date: 18 Oct 2012 22:34:30
Message: <5080bc36$1@news.povray.org>

> 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>
>    }
>
>
> , I know what should I expect by rendering it in POV-ray, but somthing strange
> is observed, maybe just 2 or3 triangles.
> Could anybody please show me how I can render a mesh in povray?
> Do I need to use Mesh in the script in povray?
> How I have to decide about the position of camera and light source??
> Thanks!
> Vincent
>
>

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


Post a reply to this message

From: Vincent
Subject: Re: Rendering 3D mesh
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

Goto Latest 10 Messages Next 10 Messages >>>

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