Discussion Trying to render a functional VC (starting small)

That is a syntax error. (Yes, Captain Obvious) If you invoke a function (so it gets executed), you don't need to specify the types of the variables a second time.

In your function, all you need is merely "RedrawPanel_MFDButton(surf);"
 
Thanks, that cleared the error. There's nothing really obvious for me here, no worries.

(and I managed to add a 'beep' sound each time a MFD button is registered as 'clicked', as you suggested. It helps knowing what's going on).
 
Last edited:
At some point you have to separate the 'vc_mesh' from the 'external mesh'. For your own sanity. Because else, each time you make a modification to the meshgroups order, it is a mess. Also, visually it doesn't seem to have ill effects. Rather the contrary, I have the feeling that the transparency is handled better.

Also, when using the Blender Tools for Orbiter, use the 'export selected' feature, then press A to select all objects in your scene, and then build the mesh. Not following this give me all kind of weird mesh export issues.

Another thing is to use the 'Object -> Clean up -> Remove unused materials' feature. Blender duplicates these easily, and it can become an issue.
 
Also, when using the Blender Tools for Orbiter, use the 'export selected' feature, then press A to select all objects in your scene, and then build the mesh. Not following this give me all kind of weird mesh export issues.
You shouldn't have to do this to export. You may have something in your model the exporter is tripping on, don't know what that would be since only mesh objects should be exported. If you have a blend file causing this issue I'd be glad to take a look.

As for VC and external meshes, I used to have these in separate scenes in the same .blend file. The exporter supports that, and will output different mesh files. However, Blender has been flaky with that so I have started keeping the VC and main mesh files in separate .blend files. You can still share objects if needed, but I've found separate blend files is cleaner. Exporting each scene to a separate .MSH file may be deprecated in the future as it has been the source of some issues.
 
Ah sorry, I should have specified that I have several scenes in my .blend file. And as you say, the problems occur when I 'Build meshes'. So the way I found around this issue is to select all the objects of a given scene ; that way the tool generates only the mesh from that scene (and not a series of meshes from all the scenes).
 
Ah sorry, I should have specified that I have several scenes in my .blend file. And as you say, the problems occur when I 'Build meshes'. So the way I found around this issue is to select all the objects of a given scene ; that way the tool generates only the mesh from that scene (and not a series of meshes from all the scenes).
1763944738418.png
You can check if those scenes have the Output Mesh File option checked (unchecked if you don't want it to output as a mesh, for example you store objects in a scene that you are working on, but not ready to include as part of your mesh). As I mentioned, I've had issues getting multiple scene .blend files to work reliably so in the future I may remove that feature and just output the main scene to the mesh file. You also can get naming conflicts across scenes which can be annoying.

There is a disconnect between Blender's concept of a scene, and what I was trying to accomplish with it.
 
Keeping this here for future reference, in DeltaGlider.cpp :

1764114980490.png
 
I am trying to bring the artificial horizon to life, using code from the DeltaGlider samples. It turns out to be a bit complex. There's a C++ issue I don't get and that stands in the way. I'm a bit puzzled.

E2140: expression must have integral or unscoped enum type

1764131389818.png
 

Attachments

  • 1764131210037.png
    1764131210037.png
    244.6 KB · Views: 2
vtxofs is the real culprit, the mark (only) at the i is just misleading you. You just have a type issue with the result of the addition: int + double results in a double.

And what is the 1.5th element of an array? If not undefined?

Either make vtxofs an int or make a type cast in each line, e.g. "i + (int)vtxofs".
 
Orbiter crashes. I start as paused in VC mode, then when I un-pause, CTD. It can be many things at this point, my code is getting messy.

One of my problems is that I can't use the debugger. No idea why. So I'm guessing, and I'm reaching the limit of where this is manageable.

But I have the feeling I'm not far from having that instrument working.

So what I am going to do is to make a super simple mesh with only that instrument display and a vessel module that does only that, display the artificial horizon. When I load the original ShuttlePB ported from 2016, I can run it from the debugger. So it is something I added in my code that the debugger can't take.
 
Back
Top