Project Blender Mesh Tools add-on

harmonicgf2

New member
Joined
Jun 12, 2020
Messages
7
Reaction score
4
Points
3
I exported a single cylinder to Orbiter and the lighting is all awkward. When I reimported to Blender the geometry was kinda messed up in "edit mode" and lighting was awkward in Blender too. Anyone knows whats hapenning?
 

Blake

Addon Developer
Addon Developer
Joined
Mar 9, 2009
Messages
189
Reaction score
61
Points
43
Is there support for bump maps in this addon? (D3D9)

As I understand it, D3D9 client looks for specific named texture files for bump, normal mapping etc. I suspect, though I have not tried it, that you could create the appropriate textures and reference them in Blender. I don't think the resulting mesh file is involved with these additional textures, so I don't know that there is much for the export tools to actually do.
 

Blake

Addon Developer
Addon Developer
Joined
Mar 9, 2009
Messages
189
Reaction score
61
Points
43
citroen.PNG


All I did here was to put your .dds texture files into the \Orbiter\Textures\ folder of an Orbiter installation. I'd recommend creating a bare-bones Orbiter installation to work with. Put your files into that folder structure, your .dds files into \Orbiter\Textures. In the 'Output' pane in Blender, set the Mesh Path to the Meshes folder. So if your development install of Orbiter is 'D:\Orbiter', your 'Mesh Path' would be set to D:\Orbiter\Meshes\. You would drop your textures into D:\Orbiter\Textures\.

Your UV maps all look ok. Once I put your textures into the \Orbiter\Textures\ folder, I recreated your materials and told Blender to find them in the \Orbiter\Textures\ folder. Then build.

Documentation

Above is the PDF documentation, read the section on 'Texturing' for a refresher (I have to do that myself).

Good luck.
 

Jordan

Member
Joined
May 13, 2010
Messages
91
Reaction score
21
Points
23
Location
Germany
Your UV maps all look ok. Once I put your textures into the \Orbiter\Textures\ folder, I recreated your materials and told Blender to find them in the \Orbiter\Textures\ folder.
But when I load the textures from the subfolder into blender, they are not entered correctly in the .mesh file.

This is how they are entered in the mesh file

TEXTURES 3
Ventilation.dds
GreenPaint.dds
Headlights.dds


And so it should be

TEXTURES 3
Citroen3CV\Ventilation.dds
Citroen3CV\GreenPaint.dds
Citroen3CV\Headlights.dds
 

Blake

Addon Developer
Addon Developer
Joined
Mar 9, 2009
Messages
189
Reaction score
61
Points
43
...


And so it should be

TEXTURES 3
Citroen3CV\Ventilation.dds
Citroen3CV\GreenPaint.dds
Citroen3CV\Headlights.dds
What is the full path to your 'Textures' folder? It should be picking up that sub folder (it is for me), or you may have an old plugin. A previous version was not getting that subfolder correctly.
 

Jordan

Member
Joined
May 13, 2010
Messages
91
Reaction score
21
Points
23
Location
Germany
What is the full path to your 'Textures' folder?
I use the current plugin. v2.0.12

That was a test with my laptop. I don't have an Orbiter installation there. I used the following path. "F: \ Citroen3CV \ Orbiter \ Textures \ Citroen3CV". In this "fake" orbiter path there is also the output folder "Meshes"

I did a new test in my PC where my Orbiter installation is located, this is also the folder where I use my own meshes, with which I have no problems. In this folder the textures with sub-folders are correctly entered in the mesh.

But the main problem is with Matias Citroen3CV.blend file. Why do the materials with textures have to be deleted and recreated? Simply re-selecting the textures from the "Orbiter / Textures / Citroen3CV" folder without deleting the materials did not work.

It could be a problem that Matias IMO doesn't use Windows. Its output directory is "/ home / matias / Escritorio / Citroen3CV /" and this is not a Windows folder path.
 

Blake

Addon Developer
Addon Developer
Joined
Mar 9, 2009
Messages
189
Reaction score
61
Points
43
Technically, you probably don't need to delete the materials. I did so just to make sure I knew what I was dealing with in regards to the materials.

I have only tested the plugin with Windows, the Python file API calls may behave differently on Mac or Linux.
 

Matias Saibene

Well-known member
Joined
Jul 7, 2012
Messages
798
Reaction score
299
Points
63
Location
Monte Hermoso - Argentina
Website
de-todo-un-poco-computacion-e-ideas.blogspot.com.ar
I use the current plugin. v2.0.12

That was a test with my laptop. I don't have an Orbiter installation there. I used the following path. "F: \ Citroen3CV \ Orbiter \ Textures \ Citroen3CV". In this "fake" orbiter path there is also the output folder "Meshes"

I did a new test in my PC where my Orbiter installation is located, this is also the folder where I use my own meshes, with which I have no problems. In this folder the textures with sub-folders are correctly entered in the mesh.

But the main problem is with Matias Citroen3CV.blend file. Why do the materials with textures have to be deleted and recreated? Simply re-selecting the textures from the "Orbiter / Textures / Citroen3CV" folder without deleting the materials did not work.

It could be a problem that Matias IMO doesn't use Windows. Its output directory is "/ home / matias / Escritorio / Citroen3CV /" and this is not a Windows folder path.
Here is my screefetch output with some useless usefull info:

Bash:
[email protected]
OS: Manjaro 20.2 Nibia
Kernel: x86_64 Linux 5.9.1-1-rt19-MANJARO
Uptime: 8h 44m
Packages: 1388
Shell: bash
Resolution: 1366x768
WM: Not Found (but I can use kwin_x11 openbox and TWM)
GTK Theme: Breeze [GTK2/3]
Icon Theme: Breeze_RC
Font: Noto Sans,  10
Disk: 31G / 200G (17%)
CPU: Intel Core i3-2330M @ 4x 2.2GHz [51.0°C]
GPU: Mesa DRI Intel(R) HD Graphics 3000 (SNB GT2)
RAM: 2198MiB / 3781MiB

I have used Blender on Windows and Linux before and never had problems, as well as I have also used Blender Mesh Tools for a UCGO cargo (a decoration add-on) and it exported it without problems.
-------------------------------------------------- ------------------------------------
Summary: I am not being able to export a mesh with more than one UV map.

  • I tried the mesh that gattispilot fixed for me (exported with Anim8or) and it worked for him but not for me.
  • I also tried the mesh that Blake helped me export and it gave me the exact same error, even though it worked perfect for Blake.

It is very strange (at least for me), but anyway I have no money for another computer or to buy Windows 10. I am sorry to have bothered you with this "search for errors", which are undoubtedly mine although I do not know what it is (perhaps a mental bug of mine).
My original plan was to make a mesh, then a car for GeneralVehicle, and then model the XB-70 Valkyrie to make it work with VesselBuilder, etc. Nothing abnormal.
I never thought of making so much noise on the forum. But anyway I appreciate the help you have given me. Still, as soon as my health improves (I have some problems), I'm going to start everything from scratch (I promise not to disturb), and I'm going to make that car and others because I love Orbiter and I want my astronauts to travel to their spaceplane in a vintage car.
Thank you all for your interest, sooner or later and by checking each fiber of my computer I will carry out my "project".

By the way I had thought to start my add-ons with a new mesh for the Luna3 Probe, The Probe, but it would have ended in blasphemy. So maybe The Probe doesn't allow me to export meshes. :confused:
 

Jordan

Member
Joined
May 13, 2010
Messages
91
Reaction score
21
Points
23
Location
Germany
@Blake
I did a new test on my laptop with the "Fake" Orbiter folder. If the Orbiter folder is in the root directory, the textures are entered correctly in the mesh file, i.e. including sub-folders. At another location e.g. "C: \Test\Orbiter" only the texture names are entered without the sub-folders. It would be helpful if the Orbiter folder didn't have to be in the hard drive's root path. To do this, you would have to edit your add-on again.

@Matias Saibene
I'm assuming that you got Orbiter working on Linux.

I saw gattispilot mesh. It's not correct either. You use a subfolder "Citroen3CV" in the Orbiter Textures folder. This means that the mesh must end up as follows

TEXTURES 3
Citroen3CV\GreenPaint.dds
Citroen3CV\Headlights.dds
Citroen3CV\Ventilation.dds

but it says
TEXTURES 3
GreenPaint.dds
Headlights.dds
Ventilation.dds

you can copy the textures in the Orbiter\Textures folder there they should be found. But you should use a subfolder for your mesh because sooner or later there will be a chaos of textures in the main Orbiter Textures folder.

The problem with you should be that the folder structure under Linux is different than under Windows. e.g. When exporting mesh, the Orbiter folder must be in the main directory of the hard drive, as I wrote above for my new test.

In addition, there is another problem between Windows and Linux that in Linux e.g. "orbiter" and "Orbiter" or "oRbiTeR" are different folders while in Windows they are all the same. And the directory separators are also different. In Windows "\" and in Linux "/"

You could test the Windows version of Blender with Wine and export your mesh from there directly to your "C:\Orbiter\Meshes" folder. Your Orbiter folder must be in the C: \ main directory. Then copy your textures in your Wine "Windows" "C:\Orbiter\Textures\Citroen3CV" folder.

So take the following steps.

1. Start the Windows version of Blender, install Blake's Blender Mesh Tools there.

2. Load your Citroen3CV.blend file, delete your materials with the 3 textures and create them again. Then load your textures into these materials from your C:\Orbiter\Textures\Citroen3CV folder.

3. Choose output path C:\Orbiter\Meshes and build your mesh.

I hope that works
 

Blake

Addon Developer
Addon Developer
Joined
Mar 9, 2009
Messages
189
Reaction score
61
Points
43
I did a new test on my laptop with the "Fake" Orbiter folder. If the Orbiter folder is in the root directory, the textures are entered correctly in the mesh file, i.e. including sub-folders. At another location e.g. "C: \Test\Orbiter" only the texture names are entered without the sub-folders. It would be helpful if the Orbiter folder didn't have to be in the hard drive's root path. To do this, you would have to edit your add-on again.

Thanks for clarifying, I have a little time over the holidays so I'll see if that is something that can be easily fixed.
 
Joined
Oct 1, 2013
Messages
112
Reaction score
5
Points
18
Ooh this is a facinating plug in! I'll definitely have uses for it when I dig my head into modding.
 

Matias Saibene

Well-known member
Joined
Jul 7, 2012
Messages
798
Reaction score
299
Points
63
Location
Monte Hermoso - Argentina
Website
de-todo-un-poco-computacion-e-ideas.blogspot.com.ar
@Blake
I did a new test on my laptop with the "Fake" Orbiter folder. If the Orbiter folder is in the root directory, the textures are entered correctly in the mesh file, i.e. including sub-folders. At another location e.g. "C: \Test\Orbiter" only the texture names are entered without the sub-folders. It would be helpful if the Orbiter folder didn't have to be in the hard drive's root path. To do this, you would have to edit your add-on again.

@Matias Saibene
I'm assuming that you got Orbiter working on Linux.

I saw gattispilot mesh. It's not correct either. You use a subfolder "Citroen3CV" in the Orbiter Textures folder. This means that the mesh must end up as follows

TEXTURES 3
Citroen3CV\GreenPaint.dds
Citroen3CV\Headlights.dds
Citroen3CV\Ventilation.dds

but it says
TEXTURES 3
GreenPaint.dds
Headlights.dds
Ventilation.dds

you can copy the textures in the Orbiter\Textures folder there they should be found. But you should use a subfolder for your mesh because sooner or later there will be a chaos of textures in the main Orbiter Textures folder.

The problem with you should be that the folder structure under Linux is different than under Windows. e.g. When exporting mesh, the Orbiter folder must be in the main directory of the hard drive, as I wrote above for my new test.

In addition, there is another problem between Windows and Linux that in Linux e.g. "orbiter" and "Orbiter" or "oRbiTeR" are different folders while in Windows they are all the same. And the directory separators are also different. In Windows "\" and in Linux "/"

You could test the Windows version of Blender with Wine and export your mesh from there directly to your "C:\Orbiter\Meshes" folder. Your Orbiter folder must be in the C: \ main directory. Then copy your textures in your Wine "Windows" "C:\Orbiter\Textures\Citroen3CV" folder.

So take the following steps.

1. Start the Windows version of Blender, install Blake's Blender Mesh Tools there.

2. Load your Citroen3CV.blend file, delete your materials with the 3 textures and create them again. Then load your textures into these materials from your C:\Orbiter\Textures\Citroen3CV folder.

3. Choose output path C:\Orbiter\Meshes and build your mesh.

I hope that works
Thank you for your ideas, some of which, as I already mentioned, I have already tried.
I'm going to start a clean install of Orbiter2016 on Windows (again) and I'm going to try again. I have already written the list of textures manually, trying both within a subfolder (ie %ORBITER_ROOT%\Textures\Citroen3CV) and also within %ORBITER_ROOT%\Textures without any success. And by the way as I already mentioned in Windows 7 Blender suddenly is no longer compatible with my graphics card and I have to find and use MesaforWindows. A build of opengl32.dll. I have no idea when things changed so much.:confused:
 

MaxBuzz

Well-known member
Joined
Sep 19, 2016
Messages
982
Reaction score
1,422
Points
108
Location
Kursk
Thank you for your ideas, some of which, as I already mentioned, I have already tried.
I'm going to start a clean install of Orbiter2016 on Windows (again) and I'm going to try again. I have already written the list of textures manually, trying both within a subfolder (ie %ORBITER_ROOT%\Textures\Citroen3CV) and also within %ORBITER_ROOT%\Textures without any success. And by the way as I already mentioned in Windows 7 Blender
the path should look something like this Citroen3CV\Citroen3CV.dds
without \Textures\ Do not forget .dds
 

Jordan

Member
Joined
May 13, 2010
Messages
91
Reaction score
21
Points
23
Location
Germany
I'm going to start a clean install of Orbiter2016 on Windows (again) and I'm going to try again.
You don't need Windows. I installed OrbiterSVN Beta on Linux Mint (clean without anything, just D3D9 client). With the Linux version of Blender I loaded your Citroen3CV.blend file, deleted and recreated the 3 materials that contain the textures. Then I build the Citroen3CV.msh file and I loaded it in Geany Editor and changed the last 3 lines.

they were like that before

TEXTURES 3
GreenPaint.dds
Headlights.dds
Ventilation.dds

after editing

TEXTURES 3
Citroen3CV\GreenPaint.dds
Citroen3CV\Headlights.dds
Citroen3CV\Ventilation.dds

and I copied the file in the Linux Orbiter Meshes folder.
Usually it is
/home/user/.wine/drive_c/orbiter/meshes/

and I have copied your textures in
/home/user/.wine/drive_c/orbiter/textures/Citroen3CV

Upper and lower case can vary. The order of the textures can also vary, you have to keep your order of the textures in the mesh file.

Try it. It worked for me.
 

N_Molson

Addon Developer
Addon Developer
Donator
Joined
Mar 5, 2010
Messages
8,866
Reaction score
2,612
Points
203
Location
Toulouse
Hello,

It seems that using "Mirror" modifier and applying it in Blender cause normals to be mirrored too in Orbiter. Thing is, I see no way to fix this in Blender (the mirrored objects look perfectly fine in Blender, even using "view normals" the blue lines point where they should). Any idea ? Other that not using the mirror modifier (which would be rather inconvenient...) ?

Edit : seems related to a very old Blender issue that the devs are "aware of but don't want to fix because they would have to rewrite the whole thing". My God.
 
Last edited:

Donamy

Addon Developer
Addon Developer
Donator
Beta Tester
Joined
Oct 16, 2007
Messages
6,840
Reaction score
93
Points
123
Location
Cape
Can you change to single faces in Blender ?
 

Blake

Addon Developer
Addon Developer
Joined
Mar 9, 2009
Messages
189
Reaction score
61
Points
43
Hello,

It seems that using "Mirror" modifier and applying it in Blender cause normals to be mirrored too in Orbiter. Thing is, I see no way to fix this in Blender (the mirrored objects look perfectly fine in Blender, even using "view normals" the blue lines point where they should). Any idea ? Other that not using the mirror modifier (which would be rather inconvenient...) ?

Edit : seems related to a very old Blender issue that the devs are "aware of but don't want to fix because they would have to rewrite the whole thing". My God.

Can you give an example? I have used the mirror modifier a lot, so I'm not sure the problem you are seeing.
 

N_Molson

Addon Developer
Addon Developer
Donator
Joined
Mar 5, 2010
Messages
8,866
Reaction score
2,612
Points
203
Location
Toulouse
Thanks for the quick reply,

So here is the mesh in Blender and in Orbiter. All parts mirrored from left to right have their normals sort of corrupted. I tried "recalculate", "flip", nothing changes. As you can see, on the nozzle extension part, the normals looks fine in Blender.

Note : this is a WIP mesh, there are some others issues I'm aware of and fixed in later versions. Should not be used as it is for other projects.

Seems related to this :


The mirror tool in Edit mode is similar to Mirroring in Object mode. It is exactly equivalent to scaling by -1 vertices, edges or faces around one chosen pivot point and in the direction of one chosen axis, only it is faster/handier.

Seems the normals get mirrored in the process (multiplied by -1), which corrupts them completely. Or am I missing something ?



 

Attachments

  • Energia5V_KVRB_14.zip
    819.6 KB · Views: 3
Top