|
|
Is there a reference that better explains uv-mapping for bezier patches?
It's hard to make heads or tails of how to construct a patch and uv-map it so
that both the outside and the inside textures are oriented in a way that makes
any sense.
The defaults seem --- odd. I t appears I'm not the first to think this.
http://www.joshuarenglish.com/cyclopedia/uv_bicubic.html
(See Section 4 at the bottom)
It's unclear to me _exactly_ what the 4 uv vectors are for and what they
specifically do. How do they function along with the control points?
I have a vague understanding of the generalities, but I would like to find some
specifics.
The following works for me, but gives an inverted interior texture when I flip
the patch 180 degrees to view the back.
// Control points arranged from origin over and up
// >>> UV VECTORS ARRANGED clockwise from top left around right and down
around to bottom left <<<
bicubic_patch {
type 1
flatness 0
u_steps 3
v_steps 3
// default
// uv_vectors <0,0>,<1,0>,<1,1>,<0,1>
uv_vectors
<0, 1> <1, 1> <1, 0> <0, 0>
<X13, Y13, Z13>, <X14, Y14, Z14>, <X15, Y15, Z15>, <X16, Y16, Z16>,
< X9, Y9, Z9>, <X10, Y10, Z10>, <X11, Y11, Z11>, <X12, Y12, Z12>,
< X5, Y5, Z5>, < X6, Y6, Z6>, < X7, Y7, Z7>, < X8, Y8, Z8>,
< X1, Y1, Z1>, < X2, Y2, Z2>, < X3, Y3, Z3>, < X4, Y4, Z4>
uv_mapping
interior_texture {pigment {image_map {png "UVtesttexture1.png"} scale 1}
finish {phong 0.6 phong_size 20} }
texture {pigment {image_map {png "UVtesttexture2.png"} scale 1} finish
{phong 0.6 phong_size 20} }
} // end bicubic_patch 1
I would like to do some further write-ups and diagrams if I can noodle this all
out.
Has anyone else done any bezier patch experiments who could provide some
information and/or SDL?
Thanks.
Post a reply to this message
|
|