POV-Ray : Newsgroups : povray.unofficial.patches : Tesselation patch v. 0.1alpha Server Time
1 Sep 2024 16:19:58 EDT (-0400)
  Tesselation patch v. 0.1alpha (Message 1 to 10 of 21)  
Goto Latest 10 Messages Next 10 Messages >>>
From: Warp
Subject: Tesselation patch v. 0.1alpha
Date: 17 Jan 2001 13:14:13
Message: <3a65e0f4@news.povray.org>
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

From: Nicolas Calimet
Subject: Re: Tesselation patch v. 0.1alpha
Date: 17 Jan 2001 15:51:57
Message: <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

From: Jim Kress
Subject: Re: Tesselation patch v. 0.1alpha
Date: 17 Jan 2001 23:30:18
Message: <3a66715a$1@news.povray.org>
So, is it the existence of degenerate triangles that is the cause of the
'bug'?

Jim

"Nicolas Calimet" <pov### [at] freefr> 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

From: Warp
Subject: Re: Tesselation patch v. 0.1alpha
Date: 18 Jan 2001 06:08:23
Message: <3a66cea6@news.povray.org>
Nicolas Calimet <pov### [at] freefr> 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

From: Nicolas Calimet
Subject: Re: Tesselation patch v. 0.1alpha
Date: 18 Jan 2001 12:25:10
Message: <3A673868.2070AE15@free.fr>
> 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

From: Christoph Hormann
Subject: Re: Tesselation patch v. 0.1alpha
Date: 19 Jan 2001 09:14:10
Message: <3A684BB1.353D705F@gmx.de>
I tried it out and found that it does not seem to work with method 2
isosurfaces.  

Christoph

-- 
Christoph Hormann <chr### [at] gmxde>
IsoWood include, radiosity tutorial, TransSkin and other 
things on: http://www.schunter.etc.tu-bs.de/~chris/


Post a reply to this message

From: Warp
Subject: Re: Tesselation patch v. 0.1alpha
Date: 19 Jan 2001 11:24:31
Message: <3a686a3e@news.povray.org>
Christoph Hormann <chr### [at] gmxde> 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

From: Christoph Hormann
Subject: Re: Tesselation patch v. 0.1alpha
Date: 19 Jan 2001 12:56:15
Message: <3A687FBE.93BFCCE8@gmx.de>
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] gmxde>
IsoWood include, radiosity tutorial, TransSkin and other 
things on: http://www.schunter.etc.tu-bs.de/~chris/


Post a reply to this message

From: Chris Huff
Subject: Re: Tesselation patch v. 0.1alpha
Date: 19 Jan 2001 13:10:45
Message: <chrishuff-FA6BD4.13115119012001@news.povray.org>
In article <3a686a3e@news.povray.org>, Warp <war### [at] tagpovrayorg> 
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] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/

<><


Post a reply to this message

From: Warp
Subject: Re: Tesselation patch v. 0.1alpha
Date: 19 Jan 2001 13:43:00
Message: <3a688ab4@news.povray.org>
Chris Huff <chr### [at] maccom> 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

Goto Latest 10 Messages Next 10 Messages >>>

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