Question So, what's a good blender workflow for exporting things to orbiter in 2021?

jedidia

shoemaker without legs
Addon Developer
Joined
Mar 19, 2008
Messages
10,877
Reaction score
2,131
Points
203
Location
between the planets
Trying to get some stuff from Blender to Orbiter, and mostly failing spectacularly.

As far as I can see, there are 2 tools:
The one from vlad, which sounds excellent from the description, but is out of date and not compatible with Blender 2.8+ if I gathered that correctly:

Blender-Orbiter Mesh Tools, which work great, until you realise they only support one material per mesh, which is kind of a killer:
I mean, I could live with having to convert the materials for myself, but manually putting in proper meshgroup/material mappings is a bit much.

Have I missed any tools? I haven't found any others, in any case. So, given these two tools, or any others that might exist, how do you get complex meshes from Blender into orbiter without going crazy? Use an older blender version, or is there a trick to get your materials back without too much hassle with BMCDad?
 

GLS

Well-known member
Orbiter Contributor
Addon Developer
Joined
Mar 22, 2008
Messages
5,917
Reaction score
2,921
Points
188
Website
github.com
Shipedit.exe is very useful to correct normals after exporting. (I'm not 100% sure, but I think the issue is rotating an object while not in edit mode, which rotates the object but not the normals).
 

N_Molson

Addon Developer
Addon Developer
Donator
Joined
Mar 5, 2010
Messages
9,286
Reaction score
3,255
Points
203
Location
Toulouse
I use Blake's Orbiter Tools, which support the last Blender builds. The normal issue can be fixed by Ctrl-A -> Apply all Transforms in Blender. But Shipedit works too.

Blake's Orbiter Tools has a very useful features, sorting meshgroups by name. In Blender 1 object = 1 meshgroup in Orbiter. So you call your objects 00_fuselage ; 01_nozzle ; 02_leftwing and so on and the group will be exported in that order. Don't use older Blender versions, there have been significant interface improvements since v2.8
 
  • Like
Reactions: GLS

jedidia

shoemaker without legs
Addon Developer
Joined
Mar 19, 2008
Messages
10,877
Reaction score
2,131
Points
203
Location
between the planets
I use Blake's Orbiter Tools
From what I can gather, this seems to be the second option I mentioned above. How do you handle the issue that it only supports one material?
 

MaxBuzz

Well-known member
Joined
Sep 19, 2016
Messages
1,407
Reaction score
2,133
Points
128
Location
Kursk
if you are talking about one material, one object, then it is easy to assign many materials. in edit mode, select the necessary edges and assign your material to them
898.jpg
if you need something more complex use nodes or texturing
 
Last edited:

N_Molson

Addon Developer
Addon Developer
Donator
Joined
Mar 5, 2010
Messages
9,286
Reaction score
3,255
Points
203
Location
Toulouse
From what I can gather, this seems to be the second option I mentioned above. How do you handle the issue that it only supports one material?
Orbiter works with meshgroups, and each meshgroup can only have one material. Blake's exporter translates Blender objects into meshgroups, so if you want to split an object, select the vertices in edit mode and use the 'separate' tool. You can have a lot of meshgroups, this is no problem. Be sure to name them in a convenient way such as 00_meshgroup1, 01_meshgroup2... so that you can use the 'sort by name' function of the exporter. You'll need to know those indexes when you'll make animations in Orbiter.
 

jedidia

shoemaker without legs
Addon Developer
Joined
Mar 19, 2008
Messages
10,877
Reaction score
2,131
Points
203
Location
between the planets
Ahhh... looks like I understood the documentation wrong, then. Didn't realise that it treats object in the scene as meshgroups. I guess there will be some way in blender to select faces by material to split the object, that would be a workable solution.

EDIT: Oh, 4thRock already helpfully posted exactly such a procedure. Great, will try it out this evening!

if you are talking about one material, one object, then it is easy to assign many materials. in edit mode, select the necessary edges and assign your material to them
The problem is not so much assigning multiple materials in blender, it's about exporting objects with multiple materials. But it looks like 4thRock and M_Nolson provided a solution for that.
 

N_Molson

Addon Developer
Addon Developer
Donator
Joined
Mar 5, 2010
Messages
9,286
Reaction score
3,255
Points
203
Location
Toulouse
Also the great thing with Blake's exporter is that it exports to Orbiter the UV mapping work you can do in Blender. Sometimes you can work with a single textured material ; this is how the stock Deltaglider hull is painted. For best (realistic) results, you should use textures for stuff like paint job, scratches, rust, small details and different materials when your object is really made of different stuff (like a nozzle won't have the same material as a cockpit glass or an insulation layer because those materials have very different properties in real life). The idea is to try to imitate reality as much as you can. This is the philosophy behind PBR (Physically Based Rendering) that Jarmo's D3D9 client emulates.

Last week I had issues with metallic reflections, there was something wrong with the way I was doing them. I began looking at knives and forks when I was eating, making them reflect light in all different fashions and it helped me a lot : some knifes blades really behave like mirrors (reflectivity near 1) ; metals have an unique specular color while plastic specular color is always white-ish. So take some time to study how real-world objects behave and reflect light or not, etc... The difficulty with astronautics modeling is that we rarely have samples of real-life materials to study ; and we have to use pictures, and there we lose a lot of information.
 
Last edited:

jedidia

shoemaker without legs
Addon Developer
Joined
Mar 19, 2008
Messages
10,877
Reaction score
2,131
Points
203
Location
between the planets
Aaaah... I was looking in orbiter/utils and couldn't find anything ?‍♂️ Thanks!
 

jedidia

shoemaker without legs
Addon Developer
Joined
Mar 19, 2008
Messages
10,877
Reaction score
2,131
Points
203
Location
between the planets
Hmmmm... unfortunately, orbiter mesh tools seems to have some serious issues with complex geometries from a third-party mesh:
1614292890728.png

Any ideas what might be going wrong here? It looks like a lot of vertices were randomly jumbled all over the place...
 

MaxBuzz

Well-known member
Joined
Sep 19, 2016
Messages
1,407
Reaction score
2,133
Points
128
Location
Kursk
too many faces in one object, the mesh needs to be split into multiple objects
 

jedidia

shoemaker without legs
Addon Developer
Joined
Mar 19, 2008
Messages
10,877
Reaction score
2,131
Points
203
Location
between the planets
So... is there a guideline? Like a maximum amount of faces per object? And by split up, do you mean just split up into multiple meshgroups, or into multiple meshes?
 

jedidia

shoemaker without legs
Addon Developer
Joined
Mar 19, 2008
Messages
10,877
Reaction score
2,131
Points
203
Location
between the planets
I'm not sure I understand correctly. There can be multiple collections in one scene, but as far as I can tell they have no bearing on the exported mesh. So I assume you mean that there's a face limit per scene (i.e. exported mesh) that the exporter can handle. Well, that puts a bit of a bump into any efficient workflow...
 

4throck

Enthusiast !
Joined
Jun 19, 2008
Messages
3,502
Reaction score
1,008
Points
153
Location
Lisbon
Website
orbiterspaceport.blogspot.com
Hmmmm... unfortunately, orbiter mesh tools seems to have some serious issues with complex geometries from a third-party mesh:
I'd blame the third-party mesh. Many models look fine at first glance, but have bad topology.
Did you run the mesh cleaning tools in Blender ? Are there loose vertices ? Double vertices, perhaps very close ?
Are you able to triangulate the faces properly ?
 

MaxBuzz

Well-known member
Joined
Sep 19, 2016
Messages
1,407
Reaction score
2,133
Points
128
Location
Kursk
splitting an object automatically is very easy
select-ALL, "Tab', hotkey 'P"- by loose parts
5454.jpg54454.jpg
watch out for "TRIS" if the indicator is too high, a glitch will occur like yours
5445544.jpg
you can reduce the number of faces in an object with a modifier "Decimate"
 
Last edited:

GLS

Well-known member
Orbiter Contributor
Addon Developer
Joined
Mar 22, 2008
Messages
5,917
Reaction score
2,921
Points
188
Website
github.com
2 best friends in blender: in Edit Mode >> Mesh >> Clean up >> (1) Delete loose and (2) Remove doubles

(1) will delete any vertices that are loose, a.k.a. not used by a surface. (this should fix the issue above)
(2) merges vertices with the same coordinates. I wrote about this in another thread (maybe N_Molson's rocket thread?) and it's effects on lighting.
 
Top