POV-Ray : Newsgroups : povray.general : Maximum gradient reached Server Time
25 Dec 2024 09:38:17 EST (-0500)
  Maximum gradient reached (Message 1 to 4 of 4)  
From: Louis
Subject: Maximum gradient reached
Date: 31 Dec 2013 14:25:01
Message: <web.52c318504dd249e1cbe7ea7c0@news.povray.org>
When rendering my scene I get a message:

Shutdown Warning: The maximum gradient found was 2389459.250, but max_gradient
of the isosurface was set to 10000.000. The isosurface may contain holes! Adjust
max_gradient to get a proper rendering of the isosurface.

I have adjusted the max_gradient to 2389459.250 in my scene but the warning
persists. It seems like the maximum is hard-coded at 10000? There are black
spots, or well... actually, most of it is black with a few spots that rendered
with the correct color.

I tried lowering the resolution of my heightfield from a 16-bit jpeg to an 8-bit
png. It helped a little, "The maximum gradient found was 13859817.000". I
would rather retain the high resolution though.

Is there anything I can do to retain the resolution but lower the max_gradient?


Post a reply to this message

From: William F Pokorny
Subject: Re: Maximum gradient reached
Date: 1 Jan 2014 11:57:36
Message: <52c44900$1@news.povray.org>
On 12/31/2013 02:20 PM, Louis wrote:
> When rendering my scene I get a message:
>
> Shutdown Warning: The maximum gradient found was 2389459.250, but max_gradient
> of the isosurface was set to 10000.000. The isosurface may contain holes! Adjust
> max_gradient to get a proper rendering of the isosurface.
>
> I have adjusted the max_gradient to 2389459.250 in my scene but the warning
> persists. It seems like the maximum is hard-coded at 10000? There are black
> spots, or well... actually, most of it is black with a few spots that rendered
> with the correct color.
>
> I tried lowering the resolution of my heightfield from a 16-bit jpeg to an 8-bit
> png. It helped a little, "The maximum gradient found was 13859817.000". I
> would rather retain the high resolution though.
>
> Is there anything I can do to retain the resolution but lower the max_gradient?
>
>
>
Hi Louis,
Answering blind in not really understanding what you are trying. It 
helps to see the code.

If you have not yet found it, check out Mike William's tutorial page at 
http://www.econym.demon.co.uk/isotut/index.htm. It's got lots of useful 
information on isosurfaces plus working code you can download for all 
the pages.

When you get into max gradients as large as yours without the resultant 
object you want, it very likely means the isosurface 
"function/pigment-image_map-function" you are rendering has - or 
effectively has - discontinuities. There are changes in value which are 
too rapid to accurately find the surface.

In other words, something is wrong(1). I've never gone over 1000 for the 
max gradient setting in anything I've done and I normally run <<200. If 
nicely behaved, slowly changing, functions <<20 is typical for a max 
gradient.

I didn't follow what you did with your bit depth change. You too say 
heightfield, which is not an isosurface, but another kind of povray object.

Taking you to be working with a base isosurface shape where you are 
adding a surface displacement via an input image's grey, red, green or 
blue value:

- Are you using interpolation to smooth your input image? If not, do.

- Are you using the right image_map map_type for the base iso shape? The 
default is 0 or planar.

- Larger input images for the pigment image_map function often help.

Bill P.

(1) - I'm strictly lying as it is OK to have max gradient warnings so 
long as you are getting the iso object you want.


Post a reply to this message

From: Louis
Subject: Re: Maximum gradient reached
Date: 1 Jan 2014 19:05:01
Message: <web.52c4ab59df65d6ffcbe7ea7c0@news.povray.org>
William F Pokorny <ano### [at] anonymousorg> wrote:
> Hi Louis,
> Answering blind in not really understanding what you are trying. It
> helps to see the code.
>
> If you have not yet found it, check out Mike William's tutorial page at
> http://www.econym.demon.co.uk/isotut/index.htm. It's got lots of useful
> information on isosurfaces plus working code you can download for all
> the pages.
>
> When you get into max gradients as large as yours without the resultant
> object you want, it very likely means the isosurface
> "function/pigment-image_map-function" you are rendering has - or
> effectively has - discontinuities. There are changes in value which are
> too rapid to accurately find the surface.
>
> In other words, something is wrong(1). I've never gone over 1000 for the
> max gradient setting in anything I've done and I normally run <<200. If
> nicely behaved, slowly changing, functions <<20 is typical for a max
> gradient.
>
> I didn't follow what you did with your bit depth change. You too say
> heightfield, which is not an isosurface, but another kind of povray object.
>
> Taking you to be working with a base isosurface shape where you are
> adding a surface displacement via an input image's grey, red, green or
> blue value:
>
> - Are you using interpolation to smooth your input image? If not, do.
>
> - Are you using the right image_map map_type for the base iso shape? The
> default is 0 or planar.
>
> - Larger input images for the pigment image_map function often help.
>
> Bill P.
>
> (1) - I'm strictly lying as it is OK to have max gradient warnings so
> long as you are getting the iso object you want.

Thanks for your reply. I'm mapping one of the "blue marble" heightfields to a
sphere (http://visibleearth.nasa.gov/view.php?id=73934) with interpolate 3.

After removing the "precision" declaration the problem was allot less, I'm now
at 1200 and it renders ok. Not sure what value I had there but it must have
been excessive.

Cheers,
Louis


Post a reply to this message

From: Alain
Subject: Re: Maximum gradient reached
Date: 2 Jan 2014 13:08:40
Message: <52c5ab28@news.povray.org>

> When rendering my scene I get a message:
>
> Shutdown Warning: The maximum gradient found was 2389459.250, but max_gradient
> of the isosurface was set to 10000.000. The isosurface may contain holes! Adjust
> max_gradient to get a proper rendering of the isosurface.
>
> I have adjusted the max_gradient to 2389459.250 in my scene but the warning
> persists. It seems like the maximum is hard-coded at 10000? There are black
> spots, or well... actually, most of it is black with a few spots that rendered
> with the correct color.
>
> I tried lowering the resolution of my heightfield from a 16-bit jpeg to an 8-bit
> png. It helped a little, "The maximum gradient found was 13859817.000". I
> would rather retain the high resolution though.
>
> Is there anything I can do to retain the resolution but lower the max_gradient?
>
>
>
Most of the time, such high gradients are caused by discontinuities: 
Places where you go sharply from a value to an other like going from 0 
to 1 on adjacent pixels of your image.

Use interpolate 1, linear interpolation.

Try bluring your source image and keep it as 16 bit gray scale PNG.

Alain


Post a reply to this message

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