POV-Ray : Newsgroups : povray.general : Problems with "New Surface Subdivision Suite" Server Time
15 Nov 2024 13:21:13 EST (-0500)
  Problems with "New Surface Subdivision Suite" (Message 1 to 5 of 5)  
From: Tor Olav Kristensen
Subject: Problems with "New Surface Subdivision Suite"
Date: 25 Aug 2004 18:17:13
Message: <412d0fe9$1@news.povray.org>
I have decided to test out John VanSickle's promising
"New Surface Subdivision Suite":

http://www.geocities.com/evilsnack/nsss.htm

But after some successful test runs, I have now run
into trouble =(

When I render the scene below, some odd surface normals
seem to appear along the edges of the modeled cube.

- Have anyone else experienced problems with this ?

- Or does anyone know if I am doing something wrong ?

(I'll shortly post an image to povray.binaries.images
that illustrates the problem.)


Tor Olav


// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7

#version 3.6;

#include "nsss.inc"

// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7

#local Vertices =
   array[8] {
     <0, 0, 0>,
     <1, 0, 0>,
     <1, 1, 0>,
     <0, 1, 0>,
     <0, 0, 1>,
     <1, 0, 1>,
     <1, 1, 1>,
     <0, 1, 1>
   }

#local Faces =
   array[6][4] {
     { 0, 1, 2, 3 },
     { 0, 4, 7, 3 },
     { 0, 1, 5, 4 },
     { 3, 2, 6, 7 },
     { 1, 5, 6, 2 },
     { 6, 5, 4, 7 }
   }

#local S = 2; // Sharpness

#local SharpEdges =
   array[12][3] {
     { 0, 1, S },
     { 1, 2, S },
     { 2, 3, S },
     { 3, 0, S },
     { 4, 5, S },
     { 5, 6, S },
     { 6, 7, S },
     { 7, 4, S }
     { 0, 4, S },
     { 1, 5, S },
     { 2, 6, S },
     { 3, 7, S }
   }

// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7

SSS_ImportBasicMesh(Vertices, Faces)
SSS_AddSharpData(SharpEdges)
SSS_Subdivide()
SSS_Subdivide()
SSS_Subdivide()
//SSS_Subdivide()
//SSS_Subdivide()

object {
//  SSS_BuildFlatMesh()
   SSS_BuildSmoothMesh()
   pigment { color rgb <1, 1, 1> }
   translate -<1, 1, 1>/2
}

// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7

camera {
   location <2, 3, 4>
   look_at <0, 0, 0>
   angle 25
}

light_source {
   <3, 2, 1>*100
   color rgb <1, 1, 1>
   shadowless
}

/*
light_source {
   <-1, -1, -1>*100
   color rgb <0.8, 0.8, 0.8>
   shadowless
}
*/

background { color rgb <0.6, 0.5, 0.4> }

// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7


Post a reply to this message

From: John VanSickle
Subject: Re: Problems with "New Surface Subdivision Suite"
Date: 25 Aug 2004 19:38:14
Message: <412d22e6$1@news.povray.org>
Tor Olav Kristensen wrote:

> 
> I have decided to test out John VanSickle's promising
> "New Surface Subdivision Suite":
> 
> http://www.geocities.com/evilsnack/nsss.htm
> 
> But after some successful test runs, I have now run
> into trouble =(
> 
> When I render the scene below, some odd surface normals
> seem to appear along the edges of the modeled cube.
> 
> - Have anyone else experienced problems with this ?
> 
> - Or does anyone know if I am doing something wrong ?
> 
> (I'll shortly post an image to povray.binaries.images
> that illustrates the problem.)

I just tested it, and you're right, this should not be
happening.  I'll try and debug.

Regards,
John


Post a reply to this message

From: Tor Olav Kristensen
Subject: Re: Problems with "New Surface Subdivision Suite"
Date: 25 Aug 2004 19:56:49
Message: <412d2741@news.povray.org>
John VanSickle wrote:

> Tor Olav Kristensen wrote:
> 
>>
>> I have decided to test out John VanSickle's promising
>> "New Surface Subdivision Suite":
>>
>> http://www.geocities.com/evilsnack/nsss.htm
>>
>> But after some successful test runs, I have now run
>> into trouble =(
>>
>> When I render the scene below, some odd surface normals
>> seem to appear along the edges of the modeled cube.
...

> I just tested it, and you're right, this should not be
> happening.  I'll try and debug.

Thank you for your swift reply John !

I hope you find the bug.

-- 
Tor Olav
http://subcube.net
http://subcube.com


Post a reply to this message

From: John VanSickle
Subject: Update
Date: 25 Aug 2004 20:06:29
Message: <412d2985$1@news.povray.org>
Tor Olav Kristensen wrote:

> 
> I have decided to test out John VanSickle's promising
> "New Surface Subdivision Suite":
> 
> http://www.geocities.com/evilsnack/nsss.htm
> 
> But after some successful test runs, I have now run
> into trouble =(

The bug is caused by the way my code handles semi-sharp
edges (the ones that are sharp for a finite number of
subdivisions), combined with the pre-calculation of
normals.

Until I get the fix uploaded, calling the macro

   SSS_BuildNormals()

after the last subdivision appears to solve the
problem.

Regards,
John


Post a reply to this message

From: Tor Olav Kristensen
Subject: Re: Update
Date: 25 Aug 2004 20:25:04
Message: <412d2de0$1@news.povray.org>
John VanSickle wrote:

> Tor Olav Kristensen wrote:
> 
>>
>> I have decided to test out John VanSickle's promising
>> "New Surface Subdivision Suite":
>>
>> http://www.geocities.com/evilsnack/nsss.htm
>>
>> But after some successful test runs, I have now run
>> into trouble =(
> 
> 
> The bug is caused by the way my code handles semi-sharp
> edges (the ones that are sharp for a finite number of
> subdivisions), combined with the pre-calculation of
> normals.
> 
> Until I get the fix uploaded, calling the macro
> 
>   SSS_BuildNormals()
> 
> after the last subdivision appears to solve the
> problem.

Yes - Thanks, that solved the problem in my scene.

-- 
Tor Olav
http://subcube.net
http://subcube.com


Post a reply to this message

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