What is the Correct form to export from blender to urho3d c++ code?

1,390 views
Skip to first unread message

Meir Yanovich

unread,
Jan 8, 2014, 3:31:06 AM1/8/14
to urh...@googlegroups.com
Hello 
i was scanning the forum and the documentation  for simple answer and got more confused . 
im looking for simple description on how to export model with texture and simple animation to use it in urho3d scene.
1.how to make simple export from blender  , how to use AssetImporter.exe ,OgreImporter.exe and PackageTool.exe where and when ? if any 
2.how to combine it all in the Editor 

Thanks 

Lasse Öörni

unread,
Jan 8, 2014, 4:52:15 AM1/8/14
to
The documentation should have a separate section on content importing :)

The basic path is that you export from Blender to some format, eg. Collada DAE, then run AssetImporter (you don't need OgreImporter or PackageTool)

assetimporter model yourinputfile.dae outputfile.mdl

You will get files (model, material, possible animations) that should be now directly usable in the editor.

In practice you may run into problems, especially with animations / skeletons, as it appears there's not necessarily a single export format that works best out of Blender. AssetImporter itself uses the assimp library to read the exported data, and its maturity for reading various input formats will also vary.

Meir Yanovich

unread,
Jan 8, 2014, 5:48:50 AM1/8/14
to urh...@googlegroups.com
Thanks , i will try .
mean while . 
is this the final/best for today  solution  ? 
http://teamfriesen.com/blog/2013/09/07/finally.html

Meir Yanovich

unread,
Jan 8, 2014, 6:12:36 AM1/8/14
to urh...@googlegroups.com
Hey i tryed that with the command line :
AssetImporter.exe model ..\models\calanda\male.dae output/male.mdl  -p "output/data" -t
or simple :
AssetImporter.exe model ..\models\calanda\male.dae output/male.mdl

using this model ; http://www.blender-models.com/model-downloads/humans/id/male-ultra-low-poly-model/
and i got this error:

i loaded the model in blender and exported it to Collada DAE 
attaching the model original and exported 
what im doing wrong ?
male.zip

Lasse Öörni

unread,
Jan 8, 2014, 6:59:44 AM1/8/14
to
I'll have to test with debug mode AssetImporter. Release mode seemed to work OK and produced a .mdl file of sensible size, but I didn't test further. The assert while using an std::vector would point to an error inside the Assimp library, as Urho itself doesn't use STL.

(the .dae file in your zip was 0 bytes, so I re-exported using Blender 2.67)

Meir Yanovich

unread,
Jan 8, 2014, 8:07:55 AM1/8/14
to urh...@googlegroups.com
Hmm 
what are the command line you are using when converting ? 
i keep getting now this error no matter which model i try to convert :
Could not open or parse input file models\car\Car_LowPoly_Blue.blend
when i try this mesh :
Urho3D\Bin>AssetImporter.exe  model models\car\Car_LowPoly_Blue.blend output\car.mdl
using this model:
http://www.tutorialsforblender3d.com/Models/LowPolyCar/LowPoly_Car.html

is there any debug / verbose flag to AssetImporter.exe ? i can't find one 

Meir Yanovich

unread,
Jan 8, 2014, 8:22:29 AM1/8/14
to urh...@googlegroups.com
Ok i replay to my self , Even that it said in the http://assimp.sourceforge.net/main_features_formats.html
it can read blend file , it doesn't.  for me it can read only Collada files , 
but i realy think there should be some-kind of verbose flag , i don't what to debug the tool each time . 

Lasse Öörni

unread,
Jan 8, 2014, 8:54:40 AM1/8/14
to urh...@googlegroups.com
You're right, Assimp's loading of .blend files is still flaky at the moment. I used this commandline to convert from the dae which I had exported from the .blend file:

AssetImporter model male.dae male.mdl

I also just added a -v option to AssetImporter, which will enable verbose assimp logging. In the case of trying to load the male.blend directly it does spit out some errors. But generally I'd guess the usefulness of the logging is highly variable.

Meir Yanovich

unread,
Jan 8, 2014, 10:16:14 AM1/8/14
to urh...@googlegroups.com
Thanks for the -v 
now i facing another puzzle , hope you or other members will help me 
i try to load the that is import the resulting model into the editor but with no luck . 
what is the right way to load the converted model into the Editor ? 
to just FIle -> import the mdl or Collada file don't show any thing . 
what im doing wrong here ?

Chris Friesen

unread,
Jan 8, 2014, 10:45:20 AM1/8/14
to urh...@googlegroups.com
Import will convert an asset and create a StaticModel and assign the models/mats to StaticModel.  If you have already converted to mdl you will have to create the components manually and assign the model/materials to a StaticModel or AnimatedModel.  You can save a node at anytime which basically serializes the attributes to an xml/bin file.  This is Urho's 'prefab'.

Meir Yanovich

unread,
Jan 8, 2014, 11:03:33 AM1/8/14
to urh...@googlegroups.com
ok so if i understand you right 
i dont need to convert the Collanda model , just import it .
well i did it still didnt saw any thing .
what to do in the Editor it self to create StaticModel and assign to it the model?

Chris Friesen

unread,
Jan 8, 2014, 11:28:08 AM1/8/14
to urh...@googlegroups.com
Usually if i import something and it doesn't show up it means that assetimport failed.

The only method that works 100% for animated models for me is to run a blender fbx through the fbx converter.  http://usa.autodesk.com/adsk/servlet/pc/item?siteID=123112&id=20481519

Admittingly I haven't done much importing since blender 2.69 and urho bumped asset import.

Blender kind of sucks for exporting.  I wish they would have a comercial exporter that used the official sdks.  Also try the latest version (2.69) of blender if you havn't yet.  They have done a lot of work with exporters.

Lasse Öörni

unread,
Jan 8, 2014, 11:52:17 AM1/8/14
to urh...@googlegroups.com
From the "Create" menu, create a Node, then from the "Geometry" submenu create either StaticModel or AnimatedModel component to it (I recommend the latter because apparently the model's geometry is deformed too large without the skeleton, you need skinning in this case to make it look right), look at the Model attribute in the inspector, choose "Pick" to bring up the model selection dialog.

Note that the scene is quite dark without light sources, but you should be able to see the model.

Also noted that the materials show up untextured. I don't see a reference to maleSkin.png or maleHair.png anywhere in the dae file that I exported, so it seems Blender's export is messing up.

Meir Yanovich

unread,
Jan 8, 2014, 1:12:55 PM1/8/14
to urh...@googlegroups.com
Thanks Lass and Chris 
i will try this , there should be work done in the urho3d engine to stream line the import models some how . 
it can be pain and time consuming to deal with it . and as i guess time is problem to all of you and me

Chris Friesen

unread,
Jan 8, 2014, 2:18:30 PM1/8/14
to urh...@googlegroups.com
There is an blender exporter plugin that I really like for static models.

If you can articulate a means of improving the workflow that would be really helpful.  There isn't a lot we can do to fix blenders fail exporter save taking arms and threating autodesk to open source their sdk.

I am working on a resource browser for managing already existing assets but the ux still sucks on it.  I have spent like 3 months on it and it still sucks which is maddening to no end. 1500 loc and nada.  It turned out that the marginally improving the editors resource management was easy but wasn't worth it.  Rearranging where clicks happen isn't that useful. So I am not going to release it until its a substantial improvement the current workflow.  I guess to be fair to myself it is better then what we have but it certainly lacks polish.  I did add search to it a couple of weeks ago and it started to take life.  I have diverted my attention to areas that will make definite improvements the editor like multiple viewports, orthographic views, and customizable keybindings.  I should have a pull request for the viewport stuff in a week or so \m/

Meir Yanovich

unread,
Jan 8, 2014, 3:15:38 PM1/8/14
to urh...@googlegroups.com
Chris , i know what you mean its hard very hard to work on open source project in your spare time .
im really looking deep into this engine as candidate for me to work with . 
when i will have stuff to improve to tell i will do it as i used to do.
by the way its looks very strange for me that you build the Editor as you did . 
why not taking the super powerful Qt frame work and build on it ? it is LGPL its good license for such powerful and flexible GUI framework.
now i guess you are limited or will be limited very soon if you like to  extend your Editor . 
or you can build with c# as cocos2d-x build there cocosstudio and about to use MONO for cross platform ( as unity3d is doing ) 
but i really recommend  Qt 

Lasse Öörni

unread,
Jan 8, 2014, 4:46:08 PM1/8/14
to urh...@googlegroups.com
There are some reasons the editor is a script program which runs inside the engine and does not rely on a 3rd-party UI toolkit:

- To exercise the inbuilt GUI and other built-in capabilities (like running system commands)
- To function as an example of building a complex application with the engine
- To ensure that the build of the whole engine + editor is always relatively fast and straightforward. Either always fetching & building eg. Qt from source or telling users to get it prebuilt would have myriad possibilities of failure, and be time-consuming.
- In case the engine needs to render UI content on top of the 3D view, no 3rd-party toolkit provides a clean integration for this, when the UI elements are actual operating system-level windows or widgets.

That said Urho does have capabilities to render into an external window so if anyone does have interest for an external editor project the engine should not prevent it.

Meir Yanovich

unread,
Jan 9, 2014, 2:03:00 AM1/9/14
to urh...@googlegroups.com
hey still no matter what i can't see the car model , 
can you please see what im doing wrong here im attaching the converted model 
output_car_mdl.zip

Meir Yanovich

unread,
Jan 9, 2014, 2:32:05 AM1/9/14
to urh...@googlegroups.com
Hey answering to my self .
no need to check the model .
the reason i didn't saw the model is נecause the editor expect to see the models in its SDK defined path 
that is : Urho3D\Bin\Data\
once i put the model there every thing worked fine in the editor .
Reply all
Reply to author
Forward
Message has been deleted
Message has been deleted
0 new messages