I’m wondering how I can create models and textures and import them. So far I tried importing the .mdl files from urho3D to edit them and export them back into urho3D, but I can’t open them with Blender or another program.
It’s a one-way pipeline, unless you want to write a reverse-exporter. Create the model in Blender, export it to .mdl for use in Urho3D.
Hi wicash, Welcome to the community!
Urho3D has a tool called AssetImporter which you can use to convert FBX files into MDL files.
You can use it to import Scenes, Models and Animations from FBX into Urho3D .xml, .mdl and .ani format. It can also import materials and textures.
This means you can create your 3D assets in any modelling application that can export to FBX.
But as mentioned, this is a one-way pipeline, so be careful to keep the FBX input files, and/or the native files from the modelling app, for future editing and re-exporting.
It may take a few attempts to work out which “switches” you need to provide when you first start using AssetImporter, depending on things like the lighting requirements of your scene, but it’s not too difficult to work out, and there’s lots of help available here.
Thanks for the help guys.
So let’s say I create a scene and a few models and export them correctly. What approach should I take to make a “game level” out of it? Is the urho3D Editor a good choice to assemble a level?
I would say yes, even though I don’t use it.
I currently tend to create my scenes in code, and immediately save them to XML format. I can then choose to edit the XML files in the editor, or some other editor, and/or reload those XML files instead of creating the scene in code. It’s a chicken and egg thing.
For exporting models from Blender I’d use this exporter.
Also, welcome to the forums!
There have been a few editors and content generators posted in https://discourse.urho3d.io/c/showcase/code-exchange and elsewhere in the forum and more can be added to https://github.com/urho3d/Urho3D/wiki somewhere.
Two I know:
🏗 Edddy: a block-based map editor written in C++
I use text editor a lot.
Urho3D-Blender works well for me - models, detailed scene.
I use Urho editor sometimes to preview things and create prefabs.
I’ve stumbled upon Edddy before. I’m not sure if this is the right place to ask this, but how can I install it? I got the files from https://gitlab.com/luckeyproductions/Edddy but I have no idea how to actually build the editor.
I wouldn’t call Edddy quite production-ready yet, it’s missing several essential features.
But if you’d like to compile it anyway, the easiest way would be to use QtCreator to open the PRO-file after adding Urho3D (pasted or sym-linked) to your Edddy folder.
Thanks for the help. I checked out Edddy and JTippetts Terrain Editor.
I have a few more things I’d like to ask:
1.) How do I get anything to show up in U3D Terrain Editor at all? Everything I see is this: https://i.imgur.com/qWPJqDV.png
2.) When I want to load terrain like in the mini vehicle game or the water example, do I always need a height map?
3.) When I create a landscape/terrain in Blender, what is the best way to get it into urho3D? Do I need to create a height map and export the textures individually?
2.) It seems that without a height map, Terrain will use all zero heights. I admit I have not tested.
3.) Many terrain editors will output a height map, and some, a weight map for blending the actual textures… roughly as described in https://wikipedia.org/wiki/Texture_splatting and https://wikipedia.org/wiki/Heightmap
Here some have posted ways to get a heightmap, and I link to one method generating from a mesh in Blender.
Thanks for the fast response.
I managed to get a heigh map for the Terrain I created in Blender.
Now I want to add my textures. Since the .xml files look like this
I figured I can just replace the TerrainDetail.dds files with my own. So far this works as well, but from what I see it seems like the texture units are placed randomly(?) Let's say I want to create a Terrain that has a small road in it and I want the road to have a specific texture. What would be the approach for doing this?
<technique name="Techniques/TerrainBlend.xml" /> <texture unit="0" name="Textures/TerrainWeights.dds" /> <texture unit="1" name="Textures/TerrainDetail1.dds" /> <texture unit="2" name="Textures/TerrainDetail2.dds" /> <texture unit="3" name="Textures/TerrainDetail3.dds" /> <parameter name="MatSpecColor" value="0.5 0.5 0.5 16" /> <parameter name="DetailTiling" value="32 32" />
For blending the detail textures one will also need a corresponding weight map. The U3D Terrain editor thread goes into some detail about those.
Gotta admit, I haven’t really worked on the terrain editor in quite some time, and it’s never really been what you would call ‘production ready’. Quite far from it. But if you can find anything in the log file to indicate what’s going wrong, it might be helpful. Your screenshot shows that the terrain isn’t being drawn, which is probably a shader compilation issue. I bounced quite a lot between GL and D3D11 when working on that thing, so at any given point in time one shader set or the other was completely broken, and I honestly can’t say what condition it may have been in when I stopped working on it last.
I probably should push a notice to that repo about it’s inactivity and brokenness.