need help - character animation

Everything related to 3D programming
User avatar
pf shadoko
Enthusiast
Enthusiast
Posts: 283
Joined: Thu Jul 09, 2015 9:07 am

need help - character animation

Post by pf shadoko »

hi coders,

I am making a paragliding simulator
for the most part, I'm done
I just have to make the man with the animation of the arms movement to pull the brakes
the problem is that PB (for the moment) does not integrate the creation of animations (we can only manage them)
do any of you know of any software that can create meshes with animation?
I would like some advice, I don't know the subject, and it doesn't look simple to me
(if need be, I have a mesh that can be used as a pilot, now I have to create the animation (by morphing or skeleton)
User avatar
Psychophanta
Addict
Addict
Posts: 4975
Joined: Wed Jun 11, 2003 9:33 pm
Location: Lípetsk, Russian Federation
Contact:

Re: need help - character animation

Post by Psychophanta »

pf shadoko wrote: Tue Apr 20, 2021 5:35 pm hi coders,

I am making a paragliding simulator
for the most part, I'm done
I just have to make the man with the animation of the arms movement to pull the brakes
the problem is that PB (for the moment) does not integrate the creation of animations (we can only manage them)
do any of you know of any software that can create meshes with animation?
I would like some advice, I don't know the subject, and it doesn't look simple to me
(if need be, I have a mesh that can be used as a pilot, now I have to create the animation (by morphing or skeleton)
PB allows animation creation, for example using the NodeAnimation lib.
However, to perform what you want I would suggest Blender, which is a powerful and free software.
http://www.zeitgeistmovie.com

While world=business:world+mafia:Wend
Will never leave this forum until the absolute bugfree PB :mrgreen:
User avatar
CDXbow
User
User
Posts: 24
Joined: Mon Aug 12, 2019 5:32 am
Location: Oz

Re: need help - character animation

Post by CDXbow »

I might be able to help, depending on what format your character model is or what your application supports.
I've done a lot of modelling and animation using Max and Misfit3D - including modding Misfit to export Quake MD5 models - https://sourceforge.net/projects/misfitcubed/

However, I am utterly ignorant of how PB interacts with models or what it supports.
User avatar
pf shadoko
Enthusiast
Enthusiast
Posts: 283
Joined: Thu Jul 09, 2015 9:07 am

Re: need help - character animation

Post by pf shadoko »

@ Psychophanta
no, pb does not allow the creation of animated mesh
you can only manage predefined animations or bones
but for that the mesh file must contain the required data.

@ CDXbow
hi and thanks for your proposal,
I need a character like those provided with PB like robot, ninja, sinbad, so in Ogre format (.mesh)
no need for predefined animations (at first), a neutral character, with bones would be enough (PB allows to manage the bones)
I got a neutral character, but only the mesh (position/normal/UV)
I don't think it has a great interest, but if needed I can provide it in dae/obj/fbx format
(in the future, I will try to integrate the creation of bones/animation/morphing in PB (I'm working with Fred on the integration of Ogre in PB)
User avatar
CDXbow
User
User
Posts: 24
Joined: Mon Aug 12, 2019 5:32 am
Location: Oz

Re: need help - character animation

Post by CDXbow »

Hi,
The model you have is just a mesh and not currently boned? There is nothing special about the mesh, you are using it as a placeholder?

So you need a boned character model with certain animations consistent with paragliding?
Can you specify the animations?

Is the model seen from 1st or 3rd person?
What clothing should the model have?
What gender?
What age?
What is the limit on the number of vertices?
Is there a limit on the number of the bones?

I have found a number of OGRE exporters for Max, Milkshape and Blender that seem to include the bones. These are often challenging to get working properly and some very strange things can occur. My initial thought is to try to simply export an animated model successfully in OGRE format from one of these, then do the specific animations. I'll need a couple of days to install the exporters
marc_256
Enthusiast
Enthusiast
Posts: 743
Joined: Thu May 06, 2010 10:16 am
Location: Belgium
Contact:

Re: need help - character animation

Post by marc_256 »

Hi pf shadoko,

- Long time ago I did some stuff in BLENDER and imported the meshes in PB,
but the last version of blender I know, with an .mesh exporter for OGRE was the BLENDER 2.69 version I think.
- You needed to add some extra aps and then it worked very well.
- There you have the possibility to create a bone structure within your mesh.
- They have a lot of imports for different meshes.

greetings,
marc
- every professional was once an amateur - greetings from Pajottenland - Belgium -
PS: sorry for my english I speak flemish ...
User avatar
pf shadoko
Enthusiast
Enthusiast
Posts: 283
Joined: Thu Jul 09, 2015 9:07 am

Re: need help - character animation

Post by pf shadoko »

@ marc_256
thanks for the info about blender

@ CDXbow

in my first post, I wanted an animation of the hands (for the paraglider brakes)
but i saw that we can manage the bones manually, so it's not necessary

my goal is to have a neutral character who can fulfill different roles (car pilot / kayaker (my next game) ...)

to answer your questions:
- to the 3rd person
- man
- undetermined age
- if you have texture so much the better, it will serve as a model
if you have animation for walking / running, so much the better, but in this case it's not essential


the main thing is to have bones to animate it
I will maybe integrate it in the 3d examples of PB, so we need something quite light, a mesh like this:
https://sketchfab.com/sam99liljeholm/co ... -base-mesh
I would also like the unit of length to be the meter (it's boring these meshes which are in arbitrary units, it forces them to be scaled)

below a small program to show you the management of bones (paraglider ninja !)

Code: Select all

Define.f depx,depz,mousex,mousey,dist,a,	rotx,roty,rotz,drot=1
Define i,j,fdf=1,ex,ey
Global Dim Bone.s(100)

InitEngine3D():InitSprite():InitKeyboard():InitMouse()
OpenWindow(0, 0, 0, 0,0, "Manual animation   moving: arows keys+mouse  -  clic: select bone    -  F1-F2 rot X   -  F3-F4 rot Y   -  F5-F6 rot Z    -  F12: Wireframe/Solid",#PB_Window_Maximize)
ex=WindowWidth (0,#PB_Window_InnerCoordinate)
ey=WindowHeight(0,#PB_Window_InnerCoordinate)
OpenWindowedScreen(WindowID(0), 0, 0, ex, ey, 0, 0, 0)

Add3DArchive(#PB_Compiler_Home + "examples/3d/Data/Textures", #PB_3DArchive_FileSystem)
Add3DArchive(#PB_Compiler_Home + "examples/3d/Data/Models", #PB_3DArchive_FileSystem)
Parse3DScripts()

CreateCamera(0, 0, 0, 100, 100):MoveCamera(0,0,2,-3):CameraLookAt(0,0,1,0)
CreateLight(0,$ffffff, 1000, 500, -200)
CameraBackColor(0,$ff8888) 
AmbientColor($888888)

CreateSprite(0,32,32):StartDrawing(SpriteOutput(0)):LineXY(16,0,16,32,$ffffff):LineXY(0,16,32,16,$ffffff):StopDrawing()


LoadMesh(0, "ninja.mesh")   
CreateMaterial(0, LoadTexture(0, "nskingr.jpg"))    
CreateEntity(0, MeshID(0), MaterialID(0),0,0,0,1):ScaleEntity(0,0.01,0.01,0.01)

CreateSphere(100,0.01)
DisableDebugger:CreateMaterial(100,0):EnableDebugger

Procedure refreshbones()
For i=1 To 27
	Bone(i) =  "Joint"+Str(i)
	EnableManualEntityBoneControl(0, Bone(i), #True, #True)
	;CreateEntity(100+i,MeshID(100),MaterialID(100),0,0,0,2):AttachEntityObject(0, Bone(i), EntityID(100+i))
	CreateEntity(100+i,MeshID(100),MaterialID(100),EntityBoneX(0,Bone(i)),EntityBoneY(0,Bone(i)),EntityBoneZ(0,Bone(i)),2)
Next 
EndProcedure

refreshbones()
RotateEntityBone(0, bone(2),28,0,0,0)
RotateEntityBone(0, bone(3),-10,0,0,0)
RotateEntityBone(0, bone(4),-10,0,0,0)

RotateEntityBone(0, bone(18),80,0,0,0):RotateEntityBone(0, bone(19),-90,0,0,0)
RotateEntityBone(0, bone(23),80,0,0,0):RotateEntityBone(0, bone(24),-90,0,0,0)

RotateEntityBone(0, bone(9),80,10,40,0):RotateEntityBone(0, bone(11),80,0,0,0)
RotateEntityBone(0, bone(14),80,-10,-40,0):RotateEntityBone(0, bone(16),80,0,0,0)

;4
;7
Repeat
	WaitWindowEvent()
	ExamineMouse()
	MouseX = -MouseDeltaX() *  0.05
	MouseY = -MouseDeltaY() *  0.05
	ExamineKeyboard()
	depx=(-Bool(KeyboardPushed(#PB_Key_Left))+Bool(KeyboardPushed(#PB_Key_Right)))*0.01
	depz=(-Bool(KeyboardPushed(#PB_Key_Down))+Bool(KeyboardPushed(#PB_Key_Up   )))*0.01+MouseWheel()*0.1
	If KeyboardReleased(#PB_Key_F12):fdf=1-fdf:EndIf
	If fdf:MaterialShadingMode(0, #PB_Material_Wireframe):Else:MaterialShadingMode(0,#PB_Material_Solid):EndIf
	
	If KeyboardReleased(#PB_Key_F10):EnableManualEntityBoneControl(0, Bone(0), #False, #True)  :EndIf   
	
	If MouseButton(1)
		ab=b:b=MousePick(0,ex/2,ey/2,2)-100:If ab<>b:Debug b:EndIf
	EndIf
	If b>=0
		rotx=(-Bool(KeyboardPushed(#PB_Key_F1))+Bool(KeyboardPushed(#PB_Key_F2)))*drot
		roty=(-Bool(KeyboardPushed(#PB_Key_F3))+Bool(KeyboardPushed(#PB_Key_F4)))*drot
		rotz=(-Bool(KeyboardPushed(#PB_Key_F5))+Bool(KeyboardPushed(#PB_Key_F6)))*drot
		RotateEntityBone(0, bone(b),rotx,roty,rotz, #PB_Relative)
		refreshbones()
	EndIf
	
	RotateCamera(0, MouseY, MouseX, 0, #PB_Relative):dist+(depz-dist)*0.5:MoveCamera  (0, depX, 0, -dist)
	If KeyboardPushed(#PB_Key_Space):a+0.2:RotateEntity(0,a,a*2,a*3,0):EndIf
	RenderWorld()
	DisplayTransparentSprite(0,ex/2-16,ey/2-16)
	FlipBuffers()    
Until KeyboardReleased(#PB_Key_Escape) Or MouseButton(3)

For i=1 To 27
	Debug ""+i+"   rx: "+EntityBonePitch(0,bone(i))+"  ry: "+EntityBoneYaw(0,bone(i))+"  rz: "+EntityBoneRoll(0,bone(i))
Next
User avatar
CDXbow
User
User
Posts: 24
Joined: Mon Aug 12, 2019 5:32 am
Location: Oz

Re: need help - character animation

Post by CDXbow »

I tried the 3DMax exporter a short time ago and it exported a 'SCENE' which included a folder Mesh with the character model mesh and skeleton. It's a female soldier with 500+ frames of animation that I purchased many, many years ago. I need for you to see if it loads, animates etc.

If all has gone well you should be able to download it from here https://1drv.ms/u/s!AqdGEnoIfPMm4Ew9c1F ... f?e=PT9l8k

This is the Animation List (Total Frame 646, 30 fps):

- Player IDLE (no weapon) : 0 - 60
- Player IDLE (with weapon) : 65 - 125
- Player RUN FORWARD (no weapon) : 130 - 148
- Player RUN FORWARD (with weapon) : 153 - 171
- Player WALK BACKWARD (no weapon) : 176 - 196
- Player WALK BACKWARD (with weapon) : 201 - 221
- Player SIDEWALK (no weapon) : 226 - 241
- Player SIDEWALK (with weapon) : 246 - 261
- Player DEATH : 266 - 376
- Player JUMP IN SPOT (no weapon) : 381 - 431
- Player JUMP IN SPOT (with weapon) : 436 - 486
- Player JUMP FORWARD (no weapon) : 491 - 541
- Player FALL / in air (no weapon) : XX491 - 541
- Player LAND (no weapon) : 546 - 556
- Player JUMP FORWARD (with weapon) : 571 - 621
- Player FALL / in air (with weapon) : 626 - 636
- Player LAND (with weapon) : 641 - 646

Let me know how you go.

Cheers

CD

ADDED: The character loads and animates in OgreMeshy, but doesn't find it's material. That's a good start.
marc_256
Enthusiast
Enthusiast
Posts: 743
Joined: Thu May 06, 2010 10:16 am
Location: Belgium
Contact:

Re: need help - character animation

Post by marc_256 »

Hi,

I think today OGRE released the newest BLENDER2OGRE for BLENDER 2.8

Marc
- every professional was once an amateur - greetings from Pajottenland - Belgium -
PS: sorry for my english I speak flemish ...
User avatar
pf shadoko
Enthusiast
Enthusiast
Posts: 283
Joined: Thu Jul 09, 2015 9:07 am

Re: need help - character animation

Post by pf shadoko »

I try with assimp
not easy either
box_80
Enthusiast
Enthusiast
Posts: 111
Joined: Mon Sep 03, 2012 8:52 pm

Re: need help - character animation

Post by box_80 »

Can try fragMOTION. I have not tested out myself, just know it have ogre export.
http://www.fragmosoft.com/downloads/index.php

Don't have to buy to try it out.
User avatar
pf shadoko
Enthusiast
Enthusiast
Posts: 283
Joined: Thu Jul 09, 2015 9:07 am

Re: need help - character animation

Post by pf shadoko »

@ box_80 : thanks, i will try

@ CDXbow :
I was able to make some conversions to ogre format with "OgreAssimpConverter".
but I didn't find a model with os
if you want to test:

viewtopic.php?p=401729#p401729
Post Reply