Milkshape->Ogre animation conversion

Advanced game related topics
Dare2
Moderator
Moderator
Posts: 3321
Joined: Sat Dec 27, 2003 3:55 am
Location: Great Southern Land

Milkshape->Ogre animation conversion

Post by Dare2 »

Downloaded some of Psionic's neat models (.ms3d) and converted them with the Milkshape exporter (1.0.3p1).

The resulting mesh default can be viewed with PureBasic (using latest 3d engine) but the anims cannot be run. They can be seen/played with the mesh viewer, however.

Anybody know a way to get around this? Make the PureBasic-able?

(PS: PureBasic's engine can run animations as the Robot anims work, so there is hopefully just some small thing to be tweaked.)
@}--`--,-- A rose by any other name ..
Fred
Administrator
Administrator
Posts: 18384
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

Note than the name of the animation are case sensitive.
Dare2
Moderator
Moderator
Posts: 3321
Joined: Sat Dec 27, 2003 3:55 am
Location: Great Southern Land

Post by Dare2 »

Hi Fred,

Thanks. I made sure of the case when using AnimateEntity().

The Robot moves, and so does your turtle. :)

My conversion's don't in PureBasic, but do in the viewer. Not sure what the problem is here. Probably me. :)

PS: I basically use defaults: Set frame rate to 24, check the Generate Edge Lists; Generate Tangents (sometimes); Export Mesh and Skeleton; Split Keyframe into Multiple Sequences. Have a text file with the frames and names, eg, 1,2,Walk
@}--`--,-- A rose by any other name ..
thefool
Always Here
Always Here
Posts: 5875
Joined: Sat Aug 30, 2003 5:58 pm
Location: Denmark

Post by thefool »

could you post the source you are using to view them with, as well as one of the unconverted models? (ms3d format)
Dare2
Moderator
Moderator
Posts: 3321
Joined: Sat Dec 27, 2003 3:55 am
Location: Great Southern Land

Post by Dare2 »

Heya, how you doing! :)

The milkshape files I downloaded from here:

http://www.insanesoftware.de/index.php? ... ources.php

Ninja and Zombie, and there is a link there somewhere to other stuff like dwarves.

The code is a simple viewer based on a PureBasic example:

Code: Select all

;
; ------------------------------------------------------------
;
;   PureBasic - Entity
;
;    (c) 2002 - Fantaisie Software
;
; ------------------------------------------------------------
;

IncludeFile "Screen3DRequester.pb"

DefType.f KeyX, KeyY, MouseX, MouseY

  
If InitEngine3D()

  Add3DArchive("Data\"          , #PB_3DArchive_FileSystem)
  
  InitSprite()
  InitKeyboard()
  InitMouse()
  
  If Screen3DRequester()
    
    LoadMesh   (0, "c_turtle.mesh")                               ; Freds turtle
    CreateMaterial(0, LoadTexture(0, "c_turtle.tga"))
    CreateEntity(0, MeshID(0), MaterialID(0))

    CreateCamera(0, 0, 0, 100, 100)
    CameraLocate(0,0,0,100)

    AnimateEntity(0,"cwalk")                                        ; Move along now!

    Repeat
      Screen3DEvents()
      ClearScreen(0, 0, 128)
      If ExamineKeyboard()
        If KeyboardPushed(#PB_Key_Left)
          KeyX = -1
        ElseIf KeyboardPushed(#PB_Key_Right)
          KeyX = 1
        Else
          KeyX = 0
        EndIf
        If KeyboardPushed(#PB_Key_Up)
          KeyY = -1
        ElseIf KeyboardPushed(#PB_Key_Down)
          KeyY = 1
        Else
          KeyY = 0
        EndIf
        
        If KeyboardPushed(#PB_Key_PageUp)
          RollZ = 3
        Else
          RollZ = 0
        EndIf
        
        If KeyboardPushed(#PB_Key_Add)
          Frame.f+0.005
        EndIf
        
      EndIf
      
      If ExamineMouse()
        MouseX = -MouseDeltaX()/10 
        MouseY = -MouseDeltaY()/10
      EndIf
      
      RotateEntity(0, 1, 0, 0)
      
      RotateCamera(0, MouseX, MouseY, RollZ)
      MoveCamera  (0, KeyX, 0, KeyY)
      RenderWorld()
      Screen3DStats()
      FlipBuffers()
    Until KeyboardPushed(#PB_Key_Escape) Or Quit = 1
  EndIf
    
Else
  MessageRequester("Error", "The 3D Engine can't be initialized",0)
EndIf
  
End
Actually, a few anims work, those not converted but those taken from the ogre demo or Fred's data zip. Eg the fish (demo) and the turtle (Fred)

Thanks.


EDIT:

Link to more of his models:

http://www.psionic3d.co.uk/resources.html
@}--`--,-- A rose by any other name ..
Dare2
Moderator
Moderator
Posts: 3321
Joined: Sat Dec 27, 2003 3:55 am
Location: Great Southern Land

Post by Dare2 »

Hi,

Before I start trying to do something that is currently way outside my expertise, can somebody advise me if it is it possible to load ogre dll's and somehow use them with the PureBasic implementation.

IE, how would the dll know about the world created via PB, and vice versa?

The following is a very large (>800kb owing to one big mesh) file with a very junky walkthrough. Robot can be guided around a flat area with a statue (the big mesh) being the only feature.

http://www.gemcutters.net/special/wt3d.zip

Before you DL 800kb of file, it uses the new ogre libs, it is klurgy, and there is nothing ground-breaking in it. Everything is taken from somewhere else, including some neat collision and gravity type code by Comtois - Demo_Collision3D.pb - which can be got from www.purearea.net and which is the most useful thing in the code.

But the Robot walks and jumps and stands still on command. :)
@}--`--,-- A rose by any other name ..
zefiro_flashparty
User
User
Posts: 74
Joined: Fri Mar 04, 2005 7:46 pm
Location: argentina

can you help me to export animation xD

Post by zefiro_flashparty »

:?
Post Reply