
You can see in the top-right on the terrain... something a bit odd happens. This PLSM2 terrain, but Vertex shading on the terrain is off. The thing that gets me is that I've done all the same things to the arms and legs as I did to the head of the model as far as changing textures and animating, but neither the head nor the chest (I haven't done anything extra with the chest) have this problem. My Arms, Legs and Helmet were comprised of several pieces, but I added them together (into Arms, Legs and Helmet pieces.)
When I turn off the shader and use default skinning, nothing goes wrong. When I use 4 weight skinning program, it changes a little bit, but not much. When I edit Example_Basic.cg and remove everything but the vertex math, it still happens.
The skeleton has more than 24 bones BUT the none of the meshes has 24 bones influencing it. Furthermore, the animations go off without a hitch - it's the terrain that gets weird.
The material script is here - I use Maya 7.0 to export and edit it:
Code: Select all
vertex_program HardwareSkinningOneWeight cg
{
source Example_Basic.cg
entry_point hardwareSkinningOneWeight_vp
includes_skeletal_animation true
profiles vs_1_1
}
material ArmsPhong
{
technique
{
pass
{
vertex_program_ref HardwareSkinningOneWeight
{
param_named_auto worldMatrix3x4Array[0] world_matrix_array_3x4
param_named_auto viewProjectionMatrix viewproj_matrix
param_named_auto lightPos[0] light_position 0
param_named_auto lightPos[1] light_position 1
param_named_auto lightDiffuseColour[0] light_diffuse_colour 0
param_named_auto lightDiffuseColour[1] light_diffuse_colour 1
param_named_auto ambient ambient_light_colour
}
texture_unit
{
texture armor_arms.dds
tex_coord_set 0
colour_op modulate
}
}
}
technique
{
pass
{
ambient 1 1 1 1
diffuse 1 1 1 1
specular 0.5 0.5 0.5 20
emissive 0 0 0
texture_unit
{
texture armor_arms.dds
tex_coord_set 0
colour_op modulate
}
}
}
}
Anyone have any past experience or input on this? This is basically my last major obstacle before I can move into the real nitty-gritty of the game.
