How to import from blender

My purpose is to make a planetarium. I want the user to see stars and to click on a star to select it and get informations.
I made a 3D scene with blender and python scripting: I made 500 white filled circles around a sphere (the 500 stars are at the good position, facing the center). The light and the camera are in the center of the scene. I can render it in Blender.

Next, I need to import the objects in my Urho3D project.

These are few questions :

  1. the Blender Urho3D addon seems not to work with Blender 2.8. Right?
    I need to use Assetimport to convert my scene.
  2. Can I convert a full node with all the circles in it. assimp does not propose me Urho3D export command. How should I do? Is there any step by step documentation?
  3. what should I get? a xml file? 500 xml files? a mdl file?

I made python scripting in blender to draw the sky.
4. would it be a better (faster or easier) solution to draw the sky in urho editor with angelscript?

Thank you for your help and your advices

reattiva’s exporter has a branch named 2_80. Clone the repo and switch to that branch (or just visit that link, and choose download ZIP, then follow the README instructions to install the addon in Blender) . The exporter worked the last time I tried it with Blender 2.8.

1 Like

There’s also AssetImporter.exe if you build it with Urho3D, where you can pass it a collada file or a blend (?) and get an mdl + Textures, animations, etc.

Great, it works!
So I exported 7 selected circles as 7 .mdl files. (I can’t attach any picture at this time :frowning:
Is it possible to export one mdl file with all the 500 circles as children nodes?
Will the user be able, from a urho3d project, to select one circle among the 500 circles mdl unic file?

So I ticked the “Merge objects” box and exported a 134 Ko .mdl file. I guess I made it.
I will try to render it in a urho3d project and see if the user can select one circle and if I can get the name of the object clicked…

The exporter also has the option to export an XML scene file, which may be useful.

Thank you for your answers.
I was able to see my model in a urho3D project. But I can’t see the Materials (the color of the disks).
I tried to export the materials but I get this error:

Traceback (most recent call last):
File “C:\Users\pierre-louis\AppData\Roaming\Blender Foundation\Blender\2.81\scripts\addons\”, line 937, in invoke
return self.execute(context)
File “C:\Users\pierre-louis\AppData\Roaming\Blender Foundation\Blender\2.81\scripts\addons\”, line 933, in execute
File “C:\Users\pierre-louis\AppData\Roaming\Blender Foundation\Blender\2.81\scripts\addons\”, line 1600, in ExecuteAddon
File “C:\Users\pierre-louis\AppData\Roaming\Blender Foundation\Blender\2.81\scripts\addons\”, line 1473, in ExecuteUrhoExport
Scan(context, tDataList, settings.errorsMem, tOptions)
File “C:\Users\pierre-louis\AppData\Roaming\Blender Foundation\Blender\2.81\scripts\addons\Urho3D-Blender-2_80\”, line 2500, in Scan
DecomposeMesh(scene, obj, tData, tOptions, errorsMem)
File “C:\Users\pierre-louis\AppData\Roaming\Blender Foundation\Blender\2.81\scripts\addons\Urho3D-Blender-2_80\”, line 1938, in DecomposeMesh
DecomposeMaterial(mesh, material, tMaterial)
File “C:\Users\pierre-louis\AppData\Roaming\Blender Foundation\Blender\2.81\scripts\addons\Urho3D-Blender-2_80\”, line 1724, in DecomposeMaterial
tMaterial.twoSided = mesh.show_double_sided
AttributeError: ‘Mesh’ object has no attribute ‘show_double_sided’

Exporting materials from Blender 2.8 not implemented yet, becouse in Blender 2.8 internal rederer was removed. You can still use Blender 2.7. Currently I am experimenting with convertig Urho’s shaders to Cycles one to one (Unlit and Solid) but I can’t say when I public something


@1vanK no worries, there is no hurry.
I guess I can add materials in my urho project, after I have imported the model or in urho editor…

Some progress

data.blend + textures for testing

It is a surprise for me, but custom shaders work not only in Cycle, but also in Eevee