|
|
"M. Aitchison" <ait### [at] nospamnzldcom> wrote in message
news:3b469bf5@news.povray.org...
> I've been using Megapov v0.7, and I'm wondering weither it is posable to
use
> a bitmap with an isosurface. It seems that I can't use some functions
such
> as eval_pattern, or eval_pigment when defining a fuction for the
isosurface.
> Is there any way to get around this? I thought of storing the bitmap in
an
> array, but I can't even use arrays when defining the function. All of
this
> is in an attempt to create a spherical height map. If anyone knows how
this
> could be achived please let me know.
> Thanks
> ____________
> Matt
This might give you some clues replace Grass with any object
#declare GMTex = texture{
pigment{
ripples
color_map {
[0 rgb <1,.85,.75>*2]
[1 rgb <.85,.75,.5>*2]} //.85
scale <1, 5,10>/3
rotate y*-20
warp{turbulence .375}
}
finish { ambient-.0001 diffuse .9 specular .25 roughness .01 crand .05}
normal{
average normal_map{
[0 ripples .0075 scale <2, 5,10>/3 warp{turbulence .25}rotate y*-20
translate x*.5]
[.5 agate normal_map{[0 bumps 1 scale .1][.5 bumps.0001]}scale 5 rotate
y*76]
}
}
}
#declare R = seed(463);
#declare GM =
height_field {
pattern 1000, 1000 {
hf_gray_16
spotted
color_map {
[ 0.0 rgb 0 ]
[ 1.0 rgb .1 ]
}
rotate y*35
warp {turbulence 2 lambda .25 }
scale 0.05
}
smooth
}
object{GM rotate y*-18 scale <350,50,600>translate <-50,
0, -50>texture{GMTex}}
//------------------------------------------------------------
#if (Grass_on = 1)
$ TracedObj = union{
$ Norm = <0,0,0>;
$ Xpos = 0;
$ Zpos = 0;
// HERE is the image map
$ Pig=pigment{spotted color_map{[0 rgb 1][1 rgb 0]}scale .0325 translate
<-1,0,005>} //5
#while (Xpos<1)
#while (Zpos<1)
$ SPos = <Xpos,1,Zpos>;
$ PP=eval_pigment( Pig, <Xpos,0,Zpos> ); // THIS tests the image map
$ XX = PP.x;
// #warning concat(str(XX,10,3),"\n")
$ Inter = trace (GM,SPos,<0,-1,0>, Norm );
#if (vlength(Norm)!=0 & XX >.45)
#if(Inter.y<.05 )
object{Grass scale <.00007,.0006+(rand(R)/2000),.000065> rotate
y*rand(R)*360
translate <Inter.x+(rand(R)/30),Inter.y,Inter.z+(rand(R)/30)>
}
#end
#end
$ Zpos = Zpos +.00275;
#end
$ Zpos = 0;
$ Xpos = Xpos +.00275;
#end
}
object{TracedObj rotate y*-18 scale <350,50,600>translate <-50, -.5, -50>}
Hope this helps
Mick
Post a reply to this message
|
|