About Store Forum Documentation Contact



Post Reply 
EE 2.0 "Body Object" [Solved]
Author Message
Fex Offline
Gold Supporter

Post: #1
EE 2.0 "Body Object" [Solved]
*****EDIT****

Ok you need to drag the object into the model editor window, not into the little bar that says "Drag and drop an object here to set it as the body."

That does fix the animation problem, you just have assign your .skel in 1.0 to a dummy mesh in 1.0 (drag the .skel into a ball mesh or something, then save the mesh, it will show it is linked along the top bar), the .obj file from 1.0 must have the same name as the .skel and .mesh files (0.obj, 0.skel,0.mesh in the same folder) drag the entire folder into EE 2.0 and it should load. Assign that new 2.0 object as the body object for each EE2.0 mesh object, and access just the skeleton from the dummy object as shown below. Animate skel, then draw.

**************
Tab "6" in the model editor, I can't seem to assign a body object.

In 1.0 I was able to manually load a skeleton, animate it, and then draw each mesh bodypart of a character using the animated skeleton (which was not linked to any of the meshes).

In 2.0 I guess because a skeleton must be attached to an object, the skeleton gets scaled to that object instead of keeping its original scale, or ?? (look at the hands, the meshes deform during animation):

[Image: ee2animationskel_zps1f4bcf4f.png]


The animations are stored in a separate folder and as far as I can tell are not linked to anything.

The code looks like this (sorry it is going to look bad with all the UIDS), it is basically the same as with 1.0 except with workarounds using UIDs:

Code:
chrbody.head      =Game.ObjParamsPtr(UID(731459221, 1173463857, 1704643713, 4185847339))->mesh(); //"obj/chr/human_male/body/head.mesh";
            chrbody.armor.mesh     =Game.ObjParamsPtr(UID(1124387909, 1136621580, 1224757419, 3394357734))->mesh(); //"obj/chr/human_male/farmbeg/body.mesh";
            chrbody.helmet.mesh    =Game.ObjParamsPtr(UID(2280506302, 1210544995, 878822847, 3813536812))->mesh(); //"obj/chr/human_male/farmbeg/helmet.mesh";
            chrbody.boots.mesh    =Game.ObjParamsPtr(UID(715540180, 1146488891, 1685307057, 527898476))->mesh(); //"obj/chr/human_male/farmbeg/boots.mesh";
            chrbody.gauntlets.mesh=Game.ObjParamsPtr(UID(3421466860, 1232732051, 2846473136, 1801734421))->mesh(); //"obj/chr/human_male/farmbeg/gloves.mesh";
           // chrbody.back.mesh=Game.ObjParamsPtr(UID(1421668174, 1232996909, 3586986912, 3319246842))->mesh();
        
           Game.ObjParamsPtr obj=EncodeFileName(UID(3878116659, 1329709022, 1603261088, 1190520579));
           MeshPtr mesh=obj->mesh();
           skel.create(mesh->skeleton() , 1.0);


I'm guessing the "body object" is needed to keep this from happening.. but I would rather not need to assign hundreds of meshes to the same body object...

TLDR vesion:
This is how I did it in 1.0
skel.create(Skeletons("obj/chr/human_male/skeleton.skel"), 1.0);

Now 2.0:
Game.ObjParamsPtr obj=EncodeFileName(UID(3878116659, 1329709022, 1603261088, 1190520579));
MeshPtr mesh=obj->mesh();
skel.create(mesh->skeleton() , 1.0);

Results in totally deformed animations. I guess "assign body object" is the remedy but I can't assign it by draging an object to the box in the model editor...


Drawing is basically:
Code:
skel.clear().animate(UID(1714194637, 1141052503, 4079640996, 339194584), Time.time()).updateMatrix(matrix).updateVelocities();

if(armor.mesh    )armor.mesh    ->draw(skel);
if(helmet.mesh    )helmet.mesh    ->draw(skel);
if(boots.mesh    ){boots.mesh    ->draw(skel);}
if(gauntlets.mesh)gauntlets.mesh->draw(skel);
if(ring.mesh)ring.mesh    ->draw(skel);
if(neck.mesh)neck.mesh    ->draw(skel);
if(helmet.showHead)if(head     )head     ->draw(skel);

Thanks in advance for any insight.
(This post was last modified: 12-08-2013 09:08 AM by Fex.)
12-08-2013 08:58 AM
Find all posts by this user Quote this message in a reply
Esenthel Online
Administrator

Post: #2
RE: EE 2.0 "Body Object" [Solved]
Quote:Ok you need to drag the object into the model editor window, not into the little bar that says "Drag and drop an object here to set it as the body."
Thanks, I'll update it so dragging to the button will work as well.
12-08-2013 09:46 AM
Find all posts by this user Quote this message in a reply
Post Reply