PDA

View Full Version : Does Lightwave really support FBX ? (or how to import animations from Maya)



texel
02-16-2009, 03:16 AM
Hi,

My company need to import animated skinned meshes characters in .lws/.lwo file format in our 3D Engine.

We do not have the ressource for a Lightwave CG artist to create new skinned meshes. Our CG artist use Maya.

We want to import skinned meshes made with Maya to lightwave in order to save it to .lwo/.lws. (Lightwave would be used as a file converter).

Our problem:
We do not succed in importing skinned meshes animation in Lightwave in FBX file format.
We have tried with v9.5 trial. it didn't work.
We have contacted Newtek and they said v9.6 will have a better support of FBX file format.
We have tried v9.6 trial. And it does not work.

The "humanoid.fbx" example of the FBX SDK is not correctly imported in Lightwave (bones animation seems to be good, but meshes are not correctly skinned to the bones).
Here is another very simple example with the same problem (exported with Maya 9.0):
http://texelinside.free.fr/bugs/SkinMeshCyl.fbx

My questions:
_ Can Lightwave import animated FBX files made with other program such as Maya, 3DS Max, ... ? (FBX is supposed to be a standard).
_ Maybe we do not know how to use Lightwave correctly ? How to import these files into Lightwave ?
_ If Lightwave do not support FBX. How to import Skinned meshes animation from Maya to Lightwave ?

Thanks.

RebelHill
02-16-2009, 05:46 AM
U wont be able to import the skinning from maya to LW... but the bones you should be able to get across via fbx, and the meshes via obj... ull then have to reskin the meshes (at base/rest pose) in LW....

texel
02-16-2009, 06:24 AM
It's not possible to import animated Skinned meshes ?!
There is no solution ?

The NewTek Technical Support said it is possible:

9.5 and the soon to be released 9.6 both have a much more advanced FBX handler than previous versions and should fully support importing and exporting of all of FBX's features natively with no third or first party add-ons (this feature is available in all versions except PowerPC on Mac).

Valkyrie.p is LightWave's new import/export functionality for LightWave 3D. You can Import and export of Collada and FBX scenes as well as import/export of Collada objects. Meshes, materials and animation information are supported for FBX and Collada. You can import via the standard Load Scene and Load Object commands, and export options are available on the Export menu.

I will contact the technical support again.

RebelHill
02-16-2009, 07:42 AM
well... fbx will take vertex weights... (or at least it used to) and their associations to bones... but the way things like falloff influence, and so on are handled in maya and LW are different... so your actual deforms will be different...

when it comes to straight animation, u can vertex cache the animated mesh, which gives u a perfect deformations transfer... but obv thats no good for what your doing where u need bones to be driving the mesh...

U may get away with the deformation trasfer... u may need to tweak or reskin in LW... sadly theres only one way to find out...

RebelHill
02-16-2009, 07:57 AM
here...

I fixed the lil test scene u attatched.... all that was needed was to reposition the bones relative to the mesh, and reset the skinning... This is likely what ull have to do for ur different scenes...

or u can just send em to me... and ill send em back fixed for ya... at myregular day rate of course, lol....

texel
02-16-2009, 09:05 AM
i don't understand how you have done that. I don't know how to use Lightwave (i am just a developper).

Could you give me some simple explanations or a step by step procedure for a very beginner ?
What do you mean by "reset the skinning" ? It's seems that you didn't have modify the weights and their affectations, because they are stored in the .lwo file and you have not modified the .lwo.

RebelHill
02-16-2009, 09:15 AM
basically....

ah hell, there is no basically... U need to replace the fbx hierarchy reference null with ur lwo mesh... and clear away the mesh instance that doesnt have the bones under it (or maybe not... depends how ur game engine works with the lws)...

Then u gotta check to see if the bones and mesh are offset... in ur example the mesh was globally positioned offset from the bones... hence the offset deform... so I pushed the mesh up (after the replace step)... and pulled the bone hierarchy down (on global Y) to line em back up...

then to "reset" the bind/envelope/skin... u just select all the bones, and hit the "r" key... to rest them...

Its kinda straight forward... but if u dont know LW it may not make much sense...

open up my scene and urs... look at the scene editor and the keyed positions of the mesh and root bone at frame 0 and where they're different...

texel
02-16-2009, 09:31 AM
Ok. I hope the Maya Cg artist i work with will be able to use these informations.
Thanks.

duellestyle
02-17-2009, 03:16 AM
Hi,
I have experience about using LW and Motion Builder trought FBX. I wrote also some steps in this comunity about how to do it. Anyway I never tried with Maya. If you want to skin and animate in Maya and render in LW I suggest you Point Oven that will import you in LW the entire animation, also camera and lights, so you have just to texture and setup materials in LW and click render. If you wanna use fbx I suggest you to use the old fbx plugin from kaydara version 8.2. Becouse it goes in conflit with the fbx plugin of Newtek about the name, you have to rename the plugin name (inside) trought an HEX editor, or I can send you the one I already modify. So you can try to export a skined mesh from Maya to LW, should work. The thing that probably will not work are textures.

If you want that plugin, just write me your email.

Ciao.

duellestyle
02-17-2009, 03:40 AM
I did it too. I took your scene and fix just the model position in modeler, save it and done.

this is the link of the test scene fixed.

http://www.lucianopalladino.co.nr/SkinMeshCylEXP.zip

duellestyle
02-17-2009, 11:08 AM
well the thing the pagnozzi said it's true, fbx isn't a total solution. For example if you want to import a rigged mesh with all the goals objs, clusters, etc from maya to lw, well forget it!
Trought fbx you can import an animated skeleton rig, or just a rig with all the weightmaps set it up in Maya (sincerily I prefer to weightmap in LW is much easier).
I use fbx kinda everyday from motion builder to lw with no prob, importing and exporting just animation data and morphs.

texel
02-18-2009, 02:04 AM
Thanks. I thought FBX and Collada were a standard file format which automatically "force" data to be store in the same way for all modelers (like .obj, .MD2, .MS3D, .3DS, ...), and which could be read by every modeler without modification. It's not the case :(
I also tried to use Collada, but it's the same thing.
I have even tried to load .fbx files example from Autodesk in Maya and it does not work very well.

My CG artist has no experience with Lightwave and FBX. I hope your advice will help him to understand how to create "Compatible" FBX files.

I am also interested by your plug-in duellestyle. You can find my e-mail here:
http://texel3d.free.fr/contact/index.html

And if you have another ideas to import skinned meshes from Maya to Lightwave, i am interested.

smoluck
02-19-2009, 08:42 AM
well... fbx will take vertex weights... (or at least it used to) and their associations to bones... but the way things like falloff influence, and so on are handled in maya and LW are different... so your actual deforms will be different...

when it comes to straight animation, u can vertex cache the animated mesh, which gives u a perfect deformations transfer... but obv thats no good for what your doing where u need bones to be driving the mesh...

U may get away with the deformation trasfer... u may need to tweak or reskin in LW... sadly theres only one way to find out...

I'm agree with that fact RebelHill. Maya can't get a vertex total SmoothBindSkin value up to 1.0 so you'll can just get 0.8 on the hand bone, and 0.2 on the arm bone. 0.8+0.2 = 1.0

In LW (correct me if I made a mistake), you can get "n" WeightMap that got the same vertex at 100 % value.

So you can get Total value of n * 100 % value virtualy. LW does the real balance from that logic.

1 vertex that got 2 weightmaps at 100 % mean that there is 2 weightmaps with 0.5 on each weightMap (but you can got "n" * bones that use this Weightmap... That desapoint me ... a bit)


here...

I fixed the lil test scene u attatched.... all that was needed was to reposition the bones relative to the mesh, and reset the skinning... This is likely what ull have to do for ur different scenes...

or u can just send em to me... and ill send em back fixed for ya... at myregular day rate of course, lol....

Hello There ! :)

I'm the CGArtist Co-worker of Texel.

As I'm familiar with Modo 203 (Lovely modeling program), I've setup an LWO file with WeightMap, using an imported OBJ character done in Maya.

LightWave disturbed me quite a bit.... (That's crazy to see that you'll need to load a Keyboard Shortcuts preset in order to use the software UI when you'll launch the demo. :thumbsdow)
Do you know about a UI preset in order to move into the viewport like in Maya or Modo ? ( zoom, pan, rotate with mouse right clic + alt or ctrl)

So know I've import the Bones from "Life Form (http://www.charactermotion.com/products/lifeforms/index.html)" exemple in LW layout and load the object file as the LWO from Modo.

At this time I got the 10 first frame of animation with a rest position on my Bones ( T pose), after that I got the real animation sample for about 90 Frame.

Now I've search on the Object properties of th poly object in order to "connect" (like a SmoothBind in Maya) that bones skeleton to that object. But I've failed.

I've tried to go deeper on animation workflow by looking at that tutorial Introduction to Bones and Character Rigging: (ftp://ftp.newtek.com/multimedia/movies/w3dw/Bones.mov)

My problem was, in the tutorial it seems that when you select an object and Create bones, it connect automatically the bones hierarchy to the object and deform it; But how can i do that for an already done skeleton in my scene ?

Thank's in advance to explain your workflow RebelHill.

dee
02-19-2009, 09:15 AM
But how can i do that for an already done skeleton in my scene ?

Select your object, klick on Bones, klick on Properties - on top you have a "Use Bones From Object" dropdown.

RebelHill
02-19-2009, 09:18 AM
ok... weights in LW... U can apply as many weights as u like to a single vertex up to whatever value u like... u can have 200% weight value if u want. All the weight value corresponds to is how much rotation/translation that vertex will follow along with an bone applied to that weight...

Some things though... especially some game engines that use lws files (but not all) require weight normalisation of the objects... meaning that either no vertex can be influenced to more than 100 %, so if u have 2 weights on a single vertex that apply to 2 bnoes each weight would have to be 50-50, or 70-30... whatever added up... or... the total weights for the entire mesh must add up to 100%

When it comes to binding a mesh to bones...

In layout... bones can ONLY exist as the children items of objects... and bones will automatically deform any object that they are the children of... (the object itself can be set to use bones from another object in the scene, but by default it will use its own, and ideally thats what ud want for most game engines)

So... when u import an fbx, or whatever other file that contains bones animation... u need to use the "replace with object" to replace whatever the skeletons parent item is with ur mesh...

U will of course also need a frame that has a bind pose, unlike in maya, LW sets up binding within the animation timeline... this is why its so easy for things to go wrong and meshes to explode....

Its not a difficult or long winded process... but if ur not used to the way LW works it is kinda confusing... scnene tree, graph editor, modeler... easy to understand coming from maya... skinning boning and deforming... WAY different...

As for navigation... I cant actually remember if theres a way to change the orbit/pan button/key combos... dont think there is, someone else may know... but u can edit the keyboard shortcuts urself... "edit keyboard shortcuts"...

Also... the default menus in LW are TERRIBLE... try loading my menus instead... much better (imho)... attatched...

Anyhow... I hope some of this helps... at least in some way... If ur still ahving issues try sending me some of ur files... fbx outputs... the original maya scenes... meshes... whatevers relevent so i can try and see exactly where the problem is, and pioint u in the right direction a lil better.

smoluck
02-20-2009, 01:53 AM
Thanks a Lot RebelHill ^^

Your explaination was really clear and detailed.

I already done some edit on keyboard mapping before your post but I didn't understood where to config these keyboard shortcuts on "Layout". I've done my own keymap on "modeler" already.

What the tips you can say to me in order to move in the viewport nicely and easy ?

orbit / pan / zoom with the mouse... Zoom throught selected / Zoom All... for the Modeler and the Layout.

---------

Great Character Reel animation by the way ^^

smoluck
02-20-2009, 08:20 AM
Humm .. I notice like a bug in my process...

Sometimes I got my object placed at the root, not at the world origin when I select my root (skeleton) and "Replace with object" with the LWO file. My LWO seems to confirm that my foot was on the grid (altitude=0). But when I do the replace with object it seems that the object was shifted up a bit. So can not get a good rigging result.

Do I forgot something ?

RebelHill
02-20-2009, 09:36 AM
yeah... if the meah and its skeleton are offset from each other at rest pose... just deactivate all bones (select them, ctrl+r) then move the root bone of the hierarchy till skeleton lines up with mesh... select and rest (r) all bones... move the mesh (bones parent object) so the feet hit at Y=0 if necessary.

smoluck
08-03-2009, 03:01 AM
Hello,

I restart the post right here, because now, I come back on my animation workflow between export of an .lws file from LifeForms to Lightwave Layout.

I've created on Modo a Human character in order to test the workflow we've prepared in order to create a bunch of walk loop animation for 10 different characters (from different human male, to female, teenagers, and child).

So I do the Charater bones setup hierrachies and proportion on Maya, by folowing the shape of the character. This is the bind pose (rest pose of the skeleton).

Then I open Lifeforms and create an animation. I use the first frame as the rest pose, then all the other frame where reserved for the animation loop. So I export the .lfa as a new .lws file with "linear interpolation", "keyframe only" and "Geometry" (that's just a directory where the bones shape where stored as a display option).

So As I open the LWO character file on the Modeler, and the LWS bones animation (http://skeeter.mot.free.fr/cgtalkupload/LightWave/Franck_Tpose_WalkLoop.rar) on the Layout, I can't achieve the link between the mesh and the bones setup.

http://skeeter.mot.free.fr/cgtalkupload/LightWave/LightwaveAnim_%201.jpg

So do i need to select the root_0 and use the Replace with object option and load the .lwo character mesh on it (as the root_0 was at the center of pelis so at approximatively 90 cm of the ground) ?

Do I need to moved down the mesh vertice 90 cm down in order to compensate the offset when I replace the root_0 with this object ?

If you can, I hope you'll know some tutorial about Lightwave basic used principle, because I'can't find an easy way to learn the software via essensial Lightwave v9 book from Warner, Philips, Albee.

Thanks in advance.

EDIT:

I've fixed the offset on the mesh in order to load it correctly with the same pivot coord as the pelvis.

So now, i got a charcater walking, but as I've set every vertex weightmap to be 100 % for just one bones, I didn't got a good deformation with a Fallof type: Inverse Distance^16

So turn it to just Inverse Distance, but the reseult was really and hard block animation style.

-EsHrA-
08-03-2009, 01:05 PM
"orbit / pan / zoom with the mouse... Zoom throught selected / Zoom All... for the Modeler and the Layout."

hold ALT + left mousie = rotate
hold ALT+ CRTL + left mousie = zoom
hold ALT + SHIFT + left mousie = pan


mlon

smoluck
08-04-2009, 08:06 AM
Thanks -EsHrA- for these tips.

About the rigging:
I've find the solution, my character move as I wanted.

But I've one question:

How can I keep the BindPose (RestPose) in the LWS scene without keeping the frame 0 where the Rest pose was stored ?

-EsHrA-
08-04-2009, 09:43 AM
hit 'a' for focus all and SHIFT 'a' to focus on selected.

mlon

cresshead
08-05-2009, 09:03 AM
i know i'll sound silly but i simply can't find the import fbx option in 9.6.....
i can find the EXPORT but not the import...so

where's that then!

emilc
08-06-2009, 08:38 AM
Try load scene... ;)