Project Blender Mesh Tools add-on

Blake

Addon Developer
Addon Developer
Joined
Mar 9, 2009
Messages
225
Reaction score
104
Points
58
Location
Lehi, Utah
Update: 2.1.1 - 8/8/2023

Orbiter Mesh Tools for Blender
===

This plug-in has been updated for Blender 2.81. It is available from Github at the link above.

What's new:
- Tested with Blender 2.82, no issues found.

latest...
2.1.2
  • Add option to exclude from export objects marked to be hidden in renders.
  • Fix logging object name issue.
2.1.1
  • Fix issue transforming normals.
  • Fix issue with MAC temp folder
  • Add support for 2D panel meshes.




I hope you find it useful.

* The github repository has been updated so that the zip file from the download (the Clone or download button) can be installed directly from Blender.
 
Last edited:

GZR_Ranger

New member
Joined
Feb 15, 2013
Messages
11
Reaction score
0
Points
0
Wow, Blake. This looks very helpful, and I really like the help and walkthru files...

I built several aircraft for MS Combat Flight Simulator WAY back (like in the '90s, still!). Anyway, I've been meaning to get back into 3d modelling for a while, and I d/l Blender earlier in the week, so your tool is perfect timing.

I'm sure I'll be here on the forum asking lots of questions soon. Thanks!

Hugh
 

Blake

Addon Developer
Addon Developer
Joined
Mar 9, 2009
Messages
225
Reaction score
104
Points
58
Location
Lehi, Utah
Update:

I had to make some changes to the properties stored in the .blend file. As a result if you have a .blend file saved with 1.0.3 you will need to re-enter those properties if you pull it up in the latest version. I have updated the OP.
 

llarian

Well-known member
Joined
Apr 1, 2009
Messages
575
Reaction score
159
Points
58
Location
Ottawa
Wow, Blake. This looks very helpful, and I really like the help and walkthru files...

I built several aircraft for MS Combat Flight Simulator WAY back (like in the '90s, still!). Anyway, I've been meaning to get back into 3d modelling for a while, and I d/l Blender earlier in the week, so your tool is perfect timing.

I'm sure I'll be here on the forum asking lots of questions soon. Thanks!

Hugh

Take your time. Study as many tutorials as you can. And remember that Blender has a steep learning curve. Really get familiar with the interface, first. Also remember that Blender is natively right-handed while Orbiter is left-handed. Swap the y and z axes.

Have fun.
 

Blake

Addon Developer
Addon Developer
Joined
Mar 9, 2009
Messages
225
Reaction score
104
Points
58
Location
Lehi, Utah
Hmm. It's a python script that should work with either version. Unless it does not like one of the python libraries.

Are you getting an error? I should have some time this weekend to load Blender 64bit and give it a try.
 

NukeET

Gen 1:1
Addon Developer
Donator
Joined
Oct 16, 2007
Messages
1,035
Reaction score
93
Points
63
Location
UT_SLC
Website
sites.google.com
Hmm. It's a python script that should work with either version. Unless it does not like one of the python libraries.

Are you getting an error? I should have some time this weekend to load Blender 64bit and give it a try.

No error. Just not showing up at all as an export choice.
 

Blake

Addon Developer
Addon Developer
Joined
Mar 9, 2009
Messages
225
Reaction score
104
Points
58
Location
Lehi, Utah
Under 'Render' properties is a 'Orbiter Render Panel' that has a Build Mesh button. That builds the mesh and source files. It does not show up in the File\Export menu.

I understand the confusion since this is in the 'Export/Import' addon section. Adding an export option that builds the mesh file with the current properties should be easy to do.

I did it this way because in my work flow I'm building the mesh and source a lot in order to check things, so having the build option and its properties out and visible on the Render panel makes that easy. In my mind, I'm 'rendering' my mesh and source files for use.

I did pull down Blender 64 to confirm it does work in that version.
 

NukeET

Gen 1:1
Addon Developer
Donator
Joined
Oct 16, 2007
Messages
1,035
Reaction score
93
Points
63
Location
UT_SLC
Website
sites.google.com
I can get to the Orbiter Render Panel. I selected a save path for the mesh and turned on verbose.

All I get out of Blender is the BlenderTools log text document.

I'm missing another setting is my guess.



EDIT: After playing with the settings, now I'm getting mesh files out of Blender. But, It is exporting the entire scene, so the mesh I want is contained within a huge grey box.
 
Last edited:

Blake

Addon Developer
Addon Developer
Joined
Mar 9, 2009
Messages
225
Reaction score
104
Points
58
Location
Lehi, Utah
It treats each scene as a separate Orbiter mesh file. So, for example, your ship would be in one scene, and the VC in another.

You should be able to select the objects you want to output and move (or link) them to a new scene. Then in the new scene, in the 'Scene' properties select 'Output Mesh File'. Deselect that property for the other scenes you don't want to output.

The mesh file will be named whatever name you give the scene in Blender.

There is a 'Simple Walkthrough.pdf' in the Resources folder that may be of help in understanding how this works, although it does not go into great detail.

Edit: I probably don't understand. What is the huge gray box?
 

NukeET

Gen 1:1
Addon Developer
Donator
Joined
Oct 16, 2007
Messages
1,035
Reaction score
93
Points
63
Location
UT_SLC
Website
sites.google.com
I probably don't understand. What is the huge gray box?


i'm guessing it is the ENTIRE scene. It is what gets translated into a *.msh file - which I then set up in a base config file in order to see it within Orbiter. I can move into it and see the mesh I want.

P.S. According to the flag icons in our avatars, we both live in Utah.

EDIT: Blake - disregard everything above the postscript. Operator error on my part. I'm not a big fan of steep learning curves, BTW. Not your mesh tool - Blender itself.

Thank you for the help. If you don't object, perhaps just a PM in case I have further questions?
 
Last edited:

Blake

Addon Developer
Addon Developer
Joined
Mar 9, 2009
Messages
225
Reaction score
104
Points
58
Location
Lehi, Utah
A PM is fine unless you think the information may be useful to others.

You may be the first to kick the tires of this thing other than myself, so any suggestions are always welcome.
 

Blake

Addon Developer
Addon Developer
Joined
Mar 9, 2009
Messages
225
Reaction score
104
Points
58
Location
Lehi, Utah
So what does this do/or dont that vlads blender tool dont? http://www.orbiter-forum.com/showthread.php?t=18661

Primarily it builds a source file for use in C++. It also adds some UI panels to the Blender properties view. It does not support importing, which Vlad's tool does.

With the source file you then have the opportunity to use things like 'empties' to mark locations, such as:
Code:
const VECTOR3 NavLightTailLocation = {0.000, 0.436, -12.741};
or output NTVERTEX arrays (handy for modifying VC geometry):
Code:
        const NTVERTEX APAttLightVerts[4] = 
        {
            {-0.0677f, 0.7164f, 15.2771f, 0.0000f, 0.0000f, -1.0000f, 0.1994f, 0.3926f},
            {-0.0500f, 0.7164f, 15.2771f, 0.0000f, 0.0000f, -1.0000f, 0.2334f, 0.3926f},
            {-0.0677f, 0.7108f, 15.2771f, 0.0000f, 0.0000f, -1.0000f, 0.1994f, 0.4032f},
            {-0.0500f, 0.7108f, 15.2771f, 0.0000f, 0.0000f, -1.0000f, 0.2334f, 0.4032f},
        };



So, I would say Vlad's tool is more of a traditional Blender export tool, which many people use and are comfortable with.

This tool supports a different workflow, and has some addition UI panels and tools designed for the creation of source code.
 

Blake

Addon Developer
Addon Developer
Joined
Mar 9, 2009
Messages
225
Reaction score
104
Points
58
Location
Lehi, Utah
Github repository updated so that the github download zip file can be installed directly from Blender. No unzipping, copying.
 

Jordan

Active member
Joined
May 13, 2010
Messages
136
Reaction score
80
Points
43
Location
Germany
I cannot import any mesh.

Import Orbiter Mesh started.
Traceback (most recent call last):
File "D:\Download\GFX\3D\BlenderStuff\blender-2.81a-windows64\2.81\scripts\addons\io_orbiter_tools\__init__.py", line 175, in execute
import_tools.import_mesh(config, path)
File "D:\Download\GFX\3D\BlenderStuff\blender-2.81a-windows64\2.81\scripts\addons\io_orbiter_tools\import_tools.py", line 376, in import_mesh
orbiter_path = os.path.join(*up[0:up.index('orbiter') + 1])
ValueError: 'orbiter' is not in list

location: <unknown location>:-1
 

Blake

Addon Developer
Addon Developer
Joined
Mar 9, 2009
Messages
225
Reaction score
104
Points
58
Location
Lehi, Utah
I cannot import any mesh.

The import assumes you are importing from the 'meshes' folder (or sub folder) of a standard Orbiter installation. It does this so that it can hunt down any referenced texture files.

So you are likely not importing from the meshes folder, or you have renamed your Orbiter folder to something else.

An option I have considered is to have you specify an Orbiter folder when you import, but it seemed that most of the time you would be importing a mesh from an existing Orbiter install.
 

Jordan

Active member
Joined
May 13, 2010
Messages
136
Reaction score
80
Points
43
Location
Germany
So you are likely not importing from the meshes folder, or you have renamed your Orbiter folder to something else.


That was it. I have several orbiter installations and one of them is called Orbitertest. There are the meshes to work on.
 

Blake

Addon Developer
Addon Developer
Joined
Mar 9, 2009
Messages
225
Reaction score
104
Points
58
Location
Lehi, Utah
2.0.3 -- Split normals support.

In short, what you see in Blender will be closer to what you see in Orbiter, with regard to modeling. Split normals are also independently editable. This has been asked for by 'low-poly' game designers (us) for some time, as it allows the use of some techniques that give better shading results without added a lot of new geometry.

- Blender's object 'shade smooth', and 'shade flat' options will carry to the Orbiter mesh file.
- Blender's Auto Smooth option is now supported. [Properties, Object Data, Normals, Auto Smooth] This is similar to 'split edge' modifier, but is cleaner and easier to work with.
- Blender's Alt-N (Normals) edit menu can be used to edit the normal independent of the vertex normals. This opens up some possibilities for low-poly modeling.

The split edge modifier should still work, but the preferred method appears to be Auto Smooth.
 
Top