FSX Create New Material and Reassign Parts?

tgibson

Resource contributor
Hi,

I have an FS2004 aircraft where the glass texture is part of a larger texture, and when I Export it to FSX, the windshield is combined with the other parts using that texture. Thus I cannot make the windshield transparent without making the rest of those parts transparent as well. I do have CollapseModelParts set to FALSE. If I could create a duplicate of that material with a different name in the Material Editor and assign that duplicate material only to the windshield part in the Hierarchy Editor (while still in FS2004 format) then I could keep it separate and make it transparent. Can I request this please? If this is already possible please let me know the procedure.

My current workaround is to isolate the windshield from the FS2004 model, change the material to glass, Export as an FSX model, and Merge it back into the FS2004 model (with the windshield removed first). This gives me two materials (with the same name) that are assigned to 1. the windshield and 2. the rest of the parts. This is OK, but wouldn't be necessary if we could manipulate the materials and their assignments.

Thanks,
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Hi,

You mean the windshield is already a seperate model part, else you could not isolate it. Then it should be possible to change the material settings.
 

tgibson

Resource contributor
It is separate in the original FS2004 model, but becomes joined to the other parts using the same material after Export to FSX format.

Since even in FS2004 that one material has been applied to many parts and ONLY the windshield should be transparent, how do I edit the material for just the windshield and not affect the rest of the parts also using that material?
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
I understand your workflow now. The material editor does indeed edit the material for all modelparts that use it, not only for one specific part. Let me check if I can do something about that.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
I had a quick look and I think you actually found a bug.

I did a quick test with a model here. It has 4 materials. I changed one of them so that it became the same as another one. After that the material list shows 3 materials. But if I change that material that is used on 2 parts now, only one of them gets the material with the new changes, the other one keeps the one it had before. So it seems in that case you might only edit the material on one part, but you can't see which one.
 

tgibson

Resource contributor
I haven't tried that workflow yet, so I don't know about that. But perhaps the Importer could be improved so that if there is more than one material using the same texture (say one is transparent and the other is opaque) that MCX does not combine them together into one material?
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Hi,

If one material is transparent and the other not, than the two materials are not the same and the material editor will show two materials already. They are only combined when exactly the same. But I'll try to fix that bug anyway that you can't edit all materials as it seems now.
 

tgibson

Resource contributor
That has not always been my experience. The model I'm working with now has two materials for one texture, but they only appear as one material when Imported into MCX.

I have created a simple FS2004 model that displays this behavior. Two boxes, using the same texture. One has a material with 100% opacity, the other a different material with only 40% opacity.

mcx_material_fs9.jpg


When I Import this model into MCX, the Material Editor only displays one material:

mcx_material_fs9_editor.jpg


The model is attached.

Hope this helps,
 

Attachments

arno

Administrator
Staff member
FSDevConf team
Resource contributor
If I load that model in MCX both boxes look the same, so maybe the transparency setting is not read correctly.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Hi,

Did some more thinking. In FS2004 you can use the material colour alpha to make the texture transparent. In FSX you can't do that anymore I think. So MCX ignores the material colour now when a texture is used. I should probably still use the alpha, although after export to FSX I think it's still broken.
 

tgibson

Resource contributor
Yes, in all of my work, all objects that were transparent in FS2004 are opaque upon import into MCX.

And yes, that is how I created the transparent box. It is commonly used in FS2004 models. I do understand that it no longer works in FSX, but it would be good to at least keep that material separate, rather than combining them. And keeping that material's alpha value would help if MCX ever perfects FS9 aircraft export.
 
Last edited:

arno

Administrator
Staff member
FSDevConf team
Resource contributor
I agree, I'll try to fix the importer tomorrow. Now time for some sleep.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
OK, I have fixed it. Will be in the next development release.

The importer does copy the alpha value to the texture alpha channel as well, so that it will work in FSX as well. Unless the alpha channel is already used for reflections.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
I had a quick look and I think you actually found a bug.

I did a quick test with a model here. It has 4 materials. I changed one of them so that it became the same as another one. After that the material list shows 3 materials. But if I change that material that is used on 2 parts now, only one of them gets the material with the new changes, the other one keeps the one it had before. So it seems in that case you might only edit the material on one part, but you can't see which one.
This issue about different materials that are the same and only editing one only happens when you read a API macro or so. With FS2004 or FSX files it does not happen. So that should not be a big issue for most.
 

tgibson

Resource contributor
Hi,

This works fine, with MCX creating multiple materials for each level of transparency, thanks.

But this has introduced the old problem of generating huge bounding boxes when converted into an FSX model and this also causes the loss of the axes in the attachpoints. This problem is probably worse than the material editor one. :) I think you did something about removing some scaling last time that fixed this?

Hope this helps,
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Hi,

I'm surprised that returned, since this material change should not affect the scaling. Would you have a test file that reproduces this issue?
 

tgibson

Resource contributor
I figured it out. When I downloaded the latest version of MCX it set the RemoveScaling option to FALSE. Setting that to TRUE fixed it.

Sorry,
 

tgibson

Resource contributor
Now I just have to remember to check the Material's Opacity setting and somehow convert that to the FSX Set Alpha at Render method.
 
Last edited:

arno

Administrator
Staff member
FSDevConf team
Resource contributor
I figured it out. When I downloaded the latest version of MCX it set the RemoveScaling option to FALSE. Setting that to TRUE fixed it.
Happy to hear that :)

Now I just have to remember to check the Material's Opacity setting and somehow convert that to the FSX Set Alpha at Render method. Is there a way to use this to make the object partially transparent without changing the alpha channel?
I have to check, maybe i should not do that automatically and just leave it as material color alpha so that you can play with it and later burn it into the texture is wanted.
 
Top