Are there any tutorials, examples, or simple explantions available regarding UV Morphs that are suitable for a hard-of-thinking newcomer to Panda? I’d like to “animate” several polygons in a model by altering texture coordinates. Is this possible using UV Morphs?
From a post by drwr:
Suppose, for example’s sake, I had the following single-poly model with a flag and a single joint:
<CoordinateSystem> { Y-Up-Left }
<Comment> {
"x2egg triangle.x triangle.egg"
}
<Texture> tref1 {
tread.PNG
}
<Group> triangle {
<Dart> { 1 }
<Joint> Scene_Root {
<Transform> {
<Matrix4> {
1 0 0 0
0 1 0 0
0 0 1 0
0 0 0 1
}
}
<Joint> joint1 {
<Transform> {
<Matrix4> {
1 0 0 0
0 1 0 0
0 0 1 0
0 -0.00159 0 1
}
}
<Joint> Plane01 {
<Transform> {
<Matrix4> {
1 0 0 0
0 1 0 0
0 0 1 0
0 0 0 1
}
}
<Group> {
<VertexPool> vpool1 {
<Vertex> 0 {
-20 -20.2708 0
<UV> { 0.003906 0.935705 }
<Normal> { 0 0 -1 }
// joint1:1
}
<Vertex> 1 {
23 -20.2708 0
<UV> { 0.07681 0.935705 }
<Normal> { 0 0 -1 }
// joint1:1
}
<Vertex> 2 {
0 20.7292 0
<UV> { 0.037815 0.996094 }
<Normal> { 0 0 -1 }
// joint1:1
}
}
<Polygon> {
<RGBA> { 0.8 0.8 0.8 1 }
<TRef> { tref1 }
<VertexRef> { 0 1 2 <Ref> { vpool1 } }
}
}
}
<VertexRef> {
0 1 2
<Ref> { vpool1 }
}
}
}
}
<Table> AnimationSet0 {
<Bundle> triangle {
<Table> "<skeleton>" {
<Table> Scene_Root {
<Xfm$Anim_S$> xform {
<Scalar> fps { 24 }
<Char*> order { srpht }
}
<Table> joint1 {
<Xfm$Anim_S$> xform {
<Scalar> fps { 24 }
<Char*> order { srpht }
<S$Anim> y { <V> { -0.00159 } }
}
<Table> Plane01 {
<Xfm$Anim_S$> xform {
<Scalar> fps { 24 }
<Char*> order { srpht }
}
}
}
}
}
}
}
Can this polygon’s uv mapping be made to cycle continuously through three different areas of the texture? I’m guessing that and a morph table would be involved somehow.