• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

P3D v5 Adding/retaining mouse rects in an aircraft mdl

DragonflightDesign

Resource contributor
Messages
936
Country
northernireland
I have a ModelPart that I want to remove, but I want to retain the mouse rect so that a click action can still be activated. I know the mouse rect number, so positioning is not a problem. I've read the manual very, very carefully but there doesn't seem to be any (safe) way of removing the ModelPart while retaininng the mouse rect, or of adding just a mouse rect to a New Animation. Does anyone have any sage advice on this particular impasse?
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
31,705
Country
netherlands
Hi,

I believe a mouse rectangle should always be on a model part (of I'm wrong there some aircraft developer will correct me I hope). So you want to move the mouse rectangle from the part you remove to another one?
 

=rk=

Resource contributor
Messages
3,820
Country
us-washington
Can't you just remove the texture? Then the part is there, but it's not.
 

DragonflightDesign

Resource contributor
Messages
936
Country
northernireland
@arno: Not quite. I want just a mouse rectangle that is clickable in the VC. No texture or anything else that would display an item onscreen.
@Rick: no, you can't. MCX supplies a dropdown of available textures but no 'none' option and you can't manually remove the current incumbent. I have considered editing the raw .x file, but having done that before, I can't say it's very enjoyable 😄
 
Messages
131
Country
netherlands
It is what Arno says, mouse rectangles must be on the model part. You could add a dummy part, e.g. a simple small cube around the area which must be clickable. Then add the mouserec tag to the cube and make the material setting transparent. The cube does not need a texture.
 

DragonflightDesign

Resource contributor
Messages
936
Country
northernireland
So... I need to directly edit the .x file to remove the texture names and see what happens. I shall report back - ! 😄
 

DragonflightDesign

Resource contributor
Messages
936
Country
northernireland
Na. Nada. If you remove the texture names, it fails to compile. If you substitute a space to persuade the xtomdl compiler that there is a valid filename, it screws up all the other textures. Conclusion: Henk is right. It can only be done during the design stage.
 

tgibson

Resource contributor
Messages
10,770
Country
us-california
If that area uses a specific portion of the texture and the material is not being used for another purpose (reflection, etc.), you might be able to make that area's alpha channel black and thus make it transparent (you may need to change the material's settings to create the transparency). Then you don't need to remove the part or the texture.
 

DragonflightDesign

Resource contributor
Messages
936
Country
northernireland
I tried that Tom and yes, it really should work, but I ran into a hierarchy problem. Because MCX insists on moving those ModelParts to be under the main SceneGraphNode during export (although I dragged them under a related child SceneGraphNode before exporting), I end up with a hole punched through the side of the panel. Arno thinks there may be a possible problem with the MCX export and has asked for an MRE (minimum reproducible example) but I wouldn't know where to start. That's why I tried all those other approaches up to and including modding the .x file.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
31,705
Country
netherlands
It might also be that MCX moves the nodes on import and that in the exported MDL they are at the right location. Do you see the issue with the hole in FS as well or only in MCX when you reload the model?
 

DragonflightDesign

Resource contributor
Messages
936
Country
northernireland
Hi Arno

Here's the sequence:
After a normal compile of the 3DS Max .x and .xanim file the two errant parts are here (slots 2 and 3):-

1662573556775.png


I drag them both into the first child SceneGraphNode here:

1662573595038.png


I then export from MCX as a P3D 4.4 mdl file and the two ModelParts are moved back under the parent SceneGraphNode but much lower down (slots 53 and 54). I've also noticed that some other ModelParts are moved from their original places and put under the parent SceneGraphNode - does MCX do some type of streamlining?

To answer your other question: I didn't check the part in MCX. The hole is punched in P3D. I can reproduce and get some detailed screenshots if that would help?

-Dai
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
31,705
Country
netherlands
Hi,

It seems the node you drag them to has no animations or other special conditions, so in that case the optimization that MCX does on the scenegraph structure will put them back under the root node. That should not be an issue, as it is ensured that the visual appearance stays the same. MCX tries to make the structure as clean as possible, it is not an exact replicate of the structure in the MDL file.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
31,705
Country
netherlands
No, you can't turn it off completely. The way the MDL reader is programmed depends on the optimization to be done. It builds a kind of "sloppy" model structure based on the MDL file and it depends on the optimization to turn it into something efficient to render and work with.
 

DragonflightDesign

Resource contributor
Messages
936
Country
northernireland
Moving the ModelParts back under the main SceneGraphNode isn't a problem; it just caught me by surprise. The real problem was that they were not behaving after the initial export as discussed in PM. My workaround involves not removing the single ModelPart (MixtureLeverLockingBar_down - the one not in view). Trying to remove the visual side of the ModelPart was one attempt to solve the problem but if it can't be done, I can live with it.
 
Top