POV-Ray : Newsgroups : povray.beta-test : Isosurface: max_gradient warning? Server Time
22 Dec 2024 05:06:22 EST (-0500)
  Isosurface: max_gradient warning? (Message 1 to 10 of 20)  
Goto Latest 10 Messages Next 10 Messages >>>
From: Thomas de Groot
Subject: Isosurface: max_gradient warning?
Date: 22 Jun 2013 04:09:03
Message: <51c55b9f$1@news.povray.org>
version 3.7 RC7.

Whatever value for max_gradient I use (too low or too high) the expected 
warning never appears in the message window like it used to do. I need 
it to determine the values for evaluate.

Thomas


Post a reply to this message

From: Le Forgeron
Subject: Re: Isosurface: max_gradient warning?
Date: 22 Jun 2013 04:38:43
Message: <51c56293$1@news.povray.org>
Le 22/06/2013 10:08, Thomas de Groot nous fit lire :
> version 3.7 RC7.
> 
> Whatever value for max_gradient I use (too low or too high) the expected
> warning never appears in the message window like it used to do. I need
> it to determine the values for evaluate.
> 
> Thomas

Greetings,

1. Have you an actual isosurface to provide us some basic testing ?
2. computation of max_gradient in isosurface is not thread-safe, have
you tested (the slow) -WT1 option (limiting to one thread, it's slow,
but then safe)

(point 2 is already reported as #296 in bugs.povray.org)


Post a reply to this message

From: Thomas de Groot
Subject: Re: Isosurface: max_gradient warning?
Date: 22 Jun 2013 07:05:57
Message: <51c58515$1@news.povray.org>
On 22-6-2013 10:38, Le_Forgeron wrote:
> 1. Have you an actual isosurface to provide us some basic testing ?
> 2. computation of max_gradient in isosurface is not thread-safe, have
> you tested (the slow) -WT1 option (limiting to one thread, it's slow,
> but then safe)
>
> (point 2 is already reported as #296 in bugs.povray.org)
>

point 1:
//start code
#declare P1gain = 0.1;	
#declare P1turb = <0.1, 0.5, 0.3>;			
#declare P1scale = <0.1, 0.1, 0.5>;	
#declare P1rotate = <0, 0, 0>;			
#declare P1angle = 45;

#declare P2gain = 0.5;
#declare P2turb = <0.5, 0.9, 0.9>;		
#declare P2scale = <0.1, 2.5, 0.1>; // increasing y reduces breaking-up 
of P2 (?)
#declare P2rotate = <0, 90, 0>;				
#declare P2angle = -10;	// rotates from vertical (0) to horizontal (90); 
note: dents and wrinkles rotate in opposite ways!

#declare Xscale = 1000;	// increase size of landscape (not scale!) for X
#declare Zscale = 1000;	// increase size of landscape (not scale!) for Z
// ----------------------------------------

// an eroded landscape:
#declare P1a=function {pattern {wrinkles scale P1scale rotate P1rotate }}
#declare P1b=function {pattern {wrinkles warp {turbulence P1turb octaves 
3 omega 0.5 lambda 1} scale P1scale rotate P1rotate}}
#declare P1c=function {pattern {ripples frequency 0.1 warp {turbulence 
<0.5,0.3,0.5> octaves 3 omega 0.5 lambda 1} scale <0.1, 0.1, 0.1> }}

#declare P2a=function {pattern {dents scale P2scale rotate P2rotate}}
#declare P2b=function {pattern {dents warp {turbulence P2turb octaves 5 
omega 0.5 lambda 2} scale P2scale rotate P2rotate}}

#declare P3=function {f_noise3d(x,y,z)*1}
#declare P4=function {f_hetero_mf(x,y,z, 0.8, 2, 1, 0, 0.9, 2)*1 } // 
H,lacunarity,octaves,offset,gain,ng
#declare P5=function {f_hetero_mf(x,y,z, 0.1, 2, 1, 0, 0.1, 2)*1 } // 
H,lacunarity,octaves,offset,gain,ng

// rotate y:
#declare P1ca=function {P1c(x*cos(radians(P1angle)) - 
z*sin(radians(P1angle)), y, x*sin(radians(P1angle)) + 
z*cos(radians(P1angle)) )}
// rotate z:
#declare P1aa=function {P1a(x*cos(radians(P1angle)) + 
y*sin(radians(P1angle)), (-x*sin(radians(P1angle)) + 
y*cos(radians(P1angle)))*2, z)*1}
// rotate z:
#declare P2aa=function {P2a(x*cos(radians(P2angle)) + 
y*sin(radians(P2angle)), (-x*sin(radians(P2angle)) + 
y*cos(radians(P2angle)))*2, z)*1}

#declare P=function {  P4(x, y, z)
                      + P2aa(x, y, z)*P2gain
                      - P1aa(x, y, z)*P1gain
                     }

isosurface {
   function {y - P(x, y, z)}
   threshold 0.1
   max_gradient 5 //10
   accuracy 0.001
   contained_by {box {<0.5-Xscale*0.5, -1, 0.5-Zscale*0.5>, 
<0.5+Xscale*0.5, 2, 0.5+Zscale*0.5>}}
   translate <-0.5, 0, -0.5>
   scale <1, 2, 1>
   //texture {Landtex}
}

//end code

point 2:
Have not done so, but shall test that.

Thanks!

Thomas


Post a reply to this message

From: Thomas de Groot
Subject: Re: Isosurface: max_gradient warning?
Date: 22 Jun 2013 09:57:19
Message: <51c5ad3f$1@news.povray.org>
On 22-6-2013 10:38, Le_Forgeron wrote:
> 2. computation of max_gradient in isosurface is not thread-safe, have
> you tested (the slow) -WT1 option (limiting to one thread, it's slow,
> but then safe)
>
> (point 2 is already reported as #296 in bugs.povray.org)
>

No message with -WT1 either.

Thomas


Post a reply to this message

From: Cousin Ricky
Subject: Re: Isosurface: max_gradient warning?
Date: 22 Jun 2013 15:55:01
Message: <web.51c600b422807ec9540235480@news.povray.org>
Le_Forgeron <jgr### [at] freefr> wrote:
> 1. Have you an actual isosurface to provide us some basic testing ?

This problem shows in Mr. Pokorny's isosurface (the same scene as FS#294).

This is an isosurface I reported last August:

  isosurface
  { function { f_sphere (x, 0, z, (2660 - 40*y) / 9) }
    contained_by { box { <-80, 31, -24>, <-128, 56, 24> } }
    pigment { rgb <1, 0.75, 0> }
    scale 1/128
    rotate -35 * x
    translate y
  }

I had this problem following the #include of a complicated .inc file, but I was
not able to reproduce the problem in a simplified scene.  I have reconstructed a
scene with that same .inc file today, but did not see the problem.  (I'd done so
much editing and new scene creation since then that I cannot identify the
original problem file.)

If it's a thread safety issue, my inconsistent experiences would make sense.  If
I encounter the problem again, I will be sure to try it with +WT1.

One difference between today and last August is that last August I had a single
core using 4 threads, and today I have (what appear to be) 8 cores using 8
threads.


Post a reply to this message

From: Le Forgeron
Subject: Re: Isosurface: max_gradient warning?
Date: 23 Jun 2013 04:27:19
Message: <51c6b167$1@news.povray.org>
Le 22/06/2013 15:57, Thomas de Groot nous fit lire :
> On 22-6-2013 10:38, Le_Forgeron wrote:
>> 2. computation of max_gradient in isosurface is not thread-safe, have
>> you tested (the slow) -WT1 option (limiting to one thread, it's slow,
>> but then safe)
>>
>> (point 2 is already reported as #296 in bugs.povray.org)
>>
>
> No message with -WT1 either.
>
> Thomas
With 3.6 I got (320x240):
=========================
File: iso.pov  Line: 44
File Context (5 lines):
                     - P1aa(x, y, z)*P1gain
                    }
isosurface {
  function {
Shutdown Warning: The maximum gradient found was 8.130, but max_gradient
of the
 isosurface was set to 5.000. The isosurface may contain holes! Adjust
 max_gradient to get a proper rendering of the isosurface.



With 3.7RC7+ (icpc compiled, 12 threads, 800x600):
=============
File: iso.pov  Line: 44
Shutdown Warning: The maximum gradient found was 8.143, but max_gradient
of the
 isosurface was set to 5.000. The isosurface may contain holes! Adjust
 max_gradient to get a proper rendering of the isosurface.



With 3.7RC7+ (icpc compiled, 1 thread, 800x600):
=============
File: iso.pov  Line: 44
Shutdown Warning: The maximum gradient found was 8.339, but max_gradient
of the
 isosurface was set to 5.000. The isosurface may contain holes! Adjust
 max_gradient to get a proper rendering of the isosurface.




Same kind of result with gcc compiled.

With 3.6 at 800x600:
====================
File: iso.pov  Line: 44
File Context (5 lines):
                     - P1aa(x, y, z)*P1gain
                    }
isosurface {
  function {
Shutdown Warning: The maximum gradient found was 8.339, but max_gradient
of the
 isosurface was set to 5.000. The isosurface may contain holes! Adjust
 max_gradient to get a proper rendering of the isosurface.

So, I cannot duplicate the original issue, at least on the unix port.

> Whatever value for max_gradient I use (too low or too high) the
> expected warning never appears in the message window like it used to
> do. I need it to determine the values for evaluate.

The only difference is less context.
Or is it a Windows specific issue ? (I hope not)


Post a reply to this message

From: Thomas de Groot
Subject: Re: Isosurface: max_gradient warning?
Date: 23 Jun 2013 07:24:06
Message: <51c6dad6@news.povray.org>
I get none of the messages below (except in version 3.6 of course). My 
system is windows...

Thomas

On 23-6-2013 10:27, Le_Forgeron wrote:
> Le 22/06/2013 15:57, Thomas de Groot nous fit lire :
>> On 22-6-2013 10:38, Le_Forgeron wrote:
>>> 2. computation of max_gradient in isosurface is not thread-safe, have
>>> you tested (the slow) -WT1 option (limiting to one thread, it's slow,
>>> but then safe)
>>>
>>> (point 2 is already reported as #296 in bugs.povray.org)
>>>
>>
>> No message with -WT1 either.
>>
>> Thomas
> With 3.6 I got (320x240):
> =========================
> File: iso.pov  Line: 44
> File Context (5 lines):
>                       - P1aa(x, y, z)*P1gain
>                      }
> isosurface {
>    function {
> Shutdown Warning: The maximum gradient found was 8.130, but max_gradient
> of the
>   isosurface was set to 5.000. The isosurface may contain holes! Adjust
>   max_gradient to get a proper rendering of the isosurface.
>
>
>
> With 3.7RC7+ (icpc compiled, 12 threads, 800x600):
> =============
> File: iso.pov  Line: 44
> Shutdown Warning: The maximum gradient found was 8.143, but max_gradient
> of the
>   isosurface was set to 5.000. The isosurface may contain holes! Adjust
>   max_gradient to get a proper rendering of the isosurface.
>
>
>
> With 3.7RC7+ (icpc compiled, 1 thread, 800x600):
> =============
> File: iso.pov  Line: 44
> Shutdown Warning: The maximum gradient found was 8.339, but max_gradient
> of the
>   isosurface was set to 5.000. The isosurface may contain holes! Adjust
>   max_gradient to get a proper rendering of the isosurface.
>
>
>
>
> Same kind of result with gcc compiled.
>
> With 3.6 at 800x600:
> ====================
> File: iso.pov  Line: 44
> File Context (5 lines):
>                       - P1aa(x, y, z)*P1gain
>                      }
> isosurface {
>    function {
> Shutdown Warning: The maximum gradient found was 8.339, but max_gradient
> of the
>   isosurface was set to 5.000. The isosurface may contain holes! Adjust
>   max_gradient to get a proper rendering of the isosurface.
>
> So, I cannot duplicate the original issue, at least on the unix port.
>
>> Whatever value for max_gradient I use (too low or too high) the
>> expected warning never appears in the message window like it used to
>> do. I need it to determine the values for evaluate.
>
> The only difference is less context.
> Or is it a Windows specific issue ? (I hope not)
>


Post a reply to this message

From: Stephen
Subject: Re: Isosurface: max_gradient warning?
Date: 23 Jun 2013 07:40:48
Message: <51c6dec0$1@news.povray.org>
On 23/06/2013 12:24 PM, Thomas de Groot wrote:
> I get none of the messages below (except in version 3.6 of course). My
> system is windows...

I get warning messages rendering isocacti.pov and isosurfaces.pov.
OS Win7 and using both 64 and 32 bit versions of RC7

-- 
Regards
     Stephen


Post a reply to this message

From: Thomas de Groot
Subject: Re: Isosurface: max_gradient warning?
Date: 23 Jun 2013 07:51:35
Message: <51c6e147$1@news.povray.org>
I do get the warning however, with the isosurface code given by Cousin 
Ricky, below.

Go figure....  :-(

Thomas


Post a reply to this message

From: Cousin Ricky
Subject: Re: Isosurface: max_gradient warning?
Date: 23 Jun 2013 12:10:01
Message: <web.51c71d5e22807ec9540235480@news.povray.org>
Le_Forgeron <jgr### [at] freefr> wrote:
> Or is it a Windows specific issue ? (I hope not)

My experiences have all been with Linux.

Since I never suspected thread safety until you brought it up, I had not tried
it with +WT1.  I just tried +WT1 with Mr. Pokorny's scene, and there was no
warning.


Post a reply to this message

Goto Latest 10 Messages Next 10 Messages >>>

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