About Store Forum Documentation Contact



Post Reply 
max skin modifier
Author Message
b1s Offline
Member

Post: #1
max skin modifier
is there a way to use my skinning and skeleton from 3ds max?
01-03-2010 06:46 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: max skin modifier
please check documentation
01-03-2010 07:09 PM
Find all posts by this user Quote this message in a reply
b1s Offline
Member

Post: #3
RE: max skin modifier
yes i have found finally some stuff about the exporting on the wiki.
havent still got it to work tho. im gonna keep on it for awhile. maybe it will get more clear.



ok.-. i have found the problem i had with x exporting.
i had several objects that i was trying to export/import.
with one mesh and skeleton it seems to work.

Before going to characters i had only worked with .obj format.
That couldnt take several material ids from one object for some reason.
with x. format the seperation in mesh editor seems to work with single object with different elements and materials.

Naah.. it dosent work correctly this way.. the skinning dosent seem to apply for the head.
(This post was last modified: 01-03-2010 08:05 PM by b1s.)
01-03-2010 07:11 PM
Find all posts by this user Quote this message in a reply
b1s Offline
Member

Post: #4
RE: max skin modifier
how can i add more object types?
like:
OBJ_CHR
OBJ_ITEM

ah sry found it on the data folder.


..ok
Finally got second character working with custom skeleton and animations.
Still had few issues with the exporting.

I used x. format and the character had several parts with different materials on them.
i exported them according directions but couldn't get the skinning information to all of the parts.
i tried to fix them with the mesh editor skinning techniques but it still some bugs remained that would not be there otherwise.

is there some secret for this or does anyone have some tips how to do this correctly?

btw if anyone is interested here's the test animation and char rendered in max:
Video
(This post was last modified: 01-04-2010 03:24 AM by b1s.)
01-04-2010 01:46 AM
Find all posts by this user Quote this message in a reply
Panerox Offline
Member

Post: #5
RE: max skin modifier
Quote:how can i add more object types?
like:
OBJ_CHR
OBJ_ITEM

Open and edit a file obj_type.enum.h which is in folder Data\Enum
01-04-2010 08:36 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #6
RE: max skin modifier
the most suggested format for importing skinning is Collada DAE, unreal PSK and milkshape MS3D.
.x format can have some issues.
01-04-2010 04:24 PM
Find all posts by this user Quote this message in a reply
b1s Offline
Member

Post: #7
RE: max skin modifier
i have now tried every possible way with .x format without complete success..
with collada i havent had any luck yet.. but im trying it out now with a newer version.
you are certain a skinned object can be exported with several materials?
ok.. that did the trick.
new version of opencollada and voila!
thanks for your quick help again. and sry for the inconvenience.
(This post was last modified: 01-04-2010 06:45 PM by b1s.)
01-04-2010 06:39 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #8
RE: max skin modifier
yes I didn't have any problems with collada,
if you'll still experience the problems then please send me the source .max file and I'll check it out
01-04-2010 06:45 PM
Find all posts by this user Quote this message in a reply
b1s Offline
Member

Post: #9
RE: max skin modifier
This time everything works untill i try to animate the character in game.
some weird issues come up with the character.
Everything works fine in mesh editor.
I have created everything the same way as i did with x. format and ran the custom animations correctly.
This time the animations just bug. only fingers seem to move and even they dont move correctly.
Now i have also tried .Psk with the same file.
This also acts differently.. Everything works in mesh editor.
In game the character does not bug in any way.. only thing is that it also doesn't animate.
(This post was last modified: 01-05-2010 02:11 PM by b1s.)
01-05-2010 01:44 PM
Find all posts by this user Quote this message in a reply
b1s Offline
Member

Post: #10
RE: max skin modifier
So to recap what have i tried in all together.

X. format.

Exported mesh and animations. in mesh editor it didn't recognize seperate material parts and left the skinning weights out from head. this could be fixed with manually skinning the head part in mesh editor. Most workable but not something that anyone would like to do.

Collada. format.
Exported same mesh with same animations and used the same code.
This time everything worked in mesh editor but when i tried to add the character to the game. Nothing worked. The vertexes flexed in different directions and didnt really animate anything.

PSK. format
Exporter again the same mesh with same animations.
Everything worked in mesh editor and the character came intact all the way to the game. only thing was nothing was animated at all.


I have 64x max2009 and used the latest releases of exporters.
The collada exporter had some different settings than the one in the screenshot.


Tried also reskinning the mesh and doing it all again. same results.
Everytime i used biped skeleton. renamed it in Mesh editor.
I dont see how the bonestructure could affect if the same bones and meshes worked with x.format

Also don't understand how with psk and dae everything works up to mesh editor but in game gets weird.

in my code im using extended chr class. (Remember this worked fine with x format)

enemy.h
Code:
#pragma once
/*
This is the enemy class
*/
struct Enemy : Game::Chr // extend character class by defining a player class based on the character
{
void create(Game::ObjParams &obj);
void setAnim();
virtual Bool update(); // here we'll update the player (please note that this is a virtual method)
virtual void draw(); // extend drawing to disable head rendering in FPP mode
};




enemy.cpp
Code:
#include "stdafx.h"
#include "Enemy.h"


Bool Enemy::update()
{
    // Actions
// set animations
    


  
if(Kb.bp(KB_1))
    {
    ragdollEnable (); // switch to ragdoll
    }
else
    {
    cskel.animate(L"Anim/maid01/cooking.anim",Tm.time()); // animate with "cooking" animation and current time position
    cskel.updateMatrix    (MatrixIdentity); // update controlled skeleton animation matrixes
    cskel.updateVelocities(              ); // update controlled skeleton bone velocities (this is needed for Motion Blur effect)
    }

   return __super::update();
}

void Enemy::create(Game::ObjParams &obj)
{
    __super::create(obj); // call default creation
    sac.walk=&cskel.getSkelAnim("Anim/maid01/cooking.anim");
    sac.stand=&cskel.getSkelAnim("Anim/maid01/cooking.anim");
}

void Enemy::draw()
{

__super::draw();
}
(This post was last modified: 01-05-2010 03:28 PM by b1s.)
01-05-2010 03:25 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #11
RE: max skin modifier
hello,

if it works in Mesh Editor then it means that you have some error in the game codes,

for example you're animating the character incorrectly

Code:
cskel.animate(L"Anim/maid01/cooking.anim",Tm.time()); // animate with "cooking" animation and current time position
    cskel.updateMatrix    (MatrixIdentity); // update controlled skeleton animation matrixes
    cskel.updateVelocities(              ); // update controlled skeleton bone velocities (this is needed for Motion Blur effect)
    }

   return __super::update();
you cannot animate in the update, and then call the __super::update
you need to move custom animating into virtual void Game::Chr::animate()
please check comments on that method in the Game::Chr class

Code:
sac.walk=&cskel.getSkelAnim("Anim/maid01/cooking.anim");
    sac.stand=&cskel.getSkelAnim("Anim/maid01/cooking.anim");
this is ok, but please know that there are other custom animations automatically used for the character (for example fist_l and fist_r are always automatically used, you can set them to NULL to disable them)
also there is 'run' when the character is moving
01-05-2010 04:08 PM
Find all posts by this user Quote this message in a reply
b1s Offline
Member

Post: #12
RE: max skin modifier
thanks for the explanation.. the reason why i didnt think the problem would be in the code was that everything animated fine when using .x format.
now i have a working custom animation in game with different materials attached to the character. thank you very much.
ill get back to you when i ran into more trouble.

ps. is it possible to use ragdolls with custom skeletons?
01-05-2010 06:17 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #13
RE: max skin modifier
yes, but I haven't tested that fully
01-05-2010 06:28 PM
Find all posts by this user Quote this message in a reply
b1s Offline
Member

Post: #14
RE: max skin modifier
im having some trouble with the physics capsule placement.
how does this work exactly?
its giving always different position that i adjust on the mesh editor.
01-05-2010 07:09 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #15
RE: max skin modifier
you mean for the character controller?
do you set the .phys in the object properties in world editor?
capsule for the character must be straight up aligned.
01-05-2010 07:19 PM
Find all posts by this user Quote this message in a reply
Post Reply