Project Blender Mesh Tools add-on

Blake

Addon Developer
Addon Developer
Joined
Mar 9, 2009
Messages
233
Reaction score
120
Points
58
Location
Lehi, Utah
2.0.11 is up

- Added sort mode options that will allow you to export the mesh groups based on object name.

- When exporting selected objects, only those materials and textures will be include in the mesh file.

I've tested this on a few Blender models and it seems to be working. Let me know if you see any issues.
 

Jordan

Active member
Joined
May 13, 2010
Messages
136
Reaction score
80
Points
43
Location
Germany
So far it works well, except for the materials. The order is wrong

That's OK
MATERIALS 6
TexMaterialColor
MetalPlatte
Tail_Service_Masts
LUT_pipe_black
LUT_pipe_white
TexBodenGitter
That is wrong
MATERIAL LUT_pipe_black
0.047 0.047 0.047 1.000
0.047 0.047 0.047 1.000
0.900 0.900 0.900 0.000 0.000
0.000 0.000 0.000 1.000
MATERIAL LUT_pipe_white
0.992 0.992 0.992 1.000
0.992 0.992 0.992 1.000
0.900 0.900 0.900 0.000 0.000
0.000 0.000 0.000 1.000
MATERIAL MetalPlatte
0.800 0.800 0.800 1.000
1.000 1.000 1.000 1.000
1.000 1.000 1.000 1.000 10.000
0.000 0.000 0.000 0.000
MATERIAL Tail_Service_Masts
0.988 0.988 0.988 1.000
1.000 1.000 1.000 1.000
1.000 1.000 1.000 1.000 10.000
0.000 0.000 0.000 0.000
MATERIAL TexBodenGitter
0.800 0.800 0.800 1.000
1.000 1.000 1.000 1.000
1.000 1.000 1.000 1.000 10.000
0.000 0.000 0.000 0.000
MATERIAL TexMaterialColor
0.800 0.800 0.800 1.000
1.000 1.000 1.000 1.000
1.000 1.000 1.000 1.000 10.000
0.000 0.000 0.000 0.000
That's OK
TEXTURES 3
ProjectApollo\texcolors.dds
ProjectApollo\MetalPlatte.dds
ProjectApollo\grating.dds
 

Blake

Addon Developer
Addon Developer
Joined
Mar 9, 2009
Messages
233
Reaction score
120
Points
58
Location
Lehi, Utah
Opps, didn't even notice that. I was using the wrong list.

2.0.12 is up and should fix that.
 

GLS

Well-known member
Orbiter Contributor
Addon Developer
Joined
Mar 22, 2008
Messages
5,915
Reaction score
2,919
Points
188
Website
github.com
What causes me problems is that your exporter and Vlad's exporter also generate more vertices than Blender shows me.

That will happen if you have a vertex used by 2 triangles, and each has a different part of the texture mapped to them... yes, the vertices are the ones with the UV coordinates, but blender doesn't seem to separate them, or it handles UV mapping in a different way internally. Anyway, for the .msh format it is basically "lying by omission". :shrug:
 

Blake

Addon Developer
Addon Developer
Joined
Mar 9, 2009
Messages
233
Reaction score
120
Points
58
Location
Lehi, Utah
A very useful video on low-poly modelling in Blender 2.8 I found and thought I would share.

 

llarian

Well-known member
Joined
Apr 1, 2009
Messages
578
Reaction score
159
Points
58
Location
Ottawa
No complaints from me. All aspects that I have used are working well. This has been a great effort, Blake.

Thankyou.
 

Felix24

Active member
Joined
May 13, 2010
Messages
245
Reaction score
95
Points
43
Hi, I have a couple of problems. I'm currently using the most recent version of the mesh importer plugin from GitHub yesterday (May 25).

1. Let me know if this is just a problem I'm having with my setup, or if someone else can reproduce this. Maybe this is a Blender 2.8 issue and not with the mesh import plugin? This is not limited to the Atlantis tank mesh, and the problem appears on practically every Orbiter mesh that I can import.

I'm trying to use Texture Painter on a model I imported into Blender. I've imported the Atlantis_tank.msh. I'm having some weird trouble with it- see here:

Screen-Shot-2020-05-24-at-10.08.54-PM.jpg


Whenever I try to paint in the view on the right, the paint appears on the model blocky and broken. Even though it is incorrect on the model, I can see all of paint correctly on the texture on the left.

When I paint directly on the texture on the left, the model on the right does not update at all.

And when I switch to a different tab at the top, say Shading, and then switch back to Texture Paint, the model on the right resets with no paint visible, but the texture view on the left still shows all of the paint I just added.

None of these problems occur with models not imported from an Orbiter mesh. Any ideas?

2. I am unable to import certain default meshes at all. Here is the error message I get:

Code:
Traceback (most recent call last):
  File "/Users/colin/Library/Application Support/Blender/2.82/scripts/addons/orbiter-blender-master/__init__.py", line 183, in execute
    import_tools.import_mesh(config, path)
  File "/Users/colin/Library/Application Support/Blender/2.82/scripts/addons/orbiter-blender-master/import_tools.py", line 424, in import_mesh
    textures)
  File "/Users/colin/Library/Application Support/Blender/2.82/scripts/addons/orbiter-blender-master/import_tools.py", line 369, in build_mat_textures
    texImage.image = bpy.data.images.load(src_tex_file)
RuntimeError: Error: Cannot read '': No such file or directory


location: <unknown location>:-1

Here are the meshes that give me this error message. As best as I can do, it's an exhaustive list of the default meshes that throw that particular error. I'm not actually interested in playing with all of them, just mainly Atlantis and the DG.

Dragonfly.msh
KLC39B.msh
KLC39Bground.msh
Luna-OB1.msh
Surf1.msh
Atlantis/Atlantis.msh
Atlantis/AtlantisCockpit.msh
DG/deltaglider.msh
DG/deltaglider_ns.msh
DG/deltaglider_vc.msh
DG/dg_2dpanel0.msh
DG/dg_2dpanel1.msh
ShuttleA/ShuttleA_2dpanel1.msh
ShuttleA/ShuttleA_chmain.msh
ShuttleA/ShuttleA_chpr.msh
ShuttleA/ShuttleA_vc.msh


Thanks for your help! I love the simplicity of this addon, and it works really well for almost everything.
 

Jordan

Active member
Joined
May 13, 2010
Messages
136
Reaction score
80
Points
43
Location
Germany
I tested it. So for No. 1 I had the same problem. As a solution I found that if I save the texture as PNG and use it in Blender instead of the original texture, then it works with the painting without any problems.

Unfortunately I can't say anything about No. 2, because the meshes are imported correctly.
 

Blake

Addon Developer
Addon Developer
Joined
Mar 9, 2009
Messages
233
Reaction score
120
Points
58
Location
Lehi, Utah
I'll take a look at #1 when a get a minute, I cannot think off-hand what would cause that.

As for #2, what is the name of your Orbiter folder? There have been issues when it is named something else (like Orbiter2016) etc. I thought those were fixed, but I may have missed something. Try importing from an 'Orbiter' folder and see if that helps.
 

Jordan

Active member
Joined
May 13, 2010
Messages
136
Reaction score
80
Points
43
Location
Germany
I'll take a look at #1 when a get a minute, I cannot think off-hand what would cause that.


I think the problem has nothing to do with Blender Mesh Tools. It's more a issue due to .dds Textures.


To test it start Blender, load any .dds texture and try TexturePaint.
Then try it with a .png, .jpg or other texture.
 

llarian

Well-known member
Joined
Apr 1, 2009
Messages
578
Reaction score
159
Points
58
Location
Ottawa
I concur with Felix24. Unless the mesh is in my Orbiter folder named "Orbiter" it will not import. I do note that even in my "Orbiter" folder, the files in Meshes/DG will not import. That is the extent of my testing to this point.

Note, when I tested with the two panel meshes in the list, it seemed that the mesh did not import. However when I went to the Collections Panel and selected the various bits and pieces, that part of the imported mesh did appear.

Still working on it.
 
Last edited:

Felix24

Active member
Joined
May 13, 2010
Messages
245
Reaction score
95
Points
43
Thanks for the tips. I followed the recommendation of switching to a PNG texture instead of DDS, and it works now.

I also know for a fact that my Orbiter installation folder is not called "Orbiter", so that's what I'm going to test this evening.

Thanks for the help!
 

Donamy

Addon Developer
Addon Developer
Donator
Beta Tester
Joined
Oct 16, 2007
Messages
6,907
Reaction score
205
Points
138
Location
Cape
Did you try welding the vertices. I don't know about Blender, but when I import a mesh into AC3D, all the vertices are unwelded. Don't know if it makes a difference in this case, just throwing it out there.
 

Felix24

Active member
Joined
May 13, 2010
Messages
245
Reaction score
95
Points
43
I changed the name of the Orbiter installation folder to "Orbiter", but I am still unable to import the meshes I listed earlier.

Here is the error message:

Code:
Traceback (most recent call last):
  File "/Users/colin/Library/Application Support/Blender/2.83/scripts/addons/orbiter-blender-master/__init__.py", line 201, in execute
    import_tools.import_mesh(config, path)
  File "/Users/colin/Library/Application Support/Blender/2.83/scripts/addons/orbiter-blender-master/import_tools.py", line 440, in import_mesh
    textures)
  File "/Users/colin/Library/Application Support/Blender/2.83/scripts/addons/orbiter-blender-master/import_tools.py", line 385, in build_mat_textures
    texImage.image = bpy.data.images.load(src_tex_file)
RuntimeError: Error: Cannot read '': No such file or directory


location: <unknown location>:-1

Any more ideas? Thanks!
 

Jordan

Active member
Joined
May 13, 2010
Messages
136
Reaction score
80
Points
43
Location
Germany
Code:
Traceback (most recent call last):
  File "/Users/colin/Library/Application Support/Blender/2.83/scripts/addons/orbiter-blender-master/__init__.py", line 201, in execute
    import_tools.import_mesh(config, path)


Looks like you're using a Mac. As a test, I renamed the texture folder under Windows and I get exactly the same error.
So it looks like the textures folder cannot be found on Mac.
 
Last edited:

jangofett287

Heat shield 'tester'
Joined
Oct 14, 2010
Messages
1,150
Reaction score
13
Points
53
The path separator on Windows is "".
The path separator on Mac/Linux is "/".
I smell a likely bug here...

---------- Post added at 03:05 ---------- Previous post was at 02:57 ----------

I take that back.
this should work just fine. Looks like there's lots of logging in these scripts. Would be helpful if you hit Window->Toggle System Console, ran the import and then scrolled up a bit looking for a line like "WARN: Texture file not found:"
 

Jordan

Active member
Joined
May 13, 2010
Messages
136
Reaction score
80
Points
43
Location
Germany
Any more ideas? Thanks!

I may have a workaround for you.


I don't have a Mac, but I tested it on Linux because, as far as I know, both are based on Unix.

Do the following test.

Name your orbiter folder in lower case. e.g. "orbiter" not "Orbiter"

Open for example Atlantis.msh in a text editor.
Go to the end of the file, it says

TEXTURES 2
Atlantis\cargobay.dds
Atlantis\MGAtlantis.dds

change it like this and save it, make a copy before.

TEXTURES 2
Atlantis/cargobay.dds
Atlantis/MGAtlantis.dds

that's how it worked for me under linux.
 

harmonicgf2

New member
Joined
Jun 12, 2020
Messages
7
Reaction score
4
Points
3
Hey, newbie here and I'm having issues with lighting.
Steps to reproduce:
Create a cylinder in blender, triangulate it.
Convert to mesh using this plugin, create a scenario with it.
Launch the cylinder ""rocket"" and start rolling the rocket.
Expected - The side of the rocket facing the sun "shines".
What happens - As I roll the rocket, some faces do shine when facing sun. As I roll even more however, the new faces facing the sun don't shine.
So I reimported the mesh back to blender using the plugin and even in Blender the lighting looks awkward. I go to edit mode and the faces all seem disconnected.
What am I doing wrong :/
 
Top