Make Bone Rig

Recommended Posts

Using Vb.Net 2003 With DX 9.0c Dec 2004 I'm trying to make a bone rig from scratch so I can make some animated characters. I've tried .x file animation but it is not working with my app. I've been all over the net and cannot find any info on how to make a rig.If anybody can point me somewhere or show me how to do this that would be cool. I have made a point skeleton, but I'm not sure it is the right way to do it. I want to make it as efficiently as possible. Here is some code for a knee.
Public Class LKne
Private Device As Device
Dim Tick As Integer
Dim XRotation As Single
Dim YRotation As Single
Dim ZRotation As Single
Dim pLknee(0) As CustomVertex.TransformedColored
Public Sub New(ByVal Device As Device)
Me.Device = Device
Me.pLknee(0) = New CustomVertex.TransformedColored(15, -35, 0, 1, Color.White.ToArgb()) 'lknee
End Sub

Public Sub RotationMatrices(ByVal X As Single, ByVal Y As Single, ByVal Z As Single)
Device.Transform.World = Matrix.Multiply(Device.Transform.World, Matrix.RotationX(CSng(X * Math.PI / 180)))
Device.Transform.World = Matrix.Multiply(Device.Transform.World, Matrix.RotationY(CSng(Y * Math.PI / 180)))
Device.Transform.World = Matrix.Multiply(Device.Transform.World, Matrix.RotationZ(CSng(Z * Math.PI / 180)))
End Sub 'RotationMatrices

Public Sub TranslationMatrices(ByVal X As Single, ByVal Y As Single, ByVal Z As Single)
Device.Transform.World = Matrix.Multiply(Device.Transform.World, Matrix.Translation(X, Y, Z))
End Sub 'TranslationMatrices

Public Sub ScaleMatrices(ByVal X As Single, ByVal Y As Single, ByVal Z As Single)
Device.Transform.World = Matrix.Multiply(Device.Transform.World, Matrix.Scaling(X / 100, Y / 100, Z / 100))
End Sub 'ScaleMatrices
Public Sub Render()
Tick = Environment.TickCount

Device.Transform.World = Matrix.RotationYawPitchRoll(XRotation, YRotation, ZRotation)
Device.DrawUserPrimitives(PrimitiveType.PointList, 1, Me.pLknee)
End Sub
End Class


I did that for all the bones for which I have 25 so far,I didn't do the hands yet. I just think I'm going about it the wrong way. Thanks if you can help. Steve

Create an account

Register a new account

• Forum Statistics

• Total Topics
627765
• Total Posts
2978982

• 11
• 10
• 10
• 23
• 14