POV-Ray : Newsgroups : povray.binaries.images : First preview of tesselation patch Server Time
19 Aug 2024 10:19:02 EDT (-0400)
  First preview of tesselation patch (Message 1 to 10 of 10)  
From: Warp
Subject: First preview of tesselation patch
Date: 13 Dec 2000 09:40:51
Message: <3a378a72@news.povray.org>
I have been working on a tesselation patch for POV-Ray. My intention is also
to make a mesh data extraction patch (else the tesselation patch would be
pretty useless).
  You can tesselate any object with a finite bounding box with it. The
syntax is:

tesselate(Object, Accuracy, Smooth, BBox_Offset)

with the last two parameters being optional.

  The first parameter is the object to be tesselated (must have a finite
bounding box).
  The second object is an accuracy value. Must be a positive integer value.
  The third parameter is a boolean value which tells the function whether
to calculate flat or smooth triangles.
  I'll explain the fourth parameter when the patch is more ready.

  The function returns a regular mesh object which can be used anywhere a
mesh object can be used.
  With the other patch you will also be able to extract the data
(vertices, triangles, normals...) from the mesh (from any mesh, not just
the ones created with the tesselation function).

  This is an example of the very first working version of the patch (that
is, it doesn't crash ;) ).
  Code and image:

#default { pigment { rgb <1,1,0> } finish { specular .5 } }

#declare Obj =
  union
  { sphere { y,.5 }
    cylinder { y,-y*.5,.25 }
    sphere { -y*.5,.25 }
    cylinder { y*.5, -x*.6, .2 }
    sphere { -x*.6, .2 }
    cylinder { y*.5, x*.6, .2 }
    sphere { x*.6, .2 }
    cylinder { -y*.5, -x*.4-y, .2 }
    sphere { -x*.4-y, .2 }
    cylinder { -y*.5, x*.4-y, .2 }
    sphere { x*.4-y, .2 }
  }

object { Obj translate -x*3 }
object { tesselate(Obj, 10) translate -x+y*1.5}
object { tesselate(Obj, 10, yes) translate -x-y*1.5}
object { tesselate(Obj, 20) translate x+y*1.5}
object { tesselate(Obj, 20, yes) translate x-y*1.5}
object { tesselate(Obj, 30) translate x*3+y*1.5}
object { tesselate(Obj, 30, yes) translate x*3-y*1.5}

camera { location <0,2,-13> look_at 0 angle 35 }
light_source { <200,100,-150>, 1 }
light_source { <-200,100,-100>, x*.5 }


Post a reply to this message


Attachments:
Download 'tesselationtest1.jpg' (85 KB)

Preview of image 'tesselationtest1.jpg'
tesselationtest1.jpg


 

From: Warp
Subject: Re: First preview of tesselation patch
Date: 13 Dec 2000 09:45:30
Message: <3a378b89@news.povray.org>
Forgot to mention rendering time:

Time For Parse:    0 hours  0 minutes  14.0 seconds (14 seconds)
Time For Trace:    0 hours  1 minutes  17.0 seconds (77 seconds)
    Total Time:    0 hours  1 minutes  31.0 seconds (91 seconds)


-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):_;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

From: Wlodzimierz ABX Skiba
Subject: Re: First preview of tesselation patch
Date: 13 Dec 2000 10:19:08
Message: <3a37936c@news.povray.org>
Warp wrote in message <3a378a72@news.povray.org>...
> I have been working on a tesselation patch for POV-Ray. My intention is also
> to make a mesh data extraction patch (else the tesselation patch would be
> pretty useless).

interesting, I though of it either
if my deform patch could speed-up for meshes by manipulate vertex
during parsing instead of deforming ray during trace
both could make great fast things

> You can tesselate any object with a finite bounding box with it. The
> syntax is:
>
> tesselate(Object, Accuracy, Smooth, BBox_Offset)


I want change my deform patch to object modifier and I advice it you too
this will be simpler for user. I want change Parse_Object_Mod to return Object
pointer
which replace original pointer for every calling, this way:

object{
  box{-1 1}
  rotate 30*x
  translate y*10
  deform{ twist y, 8 }
  translate 10*x
  tesselate 10,10
}

inside of povray source this could be parsed by changed parse_object_mod as:
tesselatation {
  deformation {
    object{
      box{-1 1}
      rotate 30*x
      translate y*10
    }
    deform { twist y, 8 }
    translate 10*x
  }
  tesselate 10,10
}

after finishing parse_object_mod() should return new pointer to object which
replace original one

> with the last two parameters being optional.

why you did it as function ?

> The function returns a regular mesh object which can be used anywhere a
> mesh object can be used.
> With the other patch you will also be able to extract the data
> (vertices, triangles, normals...) from the mesh (from any mesh, not just
> the ones created with the tesselation function).

great

>  This is an example of the very first working version of the patch (that
> is, it doesn't crash ;) ).

congratulations :)

ABX


Post a reply to this message

From: Vahur Krouverk
Subject: Re: First preview of tesselation patch
Date: 13 Dec 2000 11:43:48
Message: <3A37A7C9.E7CF0F88@aetec.ee>
Warp wrote:
> 
>   I have been working on a tesselation patch for POV-Ray. My intention is also
> to make a mesh data extraction patch (else the tesselation patch would be
> pretty useless).

Interesting. When this patch is available, then it would be nice to
implement displacement mapping for meshes, as tesselation is already
present: then one can displace any object's surface easily...Although
for getting good displacement tesselation should be quite fine, so
memory consumption should be considered. Are You planning to implement
some caching scheme for meshes?
There are some artifacts with tesselated object ('body' and 'arm' are
connected), would it be easy to avoid this? Or does bigger accuracy
helps in this case?
Will cracks be problem with this tesselation?

> The second object is an accuracy value. Must be a positive integer value.
Accuracy is probably not best termin for it, as for me accuracy
associates rather with small decimal value. something like
division_count would be better.


Post a reply to this message

From: Wlodzimierz ABX Skiba
Subject: Re: First preview of tesselation patch
Date: 13 Dec 2000 12:15:22
Message: <3a37aeaa@news.povray.org>
Vahur Krouverk wrote in message >
> The second object is an accuracy value. Must be a positive integer value.
>Accuracy is probably not best termin for it, as for me accuracy
>associates rather with small decimal value. something like
>division_count would be better.

perhaps "resolution"

ABX


Post a reply to this message

From: Mick Hazelgrove
Subject: Re: First preview of tesselation patch
Date: 13 Dec 2000 13:24:21
Message: <3a37bed5@news.povray.org>
Hi Warp,

This will be really useful as it will allow considerable distortion of the
object and if the data can then be extracted then a considerable range of
other processes could be performed on the object.

Great stuff - keep it coming.

Mick


Post a reply to this message

From: Warp
Subject: Re: First preview of tesselation patch
Date: 13 Dec 2000 13:27:44
Message: <3a37bfa0@news.povray.org>
Mick Hazelgrove <mic### [at] mhazelgrovefsnetcouk> wrote:
: This will be really useful as it will allow considerable distortion of the
: object and if the data can then be extracted then a considerable range of
: other processes could be performed on the object.

  That was the idea.
  You can get any mesh (not necessarily one created by tesselate()) and
do many things to it with simple povray scripts.
  These things include exporting to PCM or other ascii mesh formats, using
the PCM macros on any mesh, using the SSS macros on any mesh and so on.

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):_;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

From: Mick Hazelgrove
Subject: Re: First preview of tesselation patch
Date: 13 Dec 2000 13:39:51
Message: <3a37c277@news.povray.org>
"Warp" <war### [at] tagpovrayorg> wrote in message

>   That was the idea.
>   You can get any mesh (not necessarily one created by tesselate()) and
> do many things to it with simple povray scripts.
>   These things include exporting to PCM or other ascii mesh formats, using
> the PCM macros on any mesh, using the SSS macros on any mesh and so on.

The advantage of your patch though(I hope) is that many Pov CSG
constructions might be modified in the same way that meshes now can.


Post a reply to this message

From: Christoph Hormann
Subject: Re: First preview of tesselation patch
Date: 13 Dec 2000 14:56:42
Message: <3A37D476.BD474ADA@gmx.de>
Warp wrote:
> 
>   I have been working on a tesselation patch for POV-Ray. My intention is also
> to make a mesh data extraction patch (else the tesselation patch would be
> pretty useless).
>   You can tesselate any object with a finite bounding box with it. 
[...]

That sounds very promising, Does it work on isosurfaces? It would be very
useful for speeding up things in some cases.  

When do you think we can expect the first release?

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: First preview of tesselation patch
Date: 13 Dec 2000 15:43:21
Message: <3a37df68@news.povray.org>
Christoph Hormann <chr### [at] gmxde> wrote:
: That sounds very promising, Does it work on isosurfaces? It would be very
: useful for speeding up things in some cases.  

  It should work with any object with a finite bounding box.
  I haven't tested it with isosurfaces, but I don't see any reason why it
shouldn't work with them as well.

: When do you think we can expect the first release?

  No idea.
  I could send the current version right now to Nathan for inclusion in the
next MegaPov, and/or just put the modified source files (of MegaPov 0.6a)
somewhere.
  However, I would like to let the syntax mature a bit longer. As with
all new things, the first idea for the syntax is not always the best, and
better suggestions and ideas come rather quickly.
  I would also like to study if the tesselation algorithm could be
improved. Right now it doesn't work quite well with sharp edges.

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):_;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

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