Help: Crowd demo with my model

Problems building or running the engine, queries about how to use features etc.
kevinlan
Gnoblar
Posts: 7
Joined: Mon Mar 19, 2007 4:40 am

Help: Crowd demo with my model

Post by kevinlan »

Hello,
I'm trying to replace model in crowd demo and have a problem.
As the crowd demo have a limit support model with 20 bones or below, I made a character model have 18 bones with animation and export it. The model and animation looks good in ceguiMeshViewer. But when I replace "robot.mesh" in crowd demo to my model, I got twisted models and wrong animation when running modified demo. It seems all bones got wrong transformation(animation) matrix? It's anyone can help?

Thanks!!
Crashy
Google Summer of Code Student
Google Summer of Code Student
Posts: 1005
Joined: Wed Jan 08, 2003 9:15 pm
Location: Lyon, France
x 49

Post by Crashy »

Hello.

Before further testing on my side, I'd like to know if your model has seomething more thant position+texcoords+boneweights in the vertex declaration. Do you have tangent vectors?
Follow la Moustache on Twitter or on Facebook
Image
kevinlan
Gnoblar
Posts: 7
Joined: Mon Mar 19, 2007 4:40 am

Post by kevinlan »

Crashy wrote:Hello.

Before further testing on my side, I'd like to know if your model has seomething more thant position+texcoords+boneweights in the vertex declaration. Do you have tangent vectors?
Hi Crashy,
Thanks for your reply:D
I have exported vertex normals, vertex colors, textures in LEXIExporter export settings, and of course boneweights(one boneweight per vertex for simplify data) in vertex declaration. Than converted mesh to xml file and check it after exported.

I have tried to make very simple animation just only rotate right lower arm 90 degrees. But they are rotating right upper arm in crowd demo.

We have a project that have to see about 500 skeletal animated characters at same time!! Instancing seems the only way I can make it possible ( in reasonable performance ).

Thanks.
Crashy
Google Summer of Code Student
Google Summer of Code Student
Posts: 1005
Joined: Wed Jan 08, 2003 9:15 pm
Location: Lyon, France
x 49

Post by Crashy »

OK. you confirm that it works good for a single entity?
As usual, I'd like to analyse and test by myself your model to check what's wrong, if you can of course, I understand if there is some rights on it. That's not a problem if you can't, I'll try with a quick made model.

I'm very busy this week(working from 9AM to midnight everyday), but I'll check it as soon as possible.
Follow la Moustache on Twitter or on Facebook
Image
kevinlan
Gnoblar
Posts: 7
Joined: Mon Mar 19, 2007 4:40 am

Post by kevinlan »

Sorry to disturb you Crashy.
I PM you with my artist's model and my quick made model.

If anyone are interesting this, I have a quick made mode (use 3ds max's tutorial data) in http://bluesystem.myweb.hinet.net/soldier.zip

Thank you again! Crashy.
Crashy
Google Summer of Code Student
Google Summer of Code Student
Posts: 1005
Joined: Wed Jan 08, 2003 9:15 pm
Location: Lyon, France
x 49

Post by Crashy »

Nice model ;)
For the moment, the first problem I see is that your model has 1 weight/vertex, and the shader needs 4 weights per vertex.


But that's not the only problem, I'm checking for other issues
Follow la Moustache on Twitter or on Facebook
Image
Oogst
OGRE Expert User
OGRE Expert User
Posts: 1067
Joined: Mon Mar 29, 2004 8:49 pm
Location: the Netherlands
x 43

Post by Oogst »

Have you checked whether the actual bone-count in the model is really 18? 3dsmax might be doing some things that LEXI exports that you are not aware of. You can ask a skeleton for the number of bones it has.
My dev blog
Awesomenauts: platforming MOBA (PC/Mac/Linux/XBox360/X1/PS3/PS4)
Blightbound: coop online dungeon crawler (PC)
Swords & Soldiers: side-scrolling RTS (Switch/PS3/Wii/PC/Mac/Linux/iPhone/iPad/Android)
Proun: abstract racing game (PC)
Cello Fortress: mixing game and live cello performance
The Ageless Gate: cello album
Crashy
Google Summer of Code Student
Google Summer of Code Student
Posts: 1005
Joined: Wed Jan 08, 2003 9:15 pm
Location: Lyon, France
x 49

Post by Crashy »

his model has really 18 bones, I checked it.

Currently, I think the problem comes from the number of bone per vertex, as the boneweight is a UBYTE4 in the vertex declaration. Then the indexation in the vertex shader is not good. I'm really not sure though
Follow la Moustache on Twitter or on Facebook
Image
Oogst
OGRE Expert User
OGRE Expert User
Posts: 1067
Joined: Mon Mar 29, 2004 8:49 pm
Location: the Netherlands
x 43

Post by Oogst »

That sounds like a very simple and quick thing to change. You only need to change three numbers in the shader: the number of iterations in the for-loop, the number fo weights and the number of indices.
My dev blog
Awesomenauts: platforming MOBA (PC/Mac/Linux/XBox360/X1/PS3/PS4)
Blightbound: coop online dungeon crawler (PC)
Swords & Soldiers: side-scrolling RTS (Switch/PS3/Wii/PC/Mac/Linux/iPhone/iPad/Android)
Proun: abstract racing game (PC)
Cello Fortress: mixing game and live cello performance
The Ageless Gate: cello album
Crashy
Google Summer of Code Student
Google Summer of Code Student
Posts: 1005
Joined: Wed Jan 08, 2003 9:15 pm
Location: Lyon, France
x 49

Post by Crashy »

Yep, already done, but there is something else wrong. I'm looking towards to know what.
Follow la Moustache on Twitter or on Facebook
Image