|
![](/i/fill.gif) |
On 18-9-2014 10:08, s.day wrote:
> Hi Thomas,
>
> This is looking really great, I pobably am missing some step but how exactly can
> you bend a mesh2 object in pov?
>
I shall upload the model soon, when I have finished some corrections.
In the mean time, you need to build the model following inverse
kinematic principles. This means that the model subdivided in discrete
elements and articulated at their juncture, but not in a haphazardly
way. Here follows the construction of the reed stalk as I use it. You
can already study its inner workings:
#macro Reed(Bend)
//random rotation for the whole stalk:
#local Rot = RRand(-180, 180, R);
//construction of the Inverse kinematic stalk:
#local Bend1 = Bend+((2*Bend)/10);
#local Plume =
union {
object {ReedMesh_03_ik_Reed01_plume_ material{Reed01_plume_} hollow
translate -10.40*y rotate Rot*y rotate Bend1*x translate (10.40-10.18)*y }
object {ReedMesh_03_ik_Reed01_11_ material{Reed01_11_} hollow
translate -10.18*y rotate Rot*y}
}
#local Bend2 = Bend+(Bend/10);
#local Top =
union {
object {Plume rotate Bend2*x translate (10.18-9.86)*y}
object {ReedMesh_03_ik_Reed01_10_ material{Reed01_10_} hollow
translate -9.86*y rotate Rot*y}
}
#local Stem9 =
union {
object {Top rotate Bend*x translate (9.86-9.54)*y}
object{ReedMesh_03_ik_Reed01_9_ material{Reed01_9_} hollow translate
-9.54*y rotate Rot*y}
}
#local Bend = Bend-(Bend/20);
#local Stem8 =
union {
object {Stem9 rotate Bend*x translate (9.54-9.165)*y}
object{ReedMesh_03_ik_Reed01_8_ material{Reed01_8_} hollow translate
-9.165*y rotate Rot*y}
}
#local Bend = Bend-(Bend/20);
#local Stem7 =
union {
object {Stem8 rotate Bend*x translate (9.165-8.79)*y}
object{ReedMesh_03_ik_Reed01_7_ material{Reed01_7_} hollow translate
-8.79*y rotate Rot*y}
}
#local Bend = Bend-(Bend/20);
#local Stem6 =
union {
object {Stem7 rotate Bend*x translate (8.79-7.72)*y}
object{ReedMesh_03_ik_Reed01_6_ material{Reed01_6_} hollow translate
-7.72*y rotate Rot*y}
}
#local Bend = Bend-(Bend/20);
#local Stem5 =
union {
object {Stem6 rotate Bend*x translate (7.72-6.20)*y}
object{ReedMesh_03_ik_Reed01_5_ material{Reed01_5_} hollow translate
-6.20*y rotate Rot*y}
}
#local Bend = Bend-(Bend/20);
#local Stem4 =
union {
object {Stem5 rotate Bend*x translate (6.20-4.65)*y}
object{ReedMesh_03_ik_Reed01_4_ material{Reed01_4_} hollow translate
-4.65*y rotate Rot*y}
}
#local Bend = Bend-(Bend/20);
#local Stem3 =
union {
object {Stem4 rotate Bend*x translate (4.65-3.10)*y}
object{ReedMesh_03_ik_Reed01_3_ material{Reed01_3_} hollow translate
-3.10*y rotate Rot*y}
}
#local Bend = Bend-(Bend/20);
#local Stem2 =
union {
object {Stem3 rotate Bend*x translate (3.10-1.55)*y}
object{ReedMesh_03_ik_Reed01_2_ material{Reed01_2_} hollow translate
-1.55*y rotate Rot*y}
}
#local Bend = Bend-(Bend/20);
#declare ReedMesh_03 =
union {
object {Stem2 rotate Bend*x translate 1.55*y}
object{ReedMesh_03_ik_Reed01_1_ material{Reed01_1_} hollow rotate Rot*y}
}
#end //macro
As you can see, the construction starts at the top of the stalk and
gradually incorporates adjacent elements until the base is reached. Note
that /only/ rotations can be used as transformations inside the IK
model. All other transformations must be applied to the /complete/ model
or not at all. Note also that /all/ internal rotations of the model are
applied *at the origin*.
Thomas
Post a reply to this message
|
![](/i/fill.gif) |