Project Blender Mesh Tools add-on

GLS

Well-known member
Orbiter Contributor
Addon Developer
Joined
Mar 22, 2008
Messages
5,878
Reaction score
2,870
Points
188
Website
github.com
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.
In my experience, if you use Mirror, you need to then hit the Flip Normals button (do it immediately after the Mirror as the relevant parts are still selected).
 

N_Molson

Addon Developer
Addon Developer
Donator
Joined
Mar 5, 2010
Messages
9,272
Reaction score
3,244
Points
203
Location
Toulouse
The trick is that I tried that... I can flip the normals of the mirrored parts as much as I want in Blender, it changes nothing once exported in Orbiter... ?
 

GLS

Well-known member
Orbiter Contributor
Addon Developer
Joined
Mar 22, 2008
Messages
5,878
Reaction score
2,870
Points
188
Website
github.com
The trick is that I tried that... I can flip the normals of the mirrored parts as much as I want in Blender, it changes nothing once exported in Orbiter... ?
I'm still using blender 2.79 and Vlad's plugin and no issues... have you tried to save/close/open the project before exporting to .msh?
 

N_Molson

Addon Developer
Addon Developer
Donator
Joined
Mar 5, 2010
Messages
9,272
Reaction score
3,244
Points
203
Location
Toulouse
Well we're in the Blake's Orbiter Tools topic... So I use Blake tools... So it might be a bug ?

Weird thing is that its not the "invisible faces" issues, which are usually the consequence of wrong normals. No, the faces display correctly, but the lighting is inverted.

I had the issue earlier, its obvious on that pic :



In that case I was using 2 engines models, one of which was mirrored. I "fixed" the problem by doing the transformation "manually" (setting a translation then a rotation). Also I noticed that "Symmetrize" works. The problem is that I can't use symmetrize for non-symetrical objects...

And Vlad's tools are not up to date (Blender 2.63) and won't work with Blender 2.91 I'm using... I can't imagine reverting to an older and different interface... I don't know what to do... :rolleyes:
 
Last edited:

Trekkie

Starfleet Head of Ship Design
Addon Developer
Donator
Joined
Feb 6, 2016
Messages
350
Reaction score
89
Points
43
Location
Starfleet Ship Design Bureau
i use a bit of an inconventional way of making sure the normals are flipped correctly, i make sure i import the mesh as an .OBJ file and the export to .MSH in orbiter it then could show that the Normals are flipped wrong.. the only thing i do then is import the .MSH after i ran it in Orbiter and then Export that Same model to a .MSH and run it again.. somehow then it flips everything right :ROFLMAO:
 

N_Molson

Addon Developer
Addon Developer
Donator
Joined
Mar 5, 2010
Messages
9,272
Reaction score
3,244
Points
203
Location
Toulouse
i use a bit of an inconventional way of making sure the normals are flipped correctly, i make sure i import the mesh as an .OBJ file and the export to .MSH in orbiter it then could show that the Normals are flipped wrong.. the only thing i do then is import the .MSH after i ran it in Orbiter and then Export that Same model to a .MSH and run it again.. somehow then it flips everything right

We can't keep it that way that's madness... ?
 

Blake

Addon Developer
Addon Developer
Joined
Mar 9, 2009
Messages
225
Reaction score
104
Points
58
Location
Lehi, Utah
Ok, thanks for the stack exchange link. There appears to be a difference between the mirror 'tool' and the mirror 'modifier', which is what I have always used.

Normals did go through a big change in the 2.8x release and required some changes to how the export works. Let me get my head back into that code and see if there is something we can do. I also still have a file path issue to look at.
 

N_Molson

Addon Developer
Addon Developer
Donator
Joined
Mar 5, 2010
Messages
9,272
Reaction score
3,244
Points
203
Location
Toulouse
Many thanks, tell me if I can be of any help ! (y)
 

MaxBuzz

Well-known member
Joined
Sep 19, 2016
Messages
1,392
Reaction score
2,126
Points
128
Location
Kursk
in my viewport, the whole model is displayed as something wrong (transparency) you may have turned on some function, or made a cunning model
344.jpg
 

N_Molson

Addon Developer
Addon Developer
Donator
Joined
Mar 5, 2010
Messages
9,272
Reaction score
3,244
Points
203
Location
Toulouse
I have no idea what's going on, if I add a new object its transparent too so that's not a property linked to an object, I have a feeling it is only some viewport option...

Edit : its the "limit selection to visible" option, I don't think it has anything to do with my Orbiter export issue (tested : it doesn't)... See my pic below :

 
Last edited:

MaxBuzz

Well-known member
Joined
Sep 19, 2016
Messages
1,392
Reaction score
2,126
Points
128
Location
Kursk
save blender (I fixed the normals)
656.jpg4454.jpg
 

Attachments

  • v5.zip
    850.2 KB · Views: 3

MaxBuzz

Well-known member
Joined
Sep 19, 2016
Messages
1,392
Reaction score
2,126
Points
128
Location
Kursk
you mean the difference in illumination of the rocket nozzles?
 

N_Molson

Addon Developer
Addon Developer
Donator
Joined
Mar 5, 2010
Messages
9,272
Reaction score
3,244
Points
203
Location
Toulouse
Well I loaded your file in Blender then exported it as a .msh in Orbiter (with Blake's tool), and I still have the same weird results (lighting is "inverted" on mirrored meshes)... Maybe its something on my Orbiter install ? I use O2016 + Jarmo D3D9 client (Sept 7 2020 release)... And Blender 2.91.

Also if it can be of any use I have a GeForce MX 1050 Ti... and just updated my NVIDIA drivers just in case...
 
Last edited:

MaxBuzz

Well-known member
Joined
Sep 19, 2016
Messages
1,392
Reaction score
2,126
Points
128
Location
Kursk
it is necessary to combine two rocket nozzle (with the combination ctrl + J) then remove materials (leave only one)

7676.jpg21.01.20 00-26-07 Orlan.jpg
 

N_Molson

Addon Developer
Addon Developer
Donator
Joined
Mar 5, 2010
Messages
9,272
Reaction score
3,244
Points
203
Location
Toulouse
Ok thanks merging the two nozzles helped... at least the two nozzles are now consistently wrong...

 

MaxBuzz

Well-known member
Joined
Sep 19, 2016
Messages
1,392
Reaction score
2,126
Points
128
Location
Kursk
first choose "wrong" then "correct" and press ctr + j
 

N_Molson

Addon Developer
Addon Developer
Donator
Joined
Mar 5, 2010
Messages
9,272
Reaction score
3,244
Points
203
Location
Toulouse
I found the problem... Very weird...

In the "Export" settings of Blake's plugin, I had "Swap YZ axis" unchecked... Seems it caused Orbiter or D3D9 client to interpret the meshes normals data on the wrong axis.... I should be OK provided I rotate all my meshes accordingly... ?


Well not much better, everything is black now... The lighting is taking holidays... ?



Blake I have an error in the export log :

Code:
Python: Traceback (most recent call last):
  File "C:\Users\Nicolas_2\AppData\Roaming\Blender Foundation\Blender\2.91\scripts\addons\orbiter-blender-master\__init__.py", line 255, in draw
    row.prop(mat, "diffuse_color")
TypeError: UILayout.prop(): error with argument 1, "data" -  Function.data does not support a 'None' assignment AnyType type

location: <unknown location>:-1

... and the updated blender mesh if it helps ...
 

Attachments

  • Energia5V_KVRB_16.zip
    790.7 KB · Views: 3
Last edited:

MaxBuzz

Well-known member
Joined
Sep 19, 2016
Messages
1,392
Reaction score
2,126
Points
128
Location
Kursk
this happens if you set auto smoothing value other than 30°

I myself suffer from this bug (this is a significant bug for modeling) if possible, please correct

45.jpg566.jpg
 
Last edited:

N_Molson

Addon Developer
Addon Developer
Donator
Joined
Mar 5, 2010
Messages
9,272
Reaction score
3,244
Points
203
Location
Toulouse
Thanks for the advice. A bit better but I still get the black fuselage and incoherent lighting... I have the issue even with flat shading... Can you show me your axis in Blender (x,y,z) ? Thanks.
 
Top