POV-Ray : Newsgroups : povray.binaries.images : Isosurface approximation MkII Server Time
13 Aug 2024 11:20:09 EDT (-0400)
  Isosurface approximation MkII (Message 1 to 10 of 11)  
Goto Latest 10 Messages Next 1 Messages >>>
From: Kevin Loney
Subject: Isosurface approximation MkII
Date: 9 Apr 2003 18:27:09
Message: <3e949e3d@news.povray.org>
Made some slight changes, and it took a whole minute less then the last
version to parse and render. I added support for smooth triangles but you
have to provide all the formulae for the normal computatiom, so I'll be
looking at a way to fix that, any suggestions would be appreciated. Still
haven't added a save mesh feature yet, thats one of the next changes I plan
on making.

--
Kevin
http://www.geocities.com/qsquared_1999/
#macro _(r)#if(r<12)#local i=asc(substr("oqshilacefg"
,r,1))-97;disc{<mod(i,7)-3,div(i,7)-1,6>,z,.4
pigment{rgb 10}}_(r+1)#end#end _(1)//KL


Post a reply to this message


Attachments:
Download 'field-2.jpg' (66 KB)

Preview of image 'field-2.jpg'
field-2.jpg


 

From: Tim Nikias v2 0
Subject: Re: Isosurface approximation MkII
Date: 9 Apr 2003 19:00:13
Message: <3e94a5fd$2@news.povray.org>
If you can predict which new triangles will be joining
the mesh, you could calculate for each triangle-corner the
surrounding triangles also touching that corner, gather
the surface-normals of all of these triangles, and average
it for the smooth-normal. Aside of that, you could perhaps
trace() the isosurface itself and gather the normal from that,
obviously, you should have an isosurface present. It'll
take a longer parsing time, sure, but you'll end up with a mesh
which you can render fast in trials.

--
Tim Nikias v2.0
Homepage: http://www.digitaltwilight.de/no_lights
Email: Tim### [at] gmxde


Post a reply to this message

From: Kevin Loney
Subject: Re: Isosurface approximation MkII
Date: 9 Apr 2003 19:58:27
Message: <3e94b3a3@news.povray.org>
I considered using trace(), but then decided against it because of the fact
each vertex is only an approximation of the iso and will not neccesarily be
right where it's supposed to be. By using trace() the normal approximation
could be off by a lot resulting in a really strange shading. I would use the
average of the neighboring faces but since I'm not storing them that could
cause just a bit of a problem. I've been looking into ways of approximating
it based on the function supplied, I think I have an idea of how to do this,
but I'm not sure yet, but thanks for the suggestions.

--
Kevin
http://www.geocities.com/qsquared_1999/
#macro _(r)#if(r<12)#local i=asc(substr("oqshilacefg"
,r,1))-97;disc{<mod(i,7)-3,div(i,7)-1,6>,z,.4
pigment{rgb 10}}_(r+1)#end#end _(1)//KL


Post a reply to this message

From: Slime
Subject: Re: Isosurface approximation MkII
Date: 9 Apr 2003 20:59:37
Message: <3e94c1f9$1@news.povray.org>
> I added support for smooth triangles but you
> have to provide all the formulae for the normal computatiom, so I'll be
> looking at a way to fix that, any suggestions would be appreciated.

If you have the formula for the object, the normal at a given point <x,y,z>
is

(<func(x+small_val,y,z),func(x,y+small_val,z),func(x,y,z+small_val)> -
<func(x,y,z),func(x,y,z),func(x,y,z)>) / small_val

Taken from memory, I might have screwed that up. It's basically just the
gradient of the function.

 - Slime
[ http://www.slimeland.com/ ]


Post a reply to this message

From: Tor Olav Kristensen
Subject: Re: Isosurface approximation MkII
Date: 9 Apr 2003 22:15:02
Message: <Xns93592B990C198torolavkhotmailcom@204.213.191.226>
"Kevin Loney" <klo### [at] pt2mcom> wrote in news:3e94b3a3@news.povray.org:

> I considered using trace(), but then decided against it because of the
> fact each vertex is only an approximation of the iso and will not
> neccesarily be right where it's supposed to be. By using trace() the
> normal approximation could be off by a lot resulting in a really
> strange shading. I would use the average of the neighboring faces but
> since I'm not storing them that could cause just a bit of a problem.
> I've been looking into ways of approximating it based on the function
> supplied, I think I have an idea of how to do this, but I'm not sure
> yet, but thanks for the suggestions. 


The vGradient() macro should be able to do the job.

Here's the documentation for it:

http://www.povray.org/documentation/view/253/


Tor Olav


Post a reply to this message

From: Kevin Loney
Subject: Re: Isosurface approximation MkII
Date: 10 Apr 2003 00:28:28
Message: <3e94f2ec@news.povray.org>
that is exactly what I need!

thanks

--
Kevin
http://www.geocities.com/qsquared_1999/
#macro _(r)#if(r<12)#local i=asc(substr("oqshilacefg"
,r,1))-97;disc{<mod(i,7)-3,div(i,7)-1,6>,z,.4
pigment{rgb 10}}_(r+1)#end#end _(1)//KL


Post a reply to this message

From: Hugo Asm
Subject: Re: Isosurface approximation MkII
Date: 14 May 2003 10:57:51
Message: <3ec2596f$1@news.povray.org>
> I considered using trace(), but then decided against it

I've tried your macro and it works! But it seems to generate some
unnecessary triangles, like small lines that nearly go by unnoticed. Besides
that I had a shock at the parsing time.  ;o)  As 80x80x80 segments takes
forever (I guess that's the penalty) guess what, I am going to need
something like 1000x1000x500 on a slow isosurface, so this method is out of
the question. Unfortunately. I'll try with trace and hope it's faster.

Grimbert's tesselation patch. (To my knowledge there aren't any builds of
it, on the windows platform.)

Are you going to add mesh2 output?

Regards,
Hugo


Post a reply to this message

From: ABX
Subject: Re: Isosurface approximation MkII
Date: 14 May 2003 11:03:48
Message: <9em4cvgc1sf97urtknj7m4662ksqnpnp3o@4ax.com>
On Wed, 14 May 2003 16:58:12 +0200, "Hugo Asm" <hua### [at] post3teledk> wrote:
> > I considered using trace(), but then decided against it
>
> I've tried your macro and it works! But it seems to generate some
> unnecessary triangles, like small lines that nearly go by unnoticed. Besides
> that I had a shock at the parsing time.  ;o)  As 80x80x80 segments takes
> forever (I guess that's the penalty) guess what, I am going to need
> something like 1000x1000x500 on a slow isosurface, so this method is out of
> the question. Unfortunately. I'll try with trace and hope it's faster.

http://www.silvertome.com/packages/triscan.html

ABX


Post a reply to this message

From: Hugo Asm
Subject: Re: Isosurface approximation MkII
Date: 14 May 2003 16:32:41
Message: <3ec2a7e9@news.povray.org>
> http://www.silvertome.com/packages/triscan.html

Thanks for the link!  I'll try right away.

Best regards,
Hugo


Post a reply to this message

From: Hugo Asm
Subject: Re: Isosurface approximation MkII
Date: 16 May 2003 09:00:13
Message: <3ec4e0dd$1@news.povray.org>
I've modified your macro to output wavefront obj files, though it doesn't
deal with duplicated vertices. Now I want to clean up and optimise the mesh
outside POV-Ray. I load the file in AccuTrans converter, and the mesh shows
up fine in the OpenGL window. Now is the time to remove duplicate vertices,
and the converter doesn't seem to do it right. The faces remain disjointed,
and when I ask the converter to calculate normals, they are all a mess. The
next step I wanted to do was triangle decimation, to optimise the mesh. I
have the Vizzup optimiser, but in this case it doesn't work. Probably
because the faces are not joined with each other.

If you know of any other tools I can try for the above purpose, please let
me know.

-Hugo


Post a reply to this message

Goto Latest 10 Messages Next 1 Messages >>>

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