SDK docs for html/js gauge material requirement?

Hi, any help appreciated - I’m partnering development on a new plane with a very experienced modeller new to the MSFS franchise (I’m a MSFS ‘programmer’ with really weak knowledge of modelling) and need to explain the Blender requirements behind the texture=XXX parameter in panel.cfg.

I believe the XXX is actually a material ID, and guessing that may need particular properties. I’ve discovered with other modellers there’s considerable confusion around whether the material id should start with a ‘$’ or not, as with a Blender export sometime the ‘$’ seems to work and not without, but the recommendation seems to be not to use it.

Hints or a pointer to the docs where this bridge between html/js and a Blender model can be properly defined would be really helpful if anyone can point me in the right direction. I’ve trawled through the SDK docs and found a lot of good textures info, but haven’t found the specifics for this key use case. Even YouTube drew a blank.

My findings are that you should prefix the VCockpit textures with “$” only if the display should be clickable. The documentation mentioned that this prefix was reserved for collision materials.

In MSFS 2020, it did not seem to matter which texture name you chose but in MSFS 2024, a display was not clickable until I added the $.

I have seen many developers have issues with HTML displays simple due to the many details that can cause them to be inoperable or otherwise not work as intended. More detail in the documentation would be helpful to describe some important points like aspect ratio, texture size, face normals and emissive values. Also tips for debugging the instrument code as errors can cause all instruments to fail to render.

2 Likes

this is one of a list of things that puzzles me. Is it a ‘texture name’, or the id of a material ? Is this documented anywhere?

Sorry, that wasn’t a very clear way to say it. It is the material name in Blender and it becomes the material name in the GLTF.

The same with VPainting sections. The texture in the panel.cfg is the material name in the 3d model.

Material names are also now used with editable colors in liveries. You reference the material name in the model with overriding color properties.

1 Like

The $ thing is a legacy method to add mouse collision to the material. You can instead tick the collision checkbox in the blender material properties. I’ve always used MSFS Standard material with the only modification being the collision checkbox, and the material name is what goes in panel.cfg.

2 Likes

Thanks for the clarification with collision materials. This is good to know. Maybe we can finally get rid of the $.

1 Like

Wow these replies are super-helpful, thanks!

1 Like