![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
http://www.cs.tut.fi/~warp/TesselationPatch/
--
char*i="b[7FK@`3NB6>B:b3O6>:B:b3O6><`3:;8:6f733:>::b?7B>:>^B>C73;S1";
main(_,c,m){for(m=32;c=*i++-49;c&m?puts(""):m)for(_=(
c/4)&7;putchar(m),_--?m:(_=(1<<(c&3))-1,(m^=3)&3););} /*- Warp -*/
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Warp wrote:
>
> http://www.cs.tut.fi/~warp/TesselationPatch/
Thanks ! Successfully compiled on Linux...
Just some other testing you probably already did:
With the Bug example you give on your site, there are a lot
of degenerate triangles in the created mesh, although from your code
it should not be. By degenerate here, I only mean "triangles with
two or more identical vertex indices". Adding "offset 0.001" remove
the bug and there are no more degenerate triangles.
I don't have any degenerate triangles with the other working
example scene given.
I supect the problem is how you generate the mesh using the
hashing function. I'm currently investigating that stuff.
BTW, I added that to the example to get the degenerate
triangles, thanks to your own patch ;-)
//------------
#declare m = tesselate{...}
#local ntri = get_triangle_count(m);
#local i=0;
#while(i<ntri)
#local vert = get_vertex_indices(m,i);
#render concat(str(vert.x,0,0)," ",
str(vert.y,0,0)," ",
str(vert.z,0,0),"\n")
#local i=i+1;
#end
*** Nicolas Calimet
*** http://pov4grasp.free.fr
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
So, is it the existence of degenerate triangles that is the cause of the
'bug'?
Jim
"Nicolas Calimet" <pov### [at] free fr> wrote in message
news:3A661765.DE18EBAF@free.fr...
> Warp wrote:
> >
> > http://www.cs.tut.fi/~warp/TesselationPatch/
>
> Thanks ! Successfully compiled on Linux...
>
> Just some other testing you probably already did:
>
> With the Bug example you give on your site, there are a lot
> of degenerate triangles in the created mesh, although from your code
> it should not be. By degenerate here, I only mean "triangles with
> two or more identical vertex indices". Adding "offset 0.001" remove
> the bug and there are no more degenerate triangles.
> I don't have any degenerate triangles with the other working
> example scene given.
>
> I supect the problem is how you generate the mesh using the
> hashing function. I'm currently investigating that stuff.
>
> BTW, I added that to the example to get the degenerate
> triangles, thanks to your own patch ;-)
>
> //------------
> #declare m = tesselate{...}
>
> #local ntri = get_triangle_count(m);
> #local i=0;
>
> #while(i<ntri)
> #local vert = get_vertex_indices(m,i);
> #render concat(str(vert.x,0,0)," ",
> str(vert.y,0,0)," ",
> str(vert.z,0,0),"\n")
> #local i=i+1;
> #end
>
>
> *** Nicolas Calimet
> *** http://pov4grasp.free.fr
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Nicolas Calimet <pov### [at] free fr> wrote:
: Adding "offset 0.001" remove the bug
You seem to be right.
This could give a hint about what is the bug. I have to examine it keeping
this in mind.
Right now, however, I don't have the slightest idea why the offset value
would affect this. There must be a logical explanation, but I wonder what
is it...
--
char*i="b[7FK@`3NB6>B:b3O6>:B:b3O6><`3:;8:6f733:>::b?7B>:>^B>C73;S1";
main(_,c,m){for(m=32;c=*i++-49;c&m?puts(""):m)for(_=(
c/4)&7;putchar(m),_--?m:(_=(1<<(c&3))-1,(m^=3)&3););} /*- Warp -*/
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
> So, is it the existence of degenerate triangles that is the cause of the
> 'bug'?
Actually -unfortunately- not.
When adding an "offset 1e-10" to the tesselate{} block as
mentionned earlier (but with a much lower value), the holes in the
mesh disappear while there are still a lot of "degenerate" triangles
(that are not rendered anyway).
So the bug is more likely a problem of accuracy in the
tesselation calc rather than in actual mesh construction (where the
code is the same as in Parse_Mesh, but reorganized in a more readable
style by Warp). Could it be a problem of finding the Intersection in
very particular cases ? Didn't find it yet...
*** Nicolas Calimet
*** http://pov4grasp.free.fr
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
I tried it out and found that it does not seem to work with method 2
isosurfaces.
Christoph
--
Christoph Hormann <chr### [at] gmx de>
IsoWood include, radiosity tutorial, TransSkin and other
things on: http://www.schunter.etc.tu-bs.de/~chris/
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Christoph Hormann <chr### [at] gmx de> wrote:
: I tried it out and found that it does not seem to work with method 2
: isosurfaces.
The only requirements the patch needs from the object to be tesselated
is that the Inside_Object() function works properly (that is, the object
is solid and that function returns properly the information whether a point
is inside it or not) and also the Intersection() function works (this should
work for every object; if it didn't, it wouldn't be possible to raytrace it
at all).
I don't know how method 2 isosurfaces work, but I suppose that the problem
is in its Inside_Object() function.
--
char*i="b[7FK@`3NB6>B:b3O6>:B:b3O6><`3:;8:6f733:>::b?7B>:>^B>C73;S1";
main(_,c,m){for(m=32;c=*i++-49;c&m?puts(""):m)for(_=(
c/4)&7;putchar(m),_--?m:(_=(1<<(c&3))-1,(m^=3)&3););} /*- Warp -*/
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Warp wrote:
>
> The only requirements the patch needs from the object to be tesselated
> is that the Inside_Object() function works properly (that is, the object
> is solid and that function returns properly the information whether a point
> is inside it or not) and also the Intersection() function works (this should
> work for every object; if it didn't, it wouldn't be possible to raytrace it
> at all).
> I don't know how method 2 isosurfaces work, but I suppose that the problem
> is in its Inside_Object() function.
>
I just rechecked it again and it did no more crash although i did not
change anything. Anyway it still won't tesselate the method 2 version,
because it says:
error: Can't tesselate object. (Perhaps too low accuracy?)
*after* running tesselation.
Christoph
--
Christoph Hormann <chr### [at] gmx de>
IsoWood include, radiosity tutorial, TransSkin and other
things on: http://www.schunter.etc.tu-bs.de/~chris/
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
In article <3a686a3e@news.povray.org>, Warp <war### [at] tag povray org>
wrote:
> I don't know how method 2 isosurfaces work, but I suppose that the
> problem is in its Inside_Object() function.
Actually, I think people have also had problems with using trace() on
method 2 isosurfaces...maybe a global or some initialization that
prevents intersection calculation from working at parse time. The
isosurface code is messy...there are several globals that might cause
this problem.
--
Christopher James Huff
Personal: chr### [at] mac com, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tag povray org, http://tag.povray.org/
<><
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Chris Huff <chr### [at] mac com> wrote:
: Actually, I think people have also had problems with using trace() on
: method 2 isosurfaces...
Well, that would explain why it can't be tesselated. Tesselation does
(among other things) the same as trace(), that is, shoots rays at parse time.
So if trace() doesn't work, neither will the tesselation.
--
char*i="b[7FK@`3NB6>B:b3O6>:B:b3O6><`3:;8:6f733:>::b?7B>:>^B>C73;S1";
main(_,c,m){for(m=32;c=*i++-49;c&m?puts(""):m)for(_=(
c/4)&7;putchar(m),_--?m:(_=(1<<(c&3))-1,(m^=3)&3););} /*- Warp -*/
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |