Jump to content
  • Advertisement
Sign in to follow this  

Make Bone Rig

This topic is 3657 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!