   [MDX] Animated meshes with HLSL [Semi-Solved]
  Everything with fixed function was working pretty well in my vb engine, now I'm updating it to use shaders, the static meshes have been quite easy to integrate with the excellent tutorials out there and some posts from this forum but the problem is coming with animated meshes, I've found a c# port of the simple animation sample. I'm using the same shader to start working so I adapted the changes to my engine to get it working but although I'm not getting any error neither tiny.x nor an animated cylinder I've created for testing purposes are showing on my render form, I'm including my DrawMeshContainer code that did work with ff but not with shaders. Any help would be appreciated.'Not including the whole methodxoDevice.RenderState.IndexedVertexBlendEnable = True  Dim attribIdPrev As Integer = -1  Dim iattrib As Integer = 0  For iattrib = 0 To mesh.NumeroAtributos - 1 Dim numBlend As Integer = 0 Dim bones() As BoneCombination = mesh.Bones Dim i As Integer = 0 For i = 0 To mesh.NumeroInfluencias - 1If bones(iattrib).BoneId(i) <> -1 Then    numBlend = iEnd If Next If xoDevice.DeviceCaps.MaxVertexBlendMatrices >= numBlend + 1 ThenDim offsetMatrices() As Matrix = mesh.OffsetMatricesDim frameMatrices() As ExFrame = mesh.FramesDim clippedBoneMatrices(mesh.NumeroInfluencias - 1) As MatrixFor i = 0 To mesh.NumeroInfluencias - 1    Dim matrixIndex As Integer = bones(iattrib).BoneId(i)    If matrixIndex <> -1 Then   Dim tempMatrix As Matrix = offsetMatrices(matrixIndex) * frameMatrices(matrixIndex).MatrizTransformacionCombinada  clippedBoneMatrices(i) = tempMatrix    End IfNextfoefecte.SetValue("mWorldMatrixArray", clippedBoneMatrices)foefecte.SetValue("CurNumBones", mesh.NumeroInfluencias - 1)xoDevice.RenderState.VertexBlend = CType(numBlend, VertexBlend)If (attribIdPrev <> bones(iattrib).AttributeId) Or (attribIdPrev = 1) Then    Dim tempMateriales() As ExtendedMaterial = mesh.GetMaterials  'we add light contributions    Dim color1 As Color = tempMateriales(bones(iattrib).AttributeId).Material3D.Ambient    Dim color2 As Color = Color.FromArgb(255, 64, 64, 64)    Dim color3 As Color = tempMateriales(bones(iattrib).AttributeId).Material3D.Emissive    Dim ambEmm As Color = Microsoft.DirectX.Direct3D.ColorOperator.Modulate(color1, color2)    ambEmm = ColorOperator.Add(ambEmm, color3)    Dim color4 As ColorValue = ColorValue.FromColor(tempMateriales(bones(iattrib).AttributeId).Material3D.Diffuse)    'set color proerties in the shader    foefecte.SetValue("MaterialDiffuse", color4)    foefecte.SetValue("MaterialAmbient", ColorValue.FromColor(ambEmm))    Dim tempTextures() As Texture = mesh.Textura    xoDevice.SetTexture(0, tempTextures(bones(iattrib).AttributeId))    attribIdPrev = bones(iattrib).AttributeIdEnd Iffoefecte.CommitChanges()Dim pasActual As Integer = 0Dim pasos As Integer = foefecte.Begin(FX.DoNotSaveState)For pasActual = 0 To pasos - 1    foefecte.BeginPass(pasActual)    mesh.MeshData.Mesh.DrawSubset(iattrib)    foefecte.EndPass()Nextfoefecte.End() End If  NextEdit:I forgot to set the view projetion matrix, now the meshes are showing but some vertices are doing weird things, I've got to try some more things.[Edited by - Dreamy on June 6, 2006 5:31:15 PM]