POV-Ray : Newsgroups : povray.binaries.images : 'Accidental' isosurface Server Time
5 Jul 2025 17:54:07 EDT (-0400)
  'Accidental' isosurface (Message 41 to 50 of 68)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: PM 2Ring
Subject: Re: 'Accidental' isosurface
Date: 27 Nov 2009 20:50:00
Message: <web.4b1081b2ce81d185f4c648ed0@news.povray.org>
Warp <war### [at] tagpovrayorg> wrote:
> PM 2Ring wrote:
> > I found the Marching Cubes C code
>
>   AFAIK the Marching Triangles algorithm produces meshes of much higher
> quality than Marching Cubes.
>
>   Marching Cubes tends to produce randomly-sized triangles and very thin
> triangles whose size is in no way related to the shape, and it doesn't
> take into account the curvature of the surface being tesselated.
>
>   Marching Triangles, on the other hand, produces nice about
> evenly-sized triangles for surfaces with the same curvature, and does so
> adaptively, ie. producing smaller triangles at high curvature places and
> larger triangles at low curvature places. The end result (when eg.
> rendered as a wireframe) tends to look a lot more pleasing.

That sounds great, Warp. But after over an hour of searching for Marching
Triangles code, I haven't located anything yet, not even pseudocode. :( Do you
have any suggestions for where I should look? I have found some articles in PDF
format, but I haven't downloaded any of them to check if they contain source
code.


Post a reply to this message

From: Fredrik Eriksson
Subject: Re: 'Accidental' isosurface
Date: 27 Nov 2009 20:59:11
Message: <op.u320412a7bxctx@bigfrog.bredbandsbolaget.se>
On Sat, 28 Nov 2009 02:49:38 +0100, PM 2Ring <nomail@nomail> wrote:
>
> That sounds great, Warp. But after over an hour of searching for Marching
> Triangles code, I haven't located anything yet, not even pseudocode. :(  
> Do you have any suggestions for where I should look? I have found some
> articles in PDF format, but I haven't downloaded any of them to check if
> they contain source code.

http://en.wikipedia.org/wiki/Marching_tetrahedrons

The Wikipedia article links to:
http://local.wasp.uwa.edu.au/~pbourke/geometry/polygonise/#tetra



-- 
FE


Post a reply to this message

From: Alain
Subject: Re: 'Accidental' isosurface
Date: 27 Nov 2009 21:15:31
Message: <4b1087c3$1@news.povray.org>

> Alain <aze### [at] qwertyorg> wrote:
> 
>> If you want to make it glass or metallic, you need to change a few
>> things for the DF3 way:
>> Outside value: 16
>> Inside value: 200
>> This is to get rid of the overshot artefacts you can get with the
>> interpolation. Interpolate 2 realy don't work well when you have sharp
>> jumps to zero and 255.
>>
>> Use interpolate 2
>> Gives you a nice smooth, curvy, interpolation.
> 
> Thanks for the suggestion, Alain. It does look better, but it needs a much
> higher max_gradient. And I noticed some strange artifacts when rendering a
> simple cubical frame with interpolate 2, even though all the outer voxels in my
> cube df3 are supposed to be outside the surface.
> 
> FWIW, the metallic Mandelbulb I posted was done using a mesh produced by
> Marching Cubes.
> 

If the values reach zero or the highest possible value (255 for 8 bits), 
  you get overshots, and those results in warping around the resulting 
values from your density_map. If you go to zero, you get areas that will 
eroneously use the entry for 1 on the density map. If you go to 255, you 
get areas that will use the values for zero, or close to zero.

That's why I told tou to restrict the range of values used.



Alain


Post a reply to this message

From: PM 2Ring
Subject: Re: 'Accidental' isosurface
Date: 27 Nov 2009 21:25:00
Message: <web.4b1089c8ce81d185f4c648ed0@news.povray.org>
"Fredrik Eriksson" <fe79}--at--{yahoo}--dot--{com> wrote:
> On Sat, 28 Nov 2009 02:49:38 +0100, PM 2Ring <nomail@nomail> wrote:
> >
> > That sounds great, Warp. But after over an hour of searching for Marching
> > Triangles code, I haven't located anything yet, not even pseudocode. :(
>
> http://en.wikipedia.org/wiki/Marching_tetrahedrons
>
> The Wikipedia article links to:
> http://local.wasp.uwa.edu.au/~pbourke/geometry/polygonise/#tetra

Thanks, Fredrik, but I've already seen those links. Marching Tetrahedrons is a
slight improvenent on Marching Cubes, but Marching Triangles appears to be quite
a different algorithm, with adaptive triangle sizes.


Post a reply to this message

From: PM 2Ring
Subject: Re: 'Accidental' isosurface
Date: 27 Nov 2009 21:35:01
Message: <web.4b108b70ce81d185f4c648ed0@news.povray.org>
Alain <aze### [at] qwertyorg> wrote:

> >> If you want to make it glass or metallic, you need to change a few
> >> things for the DF3 way:
> >> Outside value: 16
> >> Inside value: 200
> >> This is to get rid of the overshot artefacts you can get with the
> >> interpolation. Interpolate 2 realy don't work well when you have sharp
> >> jumps to zero and 255.

>
> If the values reach zero or the highest possible value (255 for 8 bits),
>   you get overshots, and those results in warping around the resulting
> values from your density_map. If you go to zero, you get areas that will
> eroneously use the entry for 1 on the density map. If you go to 255, you
> get areas that will use the values for zero, or close to zero.
>
> That's why I told you to restrict the range of values used.

I understand, Alain, and I have restricted the values: my df3 test files only
use 16 & 200 (I used tr to translate my existing files). But I still get these
artifacts. I didn't bother saving an image, but I'll generate a new one, if
you'd like to see for yourself.


Post a reply to this message

From: Fredrik Eriksson
Subject: Re: 'Accidental' isosurface
Date: 27 Nov 2009 21:59:25
Message: <op.u323xgyj7bxctx@bigfrog.bredbandsbolaget.se>
On Sat, 28 Nov 2009 03:24:08 +0100, PM 2Ring <nomail@nomail> wrote:
>
> Marching Tetrahedrons is a slight improvenent on Marching Cubes,
> but Marching Triangles appears to be quite a different algorithm,
> with adaptive triangle sizes.

Source code for that does seem to be scarce, but the original article (by  
Hilton & Illingworth) has a pretty detailed stepwise description of the  
algorithm. It should not be to difficult to work from that.



-- 
FE


Post a reply to this message

From: Tor Olav Kristensen
Subject: Re: 'Accidental' isosurface
Date: 28 Nov 2009 07:04:40
Message: <4b1111d8@news.povray.org>
PM 2Ring wrote:
...
> That sounds great, Warp. But after over an hour of searching for Marching
> Triangles code, I haven't located anything yet, not even pseudocode. :( Do you
> have any suggestions for where I should look?
...

You can find some code in this thread:

http://news.povray.org/povray.binaries.scene-files/thread/%3C47be20ab%40news.povray.org%3E/

Subject: "Isosurface Approximation macros rewrite"	
From: Tor Olav Kristensen
Date: 22 Feb 2008 01:08:59

-- 
Tor Olav
http://subcube.com


Post a reply to this message

From: PM 2Ring
Subject: Re: 'Accidental' isosurface
Date: 28 Nov 2009 13:10:00
Message: <web.4b116755ce81d185f4c648ed0@news.povray.org>
Tor Olav Kristensen <tor### [at] TOBEREMOVEDgmailcom> wrote:
> PM 2Ring wrote:
> ...
> > That sounds great, Warp. But after over an hour of searching for Marching
> > Triangles code, I haven't located anything yet, not even pseudocode. :( Do you
> > have any suggestions for where I should look?
> ...
>
> You can find some code in this thread:

Thanks, Tor Olav. I'll have a look at it when I wake up. :)


Post a reply to this message

From: Tor Olav Kristensen
Subject: Re: 'Accidental' isosurface
Date: 29 Nov 2009 07:17:51
Message: <4b12666f@news.povray.org>
PM 2Ring wrote:
> Tor Olav Kristensen <tor### [at] TOBEREMOVEDgmailcom> wrote:
>> PM 2Ring wrote:
>> ...
>>> That sounds great, Warp. But after over an hour of searching for Marching
>>> Triangles code, I haven't located anything yet, not even pseudocode. :( Do you
>>> have any suggestions for where I should look?
>> ...
>>
>> You can find some code in this thread:
> 
> Thanks, Tor Olav. I'll have a look at it when I wake up. :)

I see from your answer to Fredrik that it is not Marching Tetrahedrons you're after,
so what I linked to is probably not relevant for you.

-- 
Tor Olav
http://subcube.com


Post a reply to this message

From: PM 2Ring
Subject: Re: 'Accidental' isosurface
Date: 29 Nov 2009 23:15:01
Message: <web.4b134639ce81d185f4c648ed0@news.povray.org>
Tor Olav Kristensen <tor### [at] TOBEREMOVEDgmailcom> wrote:
> PM 2Ring wrote:
> > Tor Olav Kristensen <tor### [at] TOBEREMOVEDgmailcom> wrote:
> >> PM 2Ring wrote:
> >> ...
> >>> That sounds great, Warp. But after over an hour of searching for Marching
> >>> Triangles code, I haven't located anything yet, not even pseudocode. :( Do you
> >>> have any suggestions for where I should look?
> >> ...
> >>
> >> You can find some code in this thread:
> >
> > Thanks, Tor Olav. I'll have a look at it when I wake up. :)
>
> I see from your answer to Fredrik that it is not Marching Tetrahedrons you're after,
> so what I linked to is probably not relevant for you.
>
> --
> Tor Olav
> http://subcube.com

That's OK. Once I had a look at the code, I realized it wasn't Marching
Triangles, but decided to try it out anyway. The meshes it produces do look
better than Marching Cubes, but of course it is very slow on large data sets,
being in POV SDL rather than C. Especially with recursion depth of 3 or more.

FWIW, in one of my tests I got an error message from POV saying that a normal
vector can't be <0,0,0>.


Post a reply to this message

<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>

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