XSIforum.com

Mocap.

0 Usuarios y 1 Visitante están viendo este tema.

Mocap.
« en: 07 Abril 2010, 23:17:10 »
Hola,
estoy haciendo unas pruebas con motion capture, y no me está funcionando muy bien la cosa.
Más o menos estoy siguiendo esto que pego aquí abajo.
La captura en principio me sale, es decir, mi rig (biped de XSI) se mueve, pero todos los huesos salen rotados o mal posicionados.
Alguien puede decirme un poco por encima los pasos a seguir?
Una pregunta, (a ver si va a ser por eso) el rig de la captura, cuando estás haciendo el "tag rig" tiene que estar en T-pose como el rig que tengas de XSI? (en este caso el bípedo)

Gracias.

1. Call up the Biped Guide
2. Create Rig From Biped Guide.  I pick “skeleton Spine,” though it shouldn’t matter.
3. Delete or hide the Guide
4.  MOTOR>Tag Rig.

I tag as follows:
cog --UpperBody
spineroot --Lumbar1
chest—Lumbar 4
pelvis --HipPlate
rthigh --RRoot1
rShin --RShin
rfoot --RightFoot
rclavicle --RShoulder
rupperarm --RBicep
rforearm -RForearm
rwrist --RHand
neck—Neck
head --Head
rtoe --RFootBone2

In all of these, I’m just specifying the right side of the rig.  You must check to make sure that XSI  has automatically filled in the left side correctly.  Sometimes it will assign the wrong left bone.

5. Click “Apply” . Use the same page to save the tag file as something like DefaultRigtag. close that PPG with the “X” at upper right

6.MOTOR>Mocap to Rig.  If you’ve got Biped selected, it will be filled in the bottom slot of the PPG.

7. Specify “Biovision”
8. Navigate to where your  BVHs are. Pick one.
9. Pick “Create Tag Template", bringing up the TagPPG page
10. After the first frame of the BVH comes up in your viewport as a hierarchy of nulls, go in and reset the rotations of all the nulls on the BVH model.  Then use the rotation tool to repose the BVH model to match the default T-pose.  For the CMU BVHs, this means basically selecting the 2 hips and 2 shoulders, hitting Ctrl+Shift+R, then rotating the hips down to bring the legs parallel to the rig’s T-pose.

11.  In the “TagPPG” page, I tag as follows:
cog --Hips
spineroot --Spine (I think one could also tag spineroot, but this is what has worked for me.)
chest --Spine1
pelvis --LowerBack
r thigh-- RightupLeg
rshin --RightLeg
rfoot --RightFoot
rclavicle --RightShoulder
rupperarm --RightArm
rforearm --RightForeArm
r wrist --RightHand
rhand—Leave it blank; there aren’t enough nodes
head --Head
neck --Neck
r toe --RightToeBase
rheel, lheel --leave blank.

Click “apply” to use it without saving or “Save” to save it as your CMUBVHtag file.  I recommend the latter. Close that PPG.

12.  If the “MOCAP to Rig” PPG is still up, and you’ve saved the CMUtag file, you can load it in Step 3. If that PPG went away, and you reopen it, I think the file will be filled in there.
13. Biped (or your model) should be selected in step 4, Target Model.  If it isn’t pick it now.
14.  Click “Apply.” a progress bar should come up, saying “processing Mocap Data”
15. Close the “MocaptoRig” PPG.  Scrub the timeline--watch Biped move! I find it a kick every time I see my meshes move!
16. Use Adjust in in the MocaptoRig PPG to add offsets to the Biped positions and rotations.

I know one can refine the tag files further (there are variants to handle fingers and foot roll --the latter would probably work better on the default rig), and one can also, according to the XSI wiki, tag a bone and a controller at the same time.  If you find better tag assignments, let me know.

I have gotten crashes sometimes.  Most often, it’s when there’s a mismatch in the tag files.  If you look down in the lower left, you’ll usually see a warning to the effect of “Couldn’t find tag : sometag” before XSI goes away.  It  also occurs when I try to reapply a second mocap file without getting rid of the first one .  Using “Remove” from the Mocap to Rig page, then resetting the Biped Rig to a default pose works fine for that.

Hope this helps!

Re: Mocap.
« Respuesta #1 en: 08 Abril 2010, 08:48:49 »
he hecho pruebas muy bastas colocando el rig .bvh en la misma T-pose que el bidep rig, y lo hace mejor, pero sigue sin hacerlo completamente bien.

Buscando por interner, he leído un proceso interesante en la página de Ed Harriss.
Lo pego más abajo.

Recuerdo cuando trabajaba en TV en Madrid, que pasaban el MOCAP a través de Motionbuilder, claro que por aquel entonces no existía MOTOR. Bueno pego aquí abajo el proceso de Chris Perry, que puede que sea el mismo que yo recuerdo de hace años.
Cuando llegue a mi casa lo probaré.

XSI > FBX > Motion Builder Notes


There have been a number of posts regarding XSI and Motion Builder so I decided to share some of my experiences with this process. Hopefully it will be helpful.

For our recent projects we really wanted to use a more complex rig than the very basic skeleton that is created with the Kaydara script. The workflow that has worked the best for me is as follows. It looks complicated but once the workflow is set up it works beautifully and gives you a level of control in XSI to further manipulate motion that is not possible with the Kaydara skeleton because you will have the power of an advanced rig design. I am attaching some simple example scripts that I use in the step by step process below.

Outline:

Create Rig from Biped Guide with Shadow Rig.
Remove constraints on Shadow Rig (Biped_Skeleton).
Build constraints from Biped_Rig to Biped_Skeleton.
Create new scene with your character weighted to the Biped_Skeleton. Rename and scale bones to appropriate Motion Builder names. Export FBX. Apply motion in Motion Builder. Merge FBX back into XSI. Revert naming and scaling to original XSI values. Plot motion to the constrained Biped_Rig. Remove constraints on Biped_Rig. Export final motion clip from Biped_Rig for use in scenes with your
character weighted to the Biped_Rig.


Step by Step:

1) Create biped rig guide (Get>Primitive>Model>Biped Guide) manipulate the rig guide to match your character.

2) Create rig from guide (Animate>Create>Character>Rig from Biped Guide).

3) Choose the options you want then also activate the shadow rig option. I Like to use SI|3D Skeleton and the No Fingers option on the hands.

4) Once your rig and skeleton are created you need to relax the constraints on the skeleton since we will be reversing the constraints in a later step (Animate>Character>Constraints Outside Model Boundaries>Remove).

5) Export three different models: BipedPropGuide, Biped_Rig, and Biped_Skeleton. We will be importing these into different scenes so it is nice to have them external. I export the Biped Guide in case I have to back up and re-create the skeleton and rig again.

6) Create a new scene and import the Biped_Rig and Biped_Skeleton models. We now need to create a series of constraints for the Rig to follow the Skeleton. For the most part I have found that pose constraints work the best for my needs with CnsComp turned on while setting them up so that the offsets are automatically created. Depending on the setup of the rig and the motion you are trying to create this can vary greatly. I have attached an example script (BipedCnst) that will build the constraints between a non FootRoll Rig and a shadow skeleton. If you are using Motion Builder's floor contact, which is excellent by the way, this is the setup that is easiest. If you want more control in XSI a FootRoll rig is ideal but a little more complicated in the constraints setup and you won't get accurate foot motion from MotionBuilder. In the example of the attached script it uses the Isner spine for the spine and neck to solve for motion rather than explicitly taking it from the shadow
rig spine. I prefer this setup for additional motion manipulation in XSI since the Isner spine solves very well for human spine motion. Create a group with all of the elements in the Biped_Rig that are constrained to the Biped_Skeleton. This will be used later.

7) Save the scene created in step 6 with a name such as Constrained_Transfer_Rig.

8) Create a new scene and import your Biped_Skeleton model and the character that it will be animating. Envelope your character to the Biped_Skeleton. You can do some basic weighting if you want to but this is only for visualization in MotionBuilder so don't waste too much time. I like to strip all the materials and textures from the character since the FBX plugin is horrible at transferring UV's. We have found it best to just visualize in MotionBuilder with the default grey.

9) Save the scene created in step 8 with a name such as FBX_Base.

10) Since Motion Builder is very picky about the naming of the skeleton structure you have to either re-name all the bones in Motion Builder before you can characterize it or you can re-name in XSI. I chose the latter because you can script it. Another limitation of the FBX plugin is that it will not allow you to scale the scene. The unit sizes we were working with in XSI when exported to Motion Builder would make our characters come in extremely small. Therefore, I also scale everything in the script. Attached is a renaming and scaling script (MB Biped Export) that will work for a rig created in the steps above. Note that these attached scripts are very basic, they are simply a copy and paste of the manual process so you could very easily create your own with very little scripting knowledge (such as myself).

11) Run the script from step 10 or rename manually in XSI or Motion Builder.
Note: An easy way to see what Motion Builder will want is to run the script that creates the Kaydara Skeleton (Installed with the FBX plugin).

12) Save the scene created in step 11 with a name such as FBX_Export.

13) Export your scene to FBX (File>Export>FBX file)

14) Import your FBX file into Motion Builder and apply and manipulate your motion. Export back to a FBX file. Note: we have found that you have to export exactly as you imported, meaning that you have to strip anything out of the scene other than the character and skeleton you imported from XSI. The other method is to select all of the XSI character and skeleton elements and choose export selected.

15) Load in XSI the FBX_Export scene created in step 12

16) Merge in the motion from the FBX file (File>Import>FBX file). This will take a minute as the FBX plugin if very slow. If all goes well you should now have motion on your skeleton.

17) We now want to revert the re-naming and scaling we did in step 10. Attached is a script which is essentially the reverse of the script in step 10 (MB Biped Import). You should now have the original XSI names. This step makes it easier to use the motion clip in the following steps rather than having to create a connection template since it is scriptable.

18) Branch select the entire Biped_Skeleton hierarchy and create a motion clip (Animate>Actions>Store>AnimatedParameters - Fcurves).

19) Save the motion clip externally that was created in step 18. You can do this by locating the motion clip in the explorer (easiest to filter by mixers only). Click on the clip icon to open it in the property editor. Click on Save in the upper right corner to save it externally.

20) Load the Constrained_Transfer_Rig scene created in step 7. Branch select the Biped_Skeleton and open a mixer window. Open a browser and drag the motion clip exported in step 19 into the mixer. If everything is named correctly it should import right in, if not it will pull up a connection template for you to rename.

21) Select the group created in step 6 containing the constrained elements in the Biped_Rig. Plot the motion to the rig (Animate>Tools>Plot>ConstrainedTransforms). After the plot is complete it will ask if you would like to automatically delete the constraints, select yes. If you set up the pose constraints properly with only the appropriate rotation, translation, or scaling options active then it will only plot what is active. If you didn't, you have to manually remove any plotted animation on a transform that is not wanted, for example: translation on arm bones. A new feature in version 3.5 is the 'Process rotations to ensure continuity' option in the plotting dialog. This is a gimbal lock killer which is very helpful in many situations.

22) Once your motion is plotted and all constraints removed you can now create a motion clip for the Biped_Rig and export it externally as we did for the Biped_Skeleton in step 19 for use in a scene with your final character that has detailed weighting to your Biped_Rig.

The beauty of this process is that you can create a library of motion clips that can be used on any biped rig, created in a similar manner, in the mixer or applied as fcurves. You then have the power of additional animation using a well built rig for use in the mixer or for cleaning up mocap.

There are a couple of bear traps that we have not found a way around yet. From my experience it seems to be a problem with Motion Builder since we have duplicated it in Maya and Max. At all costs try to avoid layering motion in Motion Builder. There seems to be huge rotational problems that are randomly introduced when exporting motion that has had heavy blending in Motion Builder. In my experience the best results seem to come when you use Motion Builder simply as a conduit to get in MoCap data and only use a few of the tools for cleanup, maybe some filters and floor contact. Any time we have gone beyond this there are major problems. Perhaps when Motion Builder is more mature this will not be an issue. However, anyone competent in XSI will have access to much more power in the mixer and other animation tools than Motion Builder currently offers. Personally, I prefer the cleanup tools in XSI's fcurve editor to Motion Builders.

Best of Luck!

Re: Mocap.
« Respuesta #2 en: 08 Abril 2010, 09:09:39 »
Respecto a lo de la T-pose: sí, es muy importante que en el momento de hacer el Tagging tanto el personaje como el esqueleto de BVH estén en T.
En las sesiones de Mocap suele grabarse una T-pose al inicio de cada toma. Si no está, siempre puedes modificar a mano el BVH, aunque corres el riesgo de que funcione todo peor.

Yo te recomendaría que si tienes acceso a MotionBuilder, no dudes en hacer el retargeting en él y seguir los pasos del segundo post. Debería funcionar todo mucho mejor que con Motor.


Re: Mocap.
« Respuesta #3 en: 08 Abril 2010, 10:36:51 »
Ok, gracias Rchals, lo probaré a ver que tal.

Re: Mocap.
« Respuesta #4 en: 08 Abril 2010, 13:47:34 »
Bueno, lo que más fácil me ha resultado, es importar los .bvh en max a través de un biped rig.
Todo funciona bien.
Ahora, cómo puedo pasar eso a XSI? No necesito editar la animación, solo llevarme la geometría animada, no necesito huesos ni nada de eso.
Supongo que es cosa de plotear la animación, bake, point caché o algo de eso, no?
Sabéis que soy casi neófito en Max, así que cualquier ayuda para este propósito será bienvenida.

Gracias!

Re: Mocap.
« Respuesta #5 en: 08 Abril 2010, 13:57:10 »
Bueno, he probado exportando como .fbx y parece que funciona todo bien.

Re: Mocap.
« Respuesta #6 en: 08 Abril 2010, 14:06:10 »
Nunca dudes del poder de un FBX  8)

Biped de max es genial para importar mocap. Te ahorras muchos pasos si lo tienes todo bien configurado (yo suelo trabajar importando archivos .CSM y es sencillísimo).

Aún así, motionbuilder parte la pana en cuanto a retargeting.

Re: Mocap.
« Respuesta #7 en: 08 Abril 2010, 14:11:20 »
Efectivamente, tengo mocaps en .CSM y funciona genial.
Una pena que no sea tan fácil en XSI (o que yo no sepa hacerlo tan fácilmente)
Gracias!

Re: Mocap.
« Respuesta #8 en: 08 Abril 2010, 14:18:51 »
No es el caso, pero y si quisiera modificar la captura mediante key animation?
Veo que no me deja y de un primer vistazo no encuentro donde editarlo.
Voy a seguir mirando.

Re: Mocap.
« Respuesta #9 en: 08 Abril 2010, 14:20:14 »
En que programa/paso?