|
![](/i/fill.gif) |
Yadgar wrote:
>
> Hi Tracers!
>
> Today, I fiddled around with exponential scaling of simple pigment
> pattern, for example checker.
> I made a checker pattern with rgb <1, 0, 0> and rgb <0, 0.5, 1> and made
> an animation, during which it is scaled exponentially down to 1/10^11. I
> hoped, that sooner or later, the two colors would blend into a
> homogenous average color, such as rgb <0.5, 0.25, 0.5>. But instead, I
> got strange interference patterns, sometimes single frames with
> stretched patterns at much too large scale showed up.
>
> Then I tried AA, non-recursive, first at 0.3, than at 0 threshold - the
> whole thing became fuzzier, but there are still those strange dropout
> frames. Now I do it at threshold 0, still method 1, but with depth 9 -
> calculation takes ages, and it's simply not proceeded far enough yet to
> estimate the results. Is there any way to make any pigment pattern at
> very small scales blend into one single color?
You can build some anti-aliasing into the pigment. You have to know how
much area is spanned by each pixel. Then you build several pigments,
each one moved around slightly, and average them together. Apply this
to your surface.
I've done this in a couple of my IRTC entries. In "Robotany" the little
placards in the background are pre-blurred for far-away shots. In
"Revenge of the Greb" I blurred a brick pattern so that the rays would
hit the mortar in a reliable way.
Here is some sample code here:
#local Brick=
pigment {
bozo color_map { [0 rgb .6] [1 rgb .5] }
scale 30
warp { repeat y*20 offset z*15 }
}
#local pigT111=pigment { brick
pigment { rgb <.95,.85,.75> } , pigment { Brick }
brick_size <30,20,15>
mortar 1
transform FlipXZ
}
#ifdef(BrickBlur)
#local sD=vlength(BrickBlur-pCamL)/sCamZ/240;
#local pigT111=pigment { average
pigment_map {
#local iI=-7; #while(iI<8)
#local iJ=-7; #while(iJ<8)
[1 pigT111 translate <0,iI,iJ>/16*sD ]
#local iJ=iJ+2; #end
#local iI=iI+2; #end
}
}
#end
In this code, BrickBlur is a spot on the wall that the camera is facing,
sCamZ is the length of the direction vector in the camera, 240 happens
to be the height of the image, and pCamL is the location of the camera.
If you were to use this code, the camera would be specified this way:
camera {
direction z*sCamZ
location pCamL
look_at BrickBlur
}
Hope this helps.
> Now playing: Don't Go (Yes)
I've played that album continuously over the past three weeks! It's
got some not-so-good tracks, but "Give Love Each Day" and "In the
Presence Of" are great tracks.
Regards,
John
--
ICQ: 46085459
Post a reply to this message
|
![](/i/fill.gif) |