creating animated MD2 models!

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
vermeer
Posts: 2017
Joined: Wed Jan 21, 2004 3:22 pm
Contact:

Post by vermeer »

I use bones and weights and all ik stuff for vertex animation same as I do for x, etc. Is just that the exporters will bake it as keyframes of the meshes. A bunch of meshes, that get interpolated spline(~md3, better) or linear(md2, uglier) depending on the format.

Stuff I recommend is md3, of course. But specially if you forget the TAGS stuff and the per pieces kind, and use it just a full peice md2. but of course, way better than md2. The bending will be natural and all, as is actually like a bake of the smooth weights you allways do with bones and weights. Like "photos" taken on different moments, that get tweened in the engine by some sort of math interpolation. (that's nothing you have to care of)

Your exact question: Here the irrlicht patch -I have not used it as I am not a coder- , plus the md3 exporter I tested to be full working some time ago (with surely Blender 2.35 and 2.36, for in case you may have to downgrade or update your self..! I dunno yet if works with 2.4x, which would be really sweet...if you guess it, please, tell me as I'd like to know but lately in a great lack of time.... besides helping -hehe- some plugin authors.... )

http://www.savefile.com/files/5411981

Of course, that above is a temp 14 days file, as allways I don't have a server or permanent space, and cannot abuse more of Bal's Gentleness (my signature)
Finally making games again!
http://www.konekogames.com
vermeer
Posts: 2017
Joined: Wed Jan 21, 2004 3:22 pm
Contact:

Post by vermeer »

http://www.yourfilelink.com/get.php?fid=11090

just in case u don't get it....
Finally making games again!
http://www.konekogames.com
vermeer
Posts: 2017
Joined: Wed Jan 21, 2004 3:22 pm
Contact:

Post by vermeer »

ok,

tested md3 0.2 lgt exporter with Blender 2.41....It works, but some details :


- Scale. In the script (one of the reasons I like to just use from text editor and run with alt+p) This is a well known issue of vertex anim formats. Scale and transformation a great issue. Well, still, I happen to like it more than md2, so I did some hard work. You need to fine tune the scale export needed for ur model in the py file, in text editor. (or maybe rescale the model.) For example, mine which worked with a sample model I have here (could use all sort of IK and constraint helpers as is exported as a bunch of vertices...) was :

MD3_XYZ_SCALE=(1.0/1024.0) (instead of MD3_XYZ_SCALE=(1.0/64.0))

You need to put there the frames to export or will only export a frame by default :

NUM_FRAMES = 80 (my animation was of 80)

You need to delete the folder prefixes that appears in the export GUI. Also maybe put a different name each time or delete first in windows if gonna overwrite...That's an advice, though not sure if necesary.


see there this :

MD3_MAX_FRAMES=1024
MD3_MAX_SHADERS=256
MD3_MAX_VERTICES=4096
MD3_MAX_TRIANGLES=8192


So, your character should not be more than 8,192 tris. I never knew if was a carmacks engine limit, or u can surpass it, and not a format limit. I have not tried yet. Surely you can surpass it for irrlicht...

The scale trick I mentioned (fine tune till u find the good value) is as it happens that...at least with my samples, it does a weird crumple noise on the vertices. I suspected is precission tyipcal problem of md2/md3 formats, so I digged for an scale setting...and found that one.

I happen to see that with that value my mesh quite hi poly, I guess in a normal character is way harder to notice...or maybe not- Do the trick with a cilinder of same proportions: is easier to see. The mesh noice can really deform the thing, but surely once found a good value, surely better result than an md2.

My first fast try with md2 exporter 0.16 was non successful. I'll tell u more later, maybe.


havent tried yet latest ben's x exporter with 2.41 blender.

My advice: use x allways you can.
Finally making games again!
http://www.konekogames.com
Guest

Post by Guest »

I don't like .X files because, they usually don't work. Actually, they never worked for me. Any idea of what im doing wrong. The main errors are "not found bone" or "Cannot open x file" or the program just shuts down :(
GuestKitten

.X

Post by GuestKitten »

The .x files have changed, but Irrlicht has not been updated, nor error-proofed for such chages. That is why all my code is written to ignore such changes. A LOT of new stuff has been added to the .X files,so I use MD2 now.
ProSoft
Posts: 59
Joined: Thu Sep 08, 2005 10:55 am
Location: Brasil

Post by ProSoft »

RapchikProgrammer
Posts: 279
Joined: Fri Dec 24, 2004 6:37 pm

Post by RapchikProgrammer »

Very nice posts vermeer! If i got give u some reputations on the forums you would have a lot of them by now from me! The posts are really good and thnx for that md3 patch too! Can u tell me how to use skeleton meshes with .3ds models using irrlicht! I convert .3ds to .x but have no idea to relate these two!
vermeer
Posts: 2017
Joined: Wed Jan 21, 2004 3:22 pm
Contact:

Post by vermeer »

for the people with problems with x... people like dhenton or electron, among others, use x format for their characters...

I have no issue with x (knowing all the workarounds , said in these forums em...mostly by me. ) But true that i don't use irlicht as i don't code. I use x as exchange format , though.


@RapchikProgrammer

Thanks for the cumpliments. To be sincere, I don't know exactly why i post so much help :D

maybe as a feeling of all the ~art knowledge wont go away with me or something ;)

The posts are really good and thnx for that md3 patch too!
indeed, for some reasons, md3 is not a bad option, better graphically than md2.

Can u tell me how to use skeleton meshes with .3ds models using irrlicht! I convert .3ds to .x but have no idea to relate these two!
yup

actually 3ds wont carry bones.

3ds , as far as I know, only can carry some linked parts information. Even some lights and perhaps camera's, in some very developed exporters,but not all package export this featured.

usually not.

The linked parts hierarchy could be yet good for machines, tanks, etc, type of models, only. And if that's the case, and you have milkshape, I'd recommend then better ms3d format. Is much better. As keeps better smoothing, etc.

Indeed, for this engine I'd recommend x or md3 as best formats for characters...

and ms3d for statics or mechs and stuff...

But not that i have tested in engine, but from what I have been reading along time from coders dealing with formats here.


Think of *.3ds as generally just an static mesh format. Or for ships, etc. Not for characters, generally.

If the plan is convert an space ship to x, you can probably use the freeware crossroad converter, for example, though there are more converters.

I prefer obj for static meshes, but dunno what is the support of it in irrlicht.
Finally making games again!
http://www.konekogames.com
Post Reply