POV-Ray : Newsgroups : povray.beta-test.binaries : Mosaic. Is it noise, hf_gray_16....? Server Time
31 Oct 2024 20:18:47 EDT (-0400)
  Mosaic. Is it noise, hf_gray_16....? (Message 1 to 8 of 8)  
From: bob h
Subject: Mosaic. Is it noise, hf_gray_16....?
Date: 12 Dec 2001 18:45:58
Message: <3c17ec36@news.povray.org>
/* see related message at p.b-t. */

/* use respective cmd comment to render with, depending on GrayImage */

#declare GrayImage=yes; // yes to make input image, no for final output

#if (GrayImage=yes)

/* please note that the +hi file may be different from yours */

// cmd: +hiBeta8fix.inc +fn +w900 +h900 +oc:\images\isogray16.png

// cmd: +hiBeta8fix.inc +ft +w900 +h900 +oc:\images\isogray16.tga

// cmd: +hiBeta8fix.inc +fp +w900 +h900 +oc:\images\isogray16.ppm

#include "functions.inc"

global_settings {
        hf_gray_16 on  // whether on or off, has contour lines
        noise_generator 3  // 1, 2 or 3
         }

camera{
    orthographic
    location  y*10
    up        y*30
    right     x*30
    look_at   0
}

isosurface{
    function{y-f_noise3d(x,y,z)} // could this be the problem?
    contained_by{box{<0,-0.1,-30>,<30,1,0>}}
    // notice the default max_gradient, etc, is used
    texture{pigment{gradient y}finish{ambient 1}}
    translate x*-15+z*15
}

#else

/* be sure to use this command line when GrayImage=no ! */

// cmd: +hiBeta8fix.inc +fn +w320 +h240 +oc:\images\isotest16.png

#declare F_p=function {
       pigment {image_map {
/* use input image intended for test */
        png "isogray16.png"
 //       tga "isogray16.tga"
 //       ppm "isogray16.ppm" // errors, unsupported number of colors
        }
        rotate 90*x translate -.5}
}

isosurface {
        function {y-F_p(x,y,z).gray*.1}
        contained_by {box {-1,1}}
 texture {pigment {rgb 1}}
   scale <10,1,10> rotate -45*x translate <0,.25,2>
}

light_source {<10,10,-10>,1}
#end


Post a reply to this message


Attachments:
Download 'iso-gray_noise.pov.txt' (2 KB) Download 'isogray16noise.jpg' (110 KB)

Preview of image 'isogray16noise.jpg'
isogray16noise.jpg


 

From: bob h
Subject: Re: Mosaic... some clarifications
Date: 13 Dec 2001 00:46:48
Message: <3c1840c8$1@news.povray.org>
I realize that the default isosurface max_gradient is at fault for the
contour lines when creating the hf_gray_16 test image.  However, even when
using the suggested max_gradient of 2.187 there was a single dot of white
amidst the otherwise okay pattern when using noise_generator 3.  Type 1 is
of course filled with plateaus and type 2 was okay.

I was under the impression that now max_gradient was found and used without
intervention.

Anyway, that isn't the main concern I had.  It's the mosaic produced from
the hf_gray_16 image when used in a isosurface.  The image being output is
always nothing but noise instead of smooth pattern (oh yeah, please ignore
that ppm image unless it means anything.  I just put that in to try it too).
I thought this was fixed as of beta 8, otherwise I wouldn't have posted
about it.

Thanks for checking this out if you have done so.


Post a reply to this message

From: Mike Williams
Subject: Re: Mosaic... some clarifications
Date: 13 Dec 2001 02:53:23
Message: <Gue2kKAr4FG8Ewqd@econym.demon.co.uk>
Wasn't it bob h who wrote:

>Anyway, that isn't the main concern I had.  It's the mosaic produced from
>the hf_gray_16 image when used in a isosurface.  The image being output is
>always nothing but noise instead of smooth pattern (oh yeah, please ignore
>that ppm image unless it means anything.  I just put that in to try it too).
>I thought this was fixed as of beta 8, otherwise I wouldn't have posted
>about it.

What's happening is that .grey isn't the correct way to extract height
information from a hf_gray_16 image, it's the way to extract a gray
equivalent from an RGB image. The data bits are stored in a different
order in a hf_gray_16 than they are in an RGB image, so the resulting
pixels are at all sorts of wrong heights.

So change it from ".gray" to the experimental ".hf", like

        function {y-F_p(x,y,z).hf*.1}

and it may also be worthwhile to increase the max_gradient on your
second isosurface.

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

From: bob h
Subject: Re: Mosaic... some clarifications
Date: 13 Dec 2001 05:25:35
Message: <3c18821f$1@news.povray.org>
"Mike Williams" <mik### [at] nospamplease> wrote in message
news:Gue### [at] econymdemoncouk...
>
> What's happening is that .grey isn't the correct way to extract height
> information from a hf_gray_16 image, it's the way to extract a gray
> equivalent from an RGB image. The data bits are stored in a different
> order in a hf_gray_16 than they are in an RGB image, so the resulting
> pixels are at all sorts of wrong heights.
>
> So change it from ".gray" to the experimental ".hf", like
>
>         function {y-F_p(x,y,z).hf*.1}
>
> and it may also be worthwhile to increase the max_gradient on your
> second isosurface.

It's a miracle!  Well, okay, not exactly a real miracle but close enough.  I
didn't know about this .hf thing before, or simply went in one ear and out
the other; and Context Help doesn't find it.  Worked okay on the Targa image
input but png is still broken.  I thought it had been fixed as of beta 8.

Found out just now I wasn't thorough enough when I went to check on this
before posting.  My search of povray.beta-test for hf_gray_16 png came up
with nothing so I reread some.  I've seen the Known Bugs Dec 10 posting by
you and Ron's reply to that concerning png output.  I remembered it
differently, as Ron saying it had been fixed as of this current beta.  Not
so, apparently for next beta 9.

I've also been under the impression that isosurfaces were now being more
automatic in the way max_gradient was handled.  I need to read up on that
some more too.

So, I'll just go away now and come back when I have something else.  Sorry
for the bother.  Thanks for the help and answer!
--
text{ttf"arial","bob h",.1,0pigment{rgb 9}translate<-1,-.2,3>}


Post a reply to this message

From:
Subject: Re: Mosaic... some clarifications
Date: 14 Dec 2001 02:29:54
Message: <9n9j1uo0mdlrs4i5toupujr0pqrj4vvb8d@4ax.com>
On Thu, 13 Dec 2001 04:24:52 -0600, "bob h" <omn### [at] charternet> wrote:
> >         function {y-F_p(x,y,z).hf*.1}
> > and it may also be worthwhile to increase the max_gradient on your
> > second isosurface.
>
> It's a miracle!  Well, okay, not exactly a real miracle but close enough.  I
> didn't know about this .hf thing before

I was surprised too. I know - RTFM, but ".hf" is noted only in one place (6.5.4.2), it
is connected with function syntax but listed in isosurface chapter and it
is not listed in index. Also I wonder what about below script:

#local P=function{pigment{granite}}
#local F1=function{P(1,2,3).red} // works
#local F2=function{P(1,2,3).hf}  // works
#local A1=P(1,2,3).red;          // works
#local A2=P(1,2,3).hf;           // not

is it bug ?

ABX
--
#declare _=function(a,b,x){((a^2)+(b^2))^.5-x}#default {pigment{color rgb 1}}
union{plane{y,-3}plane{-x,-3}finish{reflection 1 ambient 0}}isosurface{ //ABX
function{_(x-2,y,1)&_((x+y)*.7,z,.1)&_((x+y+2)*.7,z,.1)&_(x/2+y*.8+1.5,z,.1)}
contained_by{box{<0,-3,-.1>,<3,0,.1>}}translate z*15finish{ambient 1}}//POV35


Post a reply to this message

From: Mike Williams
Subject: Re: Mosaic... some clarifications
Date: 14 Dec 2001 13:52:54
Message: <1fvq4CAuJkG8Eweo@econym.demon.co.uk>

>On Thu, 13 Dec 2001 04:24:52 -0600, "bob h" <omn### [at] charternet> wrote:
>> >         function {y-F_p(x,y,z).hf*.1}
>> > and it may also be worthwhile to increase the max_gradient on your
>> > second isosurface.
>>
>> It's a miracle!  Well, okay, not exactly a real miracle but close enough.  I
>> didn't know about this .hf thing before
>
>I was surprised too. I know - RTFM, but ".hf" is noted only in one place 
>(6.5.4.2), it is connected with function syntax but listed in isosurface chapter 
>and it
>is not listed in index. Also I wonder what about below script:
>
>#local P=function{pigment{granite}}
>#local F1=function{P(1,2,3).red} // works
>#local F2=function{P(1,2,3).hf}  // works
>#local A1=P(1,2,3).red;          // works
>#local A2=P(1,2,3).hf;           // not
>
>is it bug ?

I confirm that it doesn't parse.

However ".hf" is an experimental feature, so perhaps it shouldn't be
heavily documented yet, since "the design and implementation of these
features is likely to change in future versions of POV-Ray."

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

From: Christoph Hormann
Subject: Re: Mosaic. Is it noise, hf_gray_16....?
Date: 14 Dec 2001 14:16:19
Message: <3C1A5002.6B34C6A@gmx.de>
Did i miss something or do you use an image_map in an isosurface function
without interpolation?  This would lead to infinite gradients and
therefore serious problems.  

Because of this the '.hf' is probably not very useful in most cases since
it won't work with interpolation.  

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: bob h
Subject: Re: Mosaic. Is it noise, hf_gray_16....?
Date: 14 Dec 2001 16:30:43
Message: <3c1a6f83@news.povray.org>
"Christoph Hormann" <chr### [at] gmxde> wrote in message
news:3C1### [at] gmxde...
>
> Did i miss something or do you use an image_map in an isosurface function
> without interpolation?  This would lead to infinite gradients and
> therefore serious problems.
>
> Because of this the '.hf' is probably not very useful in most cases since
> it won't work with interpolation.

Went back and checked both with and without interpolate.  Yes, it makes a
big difference.  If not used the isosurface is contoured, and with
interpolate it is contour-free.  I hadn't gotten a sufficient max_gradient
to smooth it without interpolate so now that makes sense.

The previous contouring I was talking about was simply the original
hf_gray_16 output, which turns out to be max_gradient related because of
being a isosurface too.  I was expecting that perhaps max_gradient was being
done differently by default now to where it chose the best automatically.
Maybe my fault for reading between the lines concerning how isosurface
workings had changed.  I was kind of clumping it all together there by using
two isosurfaces in one test  :-)  a regular pigment pattern could have
sufficed.

The major thing is that .hf instead of .gray was the real answer.
--
text{ttf"arial","bob h",.1,0pigment{rgb 9}translate<-1,-.2,3>}


Post a reply to this message

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