Jump to content

Loading motion files directely on a rigged character


omid3098
 Share

Recommended Posts

Describe: We have a rigged character (GMF format), and a coupple of motion files (for example .bvh format). can we load those motions separately on character using code or script into leadwerks?

post-50-12683179895059_thumb.jpg post-50-12683180063749_thumb.jpg


  • in left picture (what we have now) we should marge all motions into one, and assign it to our characters and then export them to GMF.
    in right picture (what we want) we have some motions (not marged and in bvh format) and we have some rigged characters in GMF format. and we want to load bvh files using leadwerks on our GMF character. because:
     
  • As our first template character is 32mb (with 79 motions 6762 frames) and we want to use at least 20 characters(primitive characters), so we need almost 640mb (just for primitive characters)
  • if one motion needs some changes, we should marge all of motions again and re export all characters which contain that motion. and since we define frame numbers for each cycle, after edit one motion, next motions has to be shifted.
  • almost 40-50 normal people need 7-8 same motions. if we could load motion files separately, we will save a lot memory space..

anyway.. I think reasons are enough to describe how much we need to load separate motions (maybe .bvh or .fbx) directly on a rigged character.

so my questions are:

first can we do this now in leadwerks?

if yes, can you suggest where to start?

is there any previous works on this? (I can remember someone (maybe Mastexilo or Rick) wrote something similar but I could not find that topic)

any other ideas will be helpful..

 

Very sorry for bad describtion :blink:

Omid Saadat

OD Arts Blog

 

AMD Phenom II X4 940 - Geforce 8800GTS - 4GB RAM - XP x86

AMD 6000+ - Geforce 9800 GT - 2GB RAM - XP x86 (Home pc)

Intel Core i7 - Geforce 310M - 4GB Ram - Win7 x64 (Laptop)

Link to comment
Share on other sites

Not sure what you mean? Each character has the animations built in to the biped. Then the character is loaded and the necessary animation is called. Are you suggesting that the animations are not loaded onto the biped but are loaded separately and then somehow attributed to a character when necessary?

AMD Athlon x2 7750 2.7ghz, 6gb ddr2 ram, Galaxy9800GT 1gig ddr2 video card, Windows 7,64.

Link to comment
Share on other sites

Really sorry for my bad english and bad describtion. :blink:

first post editted. hope you got my meaning now..

Omid Saadat

OD Arts Blog

 

AMD Phenom II X4 940 - Geforce 8800GTS - 4GB RAM - XP x86

AMD 6000+ - Geforce 9800 GT - 2GB RAM - XP x86 (Home pc)

Intel Core i7 - Geforce 310M - 4GB Ram - Win7 x64 (Laptop)

Link to comment
Share on other sites

peradventure, we don't want to mix motion files! :blink:

we need to load bvh files (or any format else) using leadwerks on a just rigged GMF character.

Omid Saadat

OD Arts Blog

 

AMD Phenom II X4 940 - Geforce 8800GTS - 4GB RAM - XP x86

AMD 6000+ - Geforce 9800 GT - 2GB RAM - XP x86 (Home pc)

Intel Core i7 - Geforce 310M - 4GB Ram - Win7 x64 (Laptop)

Link to comment
Share on other sites

I think this would be ideal because the bone structure for humans are basically all the same (or can be made the same per game). Would be nice to just be able to pick these motion capture files and assign which one you want per model via code.

 

That way I could add a human model to my scene and just assign the motion capture animations I want that character to have.

Link to comment
Share on other sites

This is what our animator wanted.

 

He was trying to explain to me that having lots of animations in each character was somewhat wasteful and it would be much better to have lots of different characters you apply an animation to. It seems obvious now. We're starting to look at infantry and various various civilian characters which would benefit from the same animations applied to a range of slightly different models.

6600 2.4G / GTX 460 280.26 / 4GB Windows 7

Author: GROME Terrain Modeling for Unity, UDK, Ogre3D from PackT

Tricubic Studios Ltd. ~ Combat Helo

Link to comment
Share on other sites

++ from me. Having the same animations that are used by multiple characters stored in each .gmf is as wasteful as having textures that are used by multiple meshes stored in each .gmf would be. If this is possible, or can be made possible somehow, it would be very useful.

Vista | AMD Dual Core 2.49 GHz | 4GB RAM | nVidia GeForce 8800GTX 768MB

Online Portfolio | www.brianmcnett.com

Link to comment
Share on other sites

I thought this was already possible? well not loading a specific motion filetype like bvh, but as separate gmf files...According to the Intro to Animation pdf:

When a mesh is loaded, any animation data contained in it makes up the first sequence. Additional animation sequences can be loaded from mesh files with the LoadAnimation() command. The file the animation is loaded from must use the exact same hierarchy structure as the original mesh, although it does not need to contain any mesh surface data. This is a convenient way for artists to store different animations across multiple files.
  • Upvote 1

Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590

LE / 3DWS / BMX / Hexagon

macklebee's channel

Link to comment
Share on other sites

yeah. The function is listed, but no reference to use it after you call the function.

 

I am guessing your model would only be rigged, and the LoadAnimation(entity, path) would have to be an single animation file, you couldn't load a different one for each sequence you want, because Animate(frame, blend, sequence, recursion)...?

 

My question, does LoadAnimation() override or append any animation that may be currently set in the original enitty?

AMD Phenom II x6 1100T - 16GB RAM - ATI 5870 HD - OCZ Vertex 2 60GB SSD

76561197984667096.png

Link to comment
Share on other sites

i think "LoadAnimation" load a sequence animation and he "Returns the index of the loaded animation sequence.." you could refer to it later. you can count the number of sequence an entity have whit the "CountAnimations".

That mean you can have a bank of animation where you choose one and add it to your model and play it when you want. And an other model can pick in the same bank. all the command are here to make it work the only command that miss is a "RemoveAnimation".

 

Cool I will work on it for learning Bmax and leadwerk :(

Link to comment
Share on other sites

i think LoadAnimation() will return sequence number of entity its related to, increased by 1 every time its called...

 

 

Could you expand on that?

 

model.gmf would become model1.gmf?

 

or are you saying if model.gmf has 1-20 frames, LoadAnimation() would then take the seq of the animation you are loading and make it 21-xx, and so on?

 

So wen you call animate, you just need to know the number of frames in each animation file you load?

AMD Phenom II x6 1100T - 16GB RAM - ATI 5870 HD - OCZ Vertex 2 60GB SSD

76561197984667096.png

Link to comment
Share on other sites

..well..i havent try this command yet, but, it should 'top up' animation frame range i guess..having said that, once you build up your system for controlling complex animations, best way to do is to store animations given in some frame range in to a sequences, so one of them should be one added at the end of original sequence..but as I said..it was just guess..I havent try actually...

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...