POV-Ray : Newsgroups : povray.news-submissions : Pov-Ray With Subdivision available : Re: Pov-Ray With Subdivision available Server Time: 19 Oct 2018 15:24:30 GMT
  Re: Pov-Ray With Subdivision available  
From: Xiaobin Wu
Date: 12 May 2004 22:43:01
First of all, thanks to all that responded or tested my patch.

I have posted the modified source. There are five files modified:
tokenize.cpp, mesh.h, mesh.cpp, parse.h, parse.cpp
( I want to thank Andrew for testing it under Linux. )
Also I wish the code is only used in Pov-Ray community. If you need
to use it for something else, please let me know beforehand.

Here are a few things that I have fixed/changed according to the feedback:

1.   Fixed a problem that leads to slower rendering of un-subdivided meshes.
     (Thanks, Mika)

> Christoph wrote:
> Concerning the  syntax - 'flatshading' is a bad choice for the keyword - a
> 'smooth' would be more descriptive and already exists from heightfields.

2.  The syntax to switch on flat shading is changed to "smooth off" from
     Christoph is right, and I do like "smooth" better. But I want the
default to be smooth
     shaded, so you will need to add an "off" to switch on flat shading.

3.   Removed the restriction on the maximum valence of the vertices. (Thanks

> Jms wrote:
> I did a test under win98/win2000pro and the return is always:
> "out of memory : cannot allocate - 304 bytes for triangle mesh data".
> For just two triangles without anything else nor texture, nor normal
> indices.

4.   This problem is a little bit more complex. When you subdivide an object
     with open boundary, the behavior of the faces on the boundary is not
     The strategy that I used is to simply discard those new boundary faces.

    What happened to the two triangle cases is that there is no more faces
left after
    1-step subdivision.

    I fixed the memory allocation error and spit out a warning instead when
the similar case happens.
    The object will disappear naturally.

    Eventually one would like to have other strategies on the boundary. But
that is on currently
    Wish List.  For more information about this issue, please refer to
papers such as:

      *Towards Hardware Implemention of Loop Subdivision*
      by S. Bischoff, L. Kobbelt and H-P. Seidel.
     in Proceedings of the 2000 SIGGRAPH/EUROGRAPHICS  Workshop on Graphics

The newest version is called 0.01b.


Post a reply to this message

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