Archive 17/01/2023.

AssetImporter problems

Chimareon

Hi guys,
I am working on Urho3d App for HoloLens.
I would like to Import .fbx models into my app.
I know there is AssetImporter NuGet Package, which I downloaded into my Visual Project.

I cannot however find any guide on how to use it.
Would anyone who had succesfully used it care to guide me / Point me in direction of nearest good tutorial?

best regards
Chimareon

Alibaba

Guide for use here: https://urho3d.github.io/documentation/1.4/_tools.html

Chimareon

@Alibaba: I have seen this, but I cannot find the file i am supposed to execute in cmdline (I am on windows 10). I tried just calling AssetImporter as shown on the page You suggested, didn’t work. Should I add something to PATH?

Alibaba

Yes, it looks like this: (i rename “AssetImporter” to “as” for convenience)

Chimareon

I’ll try it tomorrow, when I am back in office.
thanks a lot :slightly_smiling_face:

Valdar

There should be an AssetImporter program in your Urho install (unless you opted out for it when you built Urho). Look in the path …\BUILDROOT\bin\tool\AssetImporter.exe. Just run it from the command line in that folder/directory without arguments for a help screen. As usual, add the folder to your Windows path to allow it to run anywhere.

Chimareon

thanks a lot to You both, found it, added to PATH and it works.

I am adding .mdl through var component = Node.CreateComponent();
component.Model = ResourceCache.GetModel(“Models/Model.mdl”);
component.Material = Material.FromImage(“Textures/texture.jpg”);
//or
component.SetMaterial(ResourceCache.GetMaterial(“Models/DefaultMaterial.xml”))

And I cannot see the object in game, but do not know if it is due to lack of texture or lack of object.
Game throws no errors and other objects are visible.

HALP?

guk_alex

Try to import it in the Editor, may be the scale of imported model is too big or too small. There you can play with position or scale to quickly find out whats wrong (also, check the log messages).

Modanung

Also see if your game outputs any messages of the “Resource not found” sort. Materials are not required to make a model visible. Lighting is, as well as either a StaticModel or AnimatedModel component.

And welcome to the forums! :confetti_ball: :slightly_smiling_face: