The place to post mesh,and animation related hints and problems.

fbx skeleton and animation files

fbx skeleton and animation files

Postby cosmo » 22 Jul 2015, 17:08

Hi,
it is possible to import different fbx files, one regarding the skeletal mesh and the other concerning specific animations?
Putting it in another manner, let me suppose that I have a character (named myChar) and bunch of different animations (myCHar@walk, myChar@run, and so on); therefore, may I use all these files into Skyline?
Not one unique file with animations attached to, which then I separate into the Mesh Editor, scrubbing on the timeline...
I ask you this question because at present I'm experimenting with Autodesk Motion Builder and this app, among other things, allows specific and interesting setup on a single animation.
I hope my question doesn't seem too messy...
Thanks, goodbye!
Last edited by cosmo on 10 Aug 2015, 18:12, edited 2 times in total.
User avatar
cosmo
Skyline Initiate
 
Posts: 18
Joined: 10 Oct 2013, 17:26
Location: Italy

Re: FBX SKELETON AND ANIMATION FILES

Postby SolarPortal » 22 Jul 2015, 17:30

Oh yes, we support this :)

First way)
Putting it in another manner, let me suppose that I have a character (named myChar) and bunch of different animations (myCHar@walk, myChar@run, and so on); therefore, may I use all these files into Skyline?

yes, exactly as you wrote. The way it works is to have all these files in the same folder and convert the base one. When converting it will pull in the rest of the animations and add them to the meshes animation timeline. The skeletons in the FBX files must match though.

Example:

The name of the animation will be taken from the file.

Second way) If you have animation files that contain the same skeleton but different animations but they dont follow the file@anim.fbx format, then you can use the timeline to import the animation onto the mesh.
  • Open Mesh editor
  • Import character
  • Right click on timeline
  • choose "Add Animation"
  • Choose animation
  • Name animation, press ok
  • Save mesh
  • Reload entity

We built these into skyline so users who use sites like mixamo can import their characters without any animations(must contain a skeleton though) and add unlimited number of animations

Hope this helps :)
Conceive, Quantify & Do!
Skyline Game Engine - Lead Developer.
Please provide as much information as possible when asking for help.


Specs: OS: Win 10 64bit, CPU: Intel i7 3770 3.4ghz x 4 core(8 threads), GPU: Nvidia GTX 1060 6GB, Ram: 16gig DDR3, Windows on 250gb Samsung Evo 860
User avatar
SolarPortal
Skyline Founder
Skyline Founder
 
Posts: 3133
Joined: 29 Jul 2012, 15:56
Location: UK
Skill: 3D Modeller
Skill: 2D Artist
Skill: Programmer
Skill: Level Designer

Re: FBX SKELETON AND ANIMATION FILES

Postby cosmo » 24 Jul 2015, 11:01

Hi SolarPortal,
and thank you very very much!!!
Awesome, I've tryed both the solutions you suggested and they do work very well! :D :)
May I post another question, please? :oops:
In one of my animations, the character pick up an object from the ground and then moves away: is there a way to make the object is "pinned" on the character's hand while it moves?
I think about some kind of constraints... It's possible to make things like this into Skyline?
Thanks, see you later!
User avatar
cosmo
Skyline Initiate
 
Posts: 18
Joined: 10 Oct 2013, 17:26
Location: Italy

Re: FBX SKELETON AND ANIMATION FILES

Postby SolarPortal » 24 Jul 2015, 11:12

thats good :)

I have just taken a look in the code and it seems the lua side for attaching to bones currently isn't possible :shock:
We will find some time and add this feature in :)
Conceive, Quantify & Do!
Skyline Game Engine - Lead Developer.
Please provide as much information as possible when asking for help.


Specs: OS: Win 10 64bit, CPU: Intel i7 3770 3.4ghz x 4 core(8 threads), GPU: Nvidia GTX 1060 6GB, Ram: 16gig DDR3, Windows on 250gb Samsung Evo 860
User avatar
SolarPortal
Skyline Founder
Skyline Founder
 
Posts: 3133
Joined: 29 Jul 2012, 15:56
Location: UK
Skill: 3D Modeller
Skill: 2D Artist
Skill: Programmer
Skill: Level Designer

Re: FBX SKELETON AND ANIMATION FILES

Postby cosmo » 24 Jul 2015, 15:06

Ok, I'm waiting for this new feature in the next updates. :D
In the meantime, thank you so much!
User avatar
cosmo
Skyline Initiate
 
Posts: 18
Joined: 10 Oct 2013, 17:26
Location: Italy

Re: FBX SKELETON AND ANIMATION FILES

Postby SolarPortal » 24 Jul 2015, 22:14

i have had a play around and this is the best i have come up with atm.

An attach to bone wont be as good as you think. Imagine if you have a sceneEntity that has attachments itself or a particle fire on top of a torch.

this function allows a dynamic object to sit in the position of a bone with offsets.

Code: Select all
obj=0;
function onInit(objID)
        obj = objID;
        bone.printBones(obj); -- prints all bones in skeleton
end

function onUpdate( td )
   updateAttachment();
end

function updateAttachment()
   offset = newType.vec3(-0.5, 0.25, 0.1);
   rotation = newType.vec3(20, 0, 90);
   attachItemToBone( "torch", "Hand.R", offset, rotation )
end

function attachItemToBone( tagname, bonename, offset, rot )
   torchID = entity.getIDFromTag(tagname);
   bodyID = physics.getBodyID(torchID);
   
   if(bodyID > -1 )then physics.removeBody(torchID, bodyID);end
      
   bonePos = newType.vec3(bone.getWorldPosition(obj, bonename));
   oX,oY,oZ = bone.getPositionOffset(obj, bonename, offset.x, offset.y, offset.z);
   
   w,x,y,z = bone.getWorldOrientation(obj, bonename);
   w,x,y,z = quat.rotateOrientation(rot.z, 0,0,1, w,x,y,z);
   w,x,y,z = quat.rotateOrientation(rot.x, 1,0,0, w,x,y,z);
   w,x,y,z = quat.rotateOrientation(rot.y, 0,1,0, w,x,y,z);
      
   entity.setWorldOrientation(torchID, w,x,y,z);
   entity.setPosition(torchID, bonePos.x+oX, bonePos.y+oY, bonePos.z+oZ);
end
Conceive, Quantify & Do!
Skyline Game Engine - Lead Developer.
Please provide as much information as possible when asking for help.


Specs: OS: Win 10 64bit, CPU: Intel i7 3770 3.4ghz x 4 core(8 threads), GPU: Nvidia GTX 1060 6GB, Ram: 16gig DDR3, Windows on 250gb Samsung Evo 860
User avatar
SolarPortal
Skyline Founder
Skyline Founder
 
Posts: 3133
Joined: 29 Jul 2012, 15:56
Location: UK
Skill: 3D Modeller
Skill: 2D Artist
Skill: Programmer
Skill: Level Designer

Re: FBX SKELETON AND ANIMATION FILES

Postby cosmo » 28 Jul 2015, 17:00

Thank you!!! :)
User avatar
cosmo
Skyline Initiate
 
Posts: 18
Joined: 10 Oct 2013, 17:26
Location: Italy


Return to Mesh + Animation

Who is online

Users browsing this forum: No registered users and 1 guest