Archive 17/01/2023.

Understanding the AssetImporter with Animated Models

devrich

Hi,

On the http://urho3d.github.io/documentation/1.32/_tools.html page i understand that if not importing OGRE models to use AssetImporter. but i have always had model animations be a part of the 3D model and on that page it says .mdl and .ani ---- if I have a 3D model with several animations ( or even just one animation ) then will the AssetImporter split my 3D model into --> 3Dmodel.mdl 3DmodelAnimation1.ani 3DmodelAnimation2.ani 3DmodelAnimation3.ani etc ?

would the animations be strictly usable only to that specific 3D model or would they work on other 3D models that have the exact same skeleton-rig? ( in my case i’d like to create say 10 characters but all use the same skeleton-rig and all have the same initial t-pose )

Additionally: I have always used 32-bit .png files ( usually with semi-transparent or translucent areas ) in my 3D models but would .dds be better and if so then how to convert my 32-but .png’s to the .dds format to keep Urho3D happy with the final .dds file? ( please note I have never worked with .dds files before )

Edit: Also would .dds work on Android or would I need 32-bit .png instead?

Edit 2: before i asked “and I export it as .FBX ( is .FBX or .MS3D ok to use? )” and the answer is here ( i should have looked here first ) http://assimp.sourceforge.net/main_features_formats.html so currently it doesn’t support FBX but does support MS3D which is ok i guess…

jmiller

edit, others have given better answers

cadaver

Skinning bone weights are stored in the .mdl. There should not be a problem to use animations in several models that share the same rig, provided that the bone transforms are identical (ie. no repositioning or scaling of bones between models)

codingmonkey

they work on other 3D models that have the exact same skeleton-rig?
should work yes
Once these different models must be use the same type of rig.
Binding to the skeleton model is makeing in your favorite 3D editor (Maya, Blender…)

Also would .dds work on Android or would I need 32-bit .png instead?
i suppose what not, i don’t know exactly.
You need to have native texture format for each platform for better perfomance.

*.png I would use only at the stage of development but not at the stage of release.
He slows down when loading the game, because of the 3D engine is still trying to keep the texture with the native hardware format as I think.

*.DDS would be preferable to the PC platform. This is a hardware format it is not any additional calculations when loading the game.
and *.dds also preserve gpu memory bus bandwidth, 'cause it is hardware compression has.

In addition it may contain pre-calculated mipmaps. And If you download the *.png video card again tries to generate them, which takes time.

i’m usually use command line tool - nvdds.exe (from NVDSK TOOLS) + *.bat file for batch convert.
Aslo you may install plugin for gimp and expors your’s textures one by one from gimp )

is .FBX or .MS3D ok to use?
In your place I would have done so.
save *.fbx -> opened it in the blender -> looked instill is ok with the model? -> And do export through the plug from @reattiva to the project folder

Mike

To supplement previous answers, dds works fine on Android and AssetImporter supports fbx.

devrich

Many thanks for all your help here :smiley:

I am trying to get the AssetImporter compiled on my system right now but it has an ALSA library not found error so as soon as i get that fixed then i’ll try to get some of my .fbx models into Urho3D. Also I think I’ll start doing my models using dds.

Thanks again!

devrich

Got it! The answer was to go grab the ALSA 1.0.28 “lib” from their site and then install that to my offline PC. After that cmake/make worked perfectly to compile Urho3D from source. Now I got the AssetImporter and everything!! I imported one of my .FBX models in and it’s pretty awesome :smiley:

?? I do have a question about backfaces: how to turn OFF “draw backfaces” on specific .mdl models using Lua Script?

codingmonkey

I do have a question about backfaces: how to turn OFF “draw backfaces” on specific .mdl models using Lua Script?
You need assign a new material for this part of mesh, and then in Urho3D editor in Material Editor

choise cull mode, then save material.

devrich

That was just what I needed, thanks codeingmonkey! :slight_smile: