POV-Ray : Newsgroups : povray.newusers : 2 queries - heighfield and calcul value in message window Server Time
30 Jul 2024 18:12:11 EDT (-0400)
  2 queries - heighfield and calcul value in message window (Message 1 to 4 of 4)  
From: tommy
Subject: 2 queries - heighfield and calcul value in message window
Date: 11 Sep 2003 02:25:01
Message: <web.3f60148b4d42406a472d3920@news.povray.org>
Hi everybody,

Two simple queries.

Cacul value in message window
Most of the time, my script contains things like :
#declare var = 2*L+(5*l+(gap*2))).  What should I do to get the var value in
the message window


Heightfield
I like to do some organic shape.  I thouhg doin it using heighfield.  Is
there a way to give transparency to a certain level (e.g. for all value
ranging from 0 to 0.2, give a rgbf 1) and apply an image_map to the rest.

Thanks for your input.

Tommy
The 1st African citizen POV member !
==================
http://www.webkenya.com/
Promote Web Development in Africa
WWW = Western or World Wide Web ??


Post a reply to this message

From: Hughes, B 
Subject: Re: 2 queries - heighfield and calcul value in message window
Date: 11 Sep 2003 04:20:06
Message: <3f603036@news.povray.org>
"tommy" <tom### [at] webkenyacom> wrote in message
news:web.3f60148b4d42406a472d3920@news.povray.org...
>
> Most of the time, my script contains things like :
> #declare var = 2*L+(5*l+(gap*2))).  What should I do to get the var value
in
> the message window

#debug concat ( "\n", str(var,0,-1), "\n" )

> I like to do some organic shape.  I thouhg doin it using heighfield.  Is
> there a way to give transparency to a certain level (e.g. for all value
> ranging from 0 to 0.2, give a rgbf 1) and apply an image_map to the rest.

Simply use a pigment_map. For what you ask it would be like:

#declare ClearPart=pigment {rgbf 1}
#declare ImageMap=pigment {
    image_map {jpeg "Image.jpg"}
        rotate 90*x // turn to face HF plane
}

height_field {
    png "HF.png"
pigment {
    gradient y
    pigment_map {
        [0.2 ClearPart]
        [0.2 ImageMap] // from 0.2 on upward
    }
}
}

Hopefully this is obvious and doesn't need any explanation. Although you can
also use water_level 51/256 (approx.), which will remove the lowest 5th
part, it would be better to "map" it like this anyway, since the idea is to
apply an image file within a specific range. And then again, if using a
planar map type, no matter so water_level would work in that case.

Just occured to me that I should make sure of what I'm telling you. Default
planar image maps would normally propogate infinitely in two
directions. ----- Okay, checked and it seems to do fine.

Bob H.


Post a reply to this message

From: tommy
Subject: Re: 2 queries - heighfield and calcul value in message window
Date: 12 Sep 2003 01:55:00
Message: <web.3f615ee14d1d9765a472d3920@news.povray.org>
Thanks a lot Bob !

Tommy

Hughes, B. wrote:
>#debug concat ( "\n", str(var,0,-1), "\n" )
>
>
>Simply use a pigment_map. For what you ask it would be like:
>
>#declare ClearPart=pigment {rgbf 1}
>#declare ImageMap=pigment {
>    image_map {jpeg "Image.jpg"}
>        rotate 90*x // turn to face HF plane
>}
>
>height_field {
>    png "HF.png"
>pigment {
>    gradient y
>    pigment_map {
>        [0.2 ClearPart]
>        [0.2 ImageMap] // from 0.2 on upward
>    }
>}
>}
>
>Hopefully this is obvious and doesn't need any explanation. Although you can
>also use water_level 51/256 (approx.), which will remove the lowest 5th
>part, it would be better to "map" it like this anyway, since the idea is to
>apply an image file within a specific range. And then again, if using a
>planar map type, no matter so water_level would work in that case.
>
>Just occured to me that I should make sure of what I'm telling you. Default
>planar image maps would normally propogate infinitely in two
>directions. ----- Okay, checked and it seems to do fine.
>
>Bob H.
>


Post a reply to this message

From: Hughes, B 
Subject: NT: 2 queries answered, you are welcome
Date: 12 Sep 2003 02:40:03
Message: <3f616a43@news.povray.org>


Post a reply to this message

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