|
|
I have an unusual problem -- image maps that are a different size and aspect
ratio than the heightfield they match.
I have precise information on where they belong relative to the heightfield, and
I can get them to fit with hardcoded values, but any sort of macro to fit it
based on the information I have has eluded me for the last week.
Hence I politely ask for help creating a macro for the translations+rotations in
the pigment section, like:
IMG_FIT(-0.5, +0.0,
+1.0, +1.0)
where the first two coordinates are the upper left corner of the imagemap
relative to the heightfield, and the second two are the lower right. Yes, part
of the left side of the image would miss the heightfield, that is the idea.
My silly efforts so far, just so you know I've tried:
#macro IMGMAP_FIT(XSCALE, YSCALE, XOFF, YOFF)
rotate <90, 0, 0> // Face up
translate<-0.5, -0.5, -0.5> // Center
scale <-XSCALE, 1, -YSCALE> // Resize
translate<(XSCALE-1)/2, 0, -(YSCALE-1)/2> // Relocate
#end
Post a reply to this message
|
|