POV-Ray : Newsgroups : povray.general : Problem with patterns in height_fields Server Time
31 Jul 2024 16:17:36 EDT (-0400)
  Problem with patterns in height_fields (Message 1 to 5 of 5)  
From: Hugo
Subject: Problem with patterns in height_fields
Date: 4 Jan 2002 16:15:35
Message: <3c361b77$1@news.povray.org>
Hello,

I have a problem with Pov3.5beta9 and noone seems to have mentioned it yet..
Sorry, I can't follow all threads in all groups, but a search didn't give a
result either.

Why does the following code produce some abrupt changes in the Y direction?
The result is these shadowed lines and dots. I tried different scales and
patterns, and different resolutions of the function. You're welcome to
experiment with this yourself, to see that the problem is not something
dull, like too few triangles or a bad scale.. I don't know what it is,
actually.


camera { location <12,18,-12>*.9 look_at 0 }
light_source { <-38,60,-30>, 1 shadowless }

#declare Pigm=function { pattern { bumps scale .014 } }

height_field { function 500,500 { y-Pigm(x,y,z) }
 pigment { rgb 1 }
 translate -.5 scale <40,.3,40> rotate 90*y
}



Regards,
Hugo


Post a reply to this message

From: Simon Adameit
Subject: Re: Problem with patterns in height_fields
Date: 4 Jan 2002 17:09:36
Message: <3c362820@news.povray.org>
> Why does the following code produce some abrupt changes in the Y
direction?
> The result is these shadowed lines and dots. I tried different scales and
> patterns, and different resolutions of the function. You're welcome to
> experiment with this yourself, to see that the problem is not something
> dull, like too few triangles or a bad scale.. I don't know what it is,
> actually.
>
That's because your function gives you negative values.
Heightfields doen't work with negative values.
Change your function to function{Pigm(x,y,z)} and it'll work.
If you want to invert your heightfield just use function{-Pigm(x,y,z)}

--
#local T=text{ttf"timrom.ttf""Simon Adameit".01,0}#local Y=1;#while(Y>-1)
#local X=0;#while(X<7)#local O=trace(T<X,Y><X,Y>+z);cylinder{<X-3,Y,5>*.01
<X-3,Y,5>*.01+5e-3,5e-5pigment{rgb 25*O}}#debug chr(83-(O.x=0)*51)#local
X=X+.05;#end#debug"\n"#local Y=Y-.05;#end


Post a reply to this message

From: Hugo
Subject: Re: Problem with patterns in height_fields
Date: 4 Jan 2002 19:45:06
Message: <3c364c92@news.povray.org>
> That's because your function gives you negative values.

Thank you!
I'll look into this..  :o)


Hugo


Post a reply to this message

From: Christoph Hormann
Subject: Re: Problem with patterns in height_fields
Date: 5 Jan 2002 04:51:41
Message: <3C36CCA6.A1FFDFFF@gmx.de>
Hugo wrote:
> 
>[...]
> 
> Why does the following code produce some abrupt changes in the Y direction?
> The result is these shadowed lines and dots. I tried different scales and
> patterns, and different resolutions of the function. You're welcome to
> experiment with this yourself, to see that the problem is not something
> dull, like too few triangles or a bad scale.. I don't know what it is,
> actually.
> 
> [...]
> height_field { function 500,500 { y-Pigm(x,y,z) }

The function in heightfields is not the same as in an isosurface.  It is
evaluated in the xy-plane and the function value determines the height of
the heightfield.  Try:

height_field { function 500,500 { Pigm(x,y,0) }


-- 
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: Alan Kong
Subject: Re: Problem with patterns in height_fields
Date: 5 Jan 2002 11:37:25
Message: <clae3u0du959c6euca94k1n9e9fka7dgea@4ax.com>
On Fri, 4 Jan 2002 22:20:29 +0100 Hugo wrote:

>I have a problem with Pov3.5beta9 and noone seems to have mentioned it yet..
>Sorry, I can't follow all threads in all groups, but a search didn't give a
>result either.

  POV-Ray v3.5 beta bug reports and discussions should be posted to
povray.beta-test, as noted at http://www.povray.org/ on the beta 9 download
page.

  The group povray.general would be the correct place to post when it
concerns the current release version of POV-Ray, which is v3.1g.

  Thanks for your participation.

(followups to p.beta-test)

-- 
Alan
ako### [at] povrayorg
a k o n g <at> p o v r a y <dot> o r g


Post a reply to this message

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