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

GLS

Well-known member
Orbiter Contributor
Addon Developer
Joined
Mar 22, 2008
Messages
5,918
Reaction score
2,921
Points
188
Website
github.com
Nah. As mentioned, that mesh has no backfaces. If the normals were facing the wrong way, you'd only see them from the inside. Also, I did try shipedit just to be on the save side, didn't change anything.
While the most common issue with normals is having them backwards, you can also have them pointing in any other direction. Not sure about the "faces being visible only from the inside" part... I think Orbiter figures that out with the order of the vertices in each triangle, and the normals are only use for lighting. The D3D9 folks should know this.

EDIT: yes, you need to save in Shipedit.
1) File >> Load mesh...
2) Transform >> Generate Normals ... >> Apply and Close
3) File >> Save mesh ...

Shipedit can also do a sanity check with Calc >> Check mesh.
 

jedidia

shoemaker without legs
Addon Developer
Joined
Mar 19, 2008
Messages
10,877
Reaction score
2,131
Points
203
Location
between the planets
Indeed, that did the trick. The only problem with normals I'm familiar with is that they face the wrong way, so the faces get filtered out during the render pass when looking at them head-on because they wouldn't be visible. Maybe they were just off by a lesser angle, I dunno. Looks much better now in any case, let's see about textures.
 

N_Molson

Addon Developer
Addon Developer
Donator
Joined
Mar 5, 2010
Messages
9,286
Reaction score
3,255
Points
203
Location
Toulouse
Wait, you actually have to save in shipedit? Uhm... huh... kinda thought it applied its transformations to the file directly. Ok, I'll try it again, then. Still don't see why the faces would be rendered at all if they'd be facing the wrong way, though...

Yes, I'm 100% sure of that. I agree it isn't obvious because if you quit it won't prompt you "do you want to discard the changes ?". I think Martins was a bit above that. ;)

In ShipEdit the workflow is :

  • Load your mesh
  • Perform calculations if you need to using Calc functions (PMI, Cross Sections). The more samples (and time) the better.
  • Transform -> Generate Normals -> OK
  • Save ! ;)

Note : a very good thing is that ShipEdit will crash if your Blender scene has "ghost objects" (empty object with 1 vertex or 0). Because such objects crash Orbiter too. So its a good test.

The normal issue doesn't show in Blender, it made me mad at first, believe me. I was thinking like you "those normals look damn right !!!". But no, there's some kind of black magic involved. This is beyond the understanding of us the lesser beings. Just Hail the Mighty Probe and rejoice ! :hailprobe:

Because once you've done that, the normals should look consistent with what you have in Blender. Again selecting all objects in scene and "Apply All Transforms" in Blender works too, but I do that only when my mesh is finished and I can apply the modifiers. I know Blake doesn't agree there, but there's something I don't catch. Well, I can live with it, as long as it works.
 

jedidia

shoemaker without legs
Addon Developer
Joined
Mar 19, 2008
Messages
10,877
Reaction score
2,131
Points
203
Location
between the planets
Another useful tidbit, though not directly blender related: While not documented in the .msh documentation, orbiter doesn't like non-square textures.

Also, it almost appears to me that the higher the specular power, the less notable the effect becomes? I'm not sure, I'm a bit confused at that. Some parts of my mesh seem to glint an awful lot that shouldn't be glinting that much, and other parts that should be glinting more don't quite as much. Haven't really figured out the logic behind that one, it seems...

Edit: Oh, I see, the higher specular power is the more focused to one point becomes the reflection. The brightness is mostly handled by the color, alpha channel doesn't seem to do much.
 
Last edited:

GLS

Well-known member
Orbiter Contributor
Addon Developer
Joined
Mar 22, 2008
Messages
5,918
Reaction score
2,921
Points
188
Website
github.com
Another useful tidbit, though not directly blender related: While not documented in the .msh documentation, orbiter doesn't like non-square textures.
AFAIK, the dimension of textures must be a power of 2, but height and width don't need to be related, so 128x128 is "legal", as is 128x32 or 128x256, but 175x175 is not.
 

jedidia

shoemaker without legs
Addon Developer
Joined
Mar 19, 2008
Messages
10,877
Reaction score
2,131
Points
203
Location
between the planets
AFAIK, the dimension of textures must be a power of 2, but height and width don't need to be related
That's good to know, thanks!

Here's another one not directly blender related: If you use a specular map in D3D9 client, obviously that will controll specular color. But the specular power setting of the material seems to have no effect anymore once you put in a specular map, and I don't know how to control it...
 

jedidia

shoemaker without legs
Addon Developer
Joined
Mar 19, 2008
Messages
10,877
Reaction score
2,131
Points
203
Location
between the planets
Texture a cube with different specular values (min to max) and see which one works best.
Yeah, my current problem is that I seem to be completely unable to set specular power when using a specular map. It just seems to be some default value (and a pretty high one at that).
 

N_Molson

Addon Developer
Addon Developer
Donator
Joined
Mar 5, 2010
Messages
9,286
Reaction score
3,255
Points
203
Location
Toulouse
Yeah, my current problem is that I seem to be completely unable to set specular power when using a specular map. It just seems to be some default value (and a pretty high one at that).

@jedidia I had pretty much the same problem. I wasn't understanding specular maps correctly. Your specular map should be a DTX5 .dds ; the alpha channel (transparency) determines local specular value. Gimp (free) has a functions that allows you to convert a color to alpha channel, this is extremely useful to make uneven textures. The color of the texture will determine the specular color (non-metals should be mostly grayscale).
 
Top