|
|
Hmmm.
I have 4 bicubic patches arranged in a square.
I want to texture them all as a single unit, but they all seem to get textured
independently, so I get 4 copies of my uv-map.
I have them in a union, with the uv texture applied after that, and merge didn't
work either.
They're all coded the same, and I was thinking about it and thought that maybe
since all 4 had uv_mapping in their separate definitions, that there was where
the problem lay.
So I commented that out in 2 of the patches, and now I get 2 patches with
"elevation lines" - (Yay! If that's what I wanted, but I don't not _now_ )
either I'm doing something wrong, or I'm a step or 2 away from getting right and
can't tell which yet.
Maybe it's got to do with the uv_vectors section, or I need a whole 'nother
array of vectors for the uv mapping?
Another issue I've noticed is that I have to rotate the texture around y by 180
deg when I view it in the usual +z direction. Is that an inherent property of
the bicubic patch object, or can it be redefined....?
I will post complete scene file once I get more of this worked out.
-----------------------------------------
#declare RedPatch = bicubic_patch {
type 1 flatness 0.001
u_steps 4 v_steps 4
uv_vectors
<0, 0> <1, 0> <1, 1> <0, 1>
R11, R12, R13, R14
R21, R22, R23, R24
R31, R32, R33, R34
R41, R42, R43, R44
//uv_mapping
#if (UVtex = false)
texture {
pigment {
checker
color rgbf <1, 1, 1, 0.5>
color rgbf <1, 0, 0, 0.7>
scale 1/3
}
finish {phong 0.6 phong_size 20}
}
#end
no_shadow
}
---------------------------------
#union {
object {BluePatch}
object {RedPatch}
object {GreenPatch}
object {YellowPatch}
#if (UVtex = true)
#switch (UVMAP)
#case (0)
texture { pigment { image_map { png "Numbered_Grid-Red-Green.png" } scale 2}
rotate y*180}
#break
...... other cases, and #ends.
Post a reply to this message
|
|