|
|
William F Pokorny <ano### [at] anonymousorg> wrote:
> As we were playing around with image_maps and height_fields, I was
> reminded there is support for the keywords 'repeat' and 'offset' in the
> image_map and bump_map code.
>
They're still there in v3.8, in the docs at "3.6.2.5.5 Warp"
I remembered 'repeat' and 'offset', but not 'flip'.
>
> Attached an image with traditional 'once' map on the left. In the middle
> using repeat <2,2> (how many/much in 1x1) and offset <0.5,0.5>
> (accounting for 2x repeats in 1x1).
The middle image shows only one smaller image_map; should there be two instead?
I just tried this warp {repeat...} stuff on the function height_fields that
we've been discussing recently-- to try another way to eliminate the 'mirror
flipping in z' of the HF result. It WORKS! (with a certain configuration of the
warp items that's not yet understandable to me)-- and successfully takes the
place of the (1-y) fix that's required when the function is used later. The same
warp construction works for BOTH an image_map-to-function-to-HF, as well as
typical patterns like 'onion' and granite' (the only patterns I've tested so
far). Thanks for suggesting this; now we have *multiple* ways to fix the HF
mirroring flaw.
Example 1:
#declare somb =
function{
pigment{
image_map{png "...MY_IMAGE..." once}
warp{repeat -y offset -y flip -y} // OR warp{repeat -x flip y}
}
}
Example 2:
#declare somb =
function{
pigment{
granite scale 2
warp{repeat -y offset -y flip -y}
}
}
Post a reply to this message
|
|