• 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.

FSX obj import error

Messages
43
Country
unitedkingdom
Hi, I have tried importing an obj exported from blender that gives an error saying,

An item with the same key has already been added.

StackTrace:
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at ASToFra.ObjectReader.OBJReader.ReadMtlLib(String filename)
at ASToFra.ObjectReader.OBJReader.Read(String filename)
at ASToFra.ObjectReader.AllObjectReader.Read(String fileName)
at ASToFra.ModelConverterX.MainWindow.bwImporter_DoWork(Object sender, DoWorkEventArgs e)

The file or a previous version of it worked fine before. Does anyone know what the problem might be?
Any help appreciated,
thanks,
Nick

here is a link to the obj file, https://drive.google.com/file/d/0Bzulz-YNTLFmclo4WWRtY19mSEU/view?usp=sharing
 
I managed to export from a previous version of the same project and that has worked fine. Not sure what the problem was though.
I now have another problem with the rendering. The textures don't show even though they are listed (bmp's) in the mass texture editor with the correct file path. Also some of the objects faces are not showing, some are invisible on one side some on both, could this be something to do with normals? any help would be appreciated.
Thanks,
Nick
 
Hi,

I can't debug the error, since you only uploaded your OBJ file to test with, but the stack trace mentions the problem is in the MTL file. It seems there is duplicate name or so for a material and that's what it crashes on.
 
Hi Arno, thanks for your help, seems to be working ok now. I was wondering, do you know why some of the faces are not visible on one or both sides?
 
The normals, you have to identify those faces and flip them. It's because MCX is good to check the .Mdl , you wil see if there are flipped normals , the modelling tool should have a way to see those faces too.
 
In the simulator, faces without texture are invisible. Most inside faces are untextured to conserve resources and often a consequence of the file translation process is to have some or all of these faces reversed, or "flipped normals." Additionally there is the matter of the duplicate name incompatibility which could be causing some textures to be discarded and leave faces untextured.
 
Hi,

It might be that the double sided faces have a special attribute in the mtl file that MCX doesn't understand yet, in that case they would become one sided. If you can show me the mtl file I can have a look.

Faces should not disappear normally, but if the normal and vertel order don't match the reverse side might show.
 
Thanks Arno, sorry for not replying sooner. I have managed to flip most of the faces but it would be nice to have the roof visible from both sides. Also one triangular face below the roof is still invisible even when flipped. I can still see gaps between the faces is it good practice to overlap joins? Thanks for your help, here are the files.
https://drive.google.com/file/d/0Bzulz-YNTLFmc2UzOThiM0VYRkE/view?usp=sharing
https://drive.google.com/file/d/0Bzulz-YNTLFmOGVKYjBGcWhqUGs/view?usp=sharing

Also still having a problem with textures, they are not showing up on the model, only the material colour. textures are listed in the mass texture editor and the filepath is correct. do you know why that is?

thanks,
Nick
 
In blender can you clone (duplicate) the roof, and flip all the polygons of the clone? That will give you the roof visible from both sides.
 
Hi, I have flipped all the normals, I saw that there's a double sided option in the material editor which works for the roof. The only problem I'm still having is the textures not showing up, the filepath is correct and the textures are listed in the mass texture editor. Not sure what the reason is. Thanks for all your help so far.
Nick
 
Have you confirmed that your textures conform to the required size and format? Perhaps it would be helpful to take a completed and functional model, say from the default object library and compare it to yours to determine in which way they differ.
 
Back
Top