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

FS2004 Night texture ignored

Messages
1,043
Country
us-northcarolina
Hi,

Problem #1 solved so I removed my question.

Also the path in Mass texture editor and Minimize Drawcalls seems to be stuck on my previous project no matter how I change it.


An FYI I suppose since I'm not sure it's a bug or performing steps in the wrong order...assigning night texture then running Minimize Drawcalls crashes the Minimize Drawcalls window with following error:


************** Exception Text **************
System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Enumerator.MoveNext()
at ASToFra.ObjectModel3D.Texture.ReplaceInTextureName(String from, String to)
at ASToFra.ObjectEditor.DrawcallMinimizer.MergeTextures(String textureFolder, String baseName, Boolean writeTextures)
at ASToFra.ModelConverterX.MinimizeDrawcallsForm.cmdStart_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5446 (Win7SP1GDR.050727-5400)
CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
ModelConverterX
Assembly Version: 1.0.0.0
Win32 Version: 1.3.0.0
CodeBase: file:///E:/MCX%20Dev/ModelConverterX.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5446 (Win7SP1GDR.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5442 (Win7SP1GDR.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
ObjectWriter
Assembly Version: 1.0.0.0
Win32 Version: 1.3.0.0
CodeBase: file:///E:/MCX%20Dev/ObjectWriter.DLL
----------------------------------------
TextureObject
Assembly Version: 1.0.0.0
Win32 Version: 1.3.0.0
CodeBase: file:///E:/MCX%20Dev/TextureObject.DLL
----------------------------------------
ObjectModel3D
Assembly Version: 1.0.0.0
Win32 Version: 1.3.0.0
CodeBase: file:///E:/MCX%20Dev/ObjectModel3D.DLL
----------------------------------------
ObjectRenderer
Assembly Version: 1.0.0.0
Win32 Version: 1.3.0.0
CodeBase: file:///E:/MCX%20Dev/ObjectRenderer.DLL
----------------------------------------
GRV11DLL
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///E:/MCX%20Dev/GRV11DLL.DLL
----------------------------------------
ObjectReader
Assembly Version: 1.0.0.0
Win32 Version: 1.3.0.0
CodeBase: file:///E:/MCX%20Dev/ObjectReader.DLL
----------------------------------------
TextureLoader
Assembly Version: 1.0.0.0
Win32 Version: 1.3.0.0
CodeBase: file:///E:/MCX%20Dev/TextureLoader.DLL
----------------------------------------
ObjectEditor
Assembly Version: 1.0.0.0
Win32 Version: 1.3.0.0
CodeBase: file:///E:/MCX%20Dev/ObjectEditor.DLL
----------------------------------------
TextureWriter
Assembly Version: 1.0.0.0
Win32 Version: 1.3.0.0
CodeBase: file:///E:/MCX%20Dev/TextureWriter.DLL
----------------------------------------
System.Design
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Design/2.0.0.0__b03f5f7f11d50a3a/System.Design.dll
----------------------------------------
System.Drawing.Design
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing.Design/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.Design.dll
----------------------------------------
Accessibility
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Accessibility/2.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>
 
Last edited:
Hi Patrick,

I would call that a bug. Even if you might use a different order than expected, it should not crash like that. I will try to reproduce the issue here.

So you added some night textures and then ran the drawcall minimizer on the object. That should not be a problem.
 
Hi,

I tried, but I can't reproduce it here yet. Can you maybe send me the object that crashes? It might be something specific with the texture names in the model.

Btw, which version are you using? The latest development release or an older one?
 
Hi Arno,

I'm using the MCX Dev version.

Here are the steps I was taking:
  • Import
  • Minimize Drawcalls
  • Mass Texture Editor :rename textures
  • Material Editor :add night texture
  • Minimize Drawcalls: Crash

BG

This screenshot was taken after the crash. Only the Minimize Drawcalls window crashes, not the whole application. However, if exporting it seems the MDL is corrupted.

After the crash I reopened the Material Editor and I noticed that the 3rd template still had its temporary name indicating some process had not terminated properly.
Attached are the files you requested.
 

Attachments

Hi,

The steps imho should be:
import >>> open texture editor to add night texture >>> open mass texture editor, rename and convert >>> minimize drawcalls.
 
Honestly George, I forgot :) I watched the tutorial several times but doing it over and over might have gotten me out of synch in the process.
 
Hi,

It does not matter if you add the night texture before or after the drawcall minimizer. But it is not needed to run the drawcall minimizer twice. The second time would not give a different result.

However it should not crash, so I will still check that. I think the problem might be in running the minimizer twice.
 
If I use the drawcall minimizer I always make it the last step. Import, rename/update textures, add night textures, minimize drawcalls. Never had a problem with it.

A suggestion, though, Arno. After minimize drawcalls the materials list in the materials editor is updated to reflect the new materials. Old textures that are no longer needed are not deleted, though. I have to compare the list in the materials editor to the textures I have in my work folder and delete those textures that are no longer used. It would be nice to have the option of letting MCX automatically synch the two lists by deleting unused textures.
 
Hi,

I tried to reproduce the crash, but I can't (yet).

I did see that your object only has 2 textures and 1 colour. I think in that case I would not use the drawcall minimizer at all. It would not really be possible to pack everything on one sheet efficiently and the amount of drawcalls is not that bad at all.

So I would just skip that step. Or try it, but when you see the amount of drawcalls does not really gets lower. Just reload the model and process it without the drawcall minimizer.

I'll try to reproduce the crash later, since I would like to get it out.
 
Yes, no worries, I found a way around.

I will try to reproduce the crash too and communicate the steps to you if I succeed.
 
I recreated the bug

Hi Arno,

I downloaded the files I sent you and tested with them.
In order to test in the same conditions I did you must create a 'Hangar Old Dock 1' folder that contains a JPG version of my daytime textures. Name them 'texture0.jpg' for the main texture and 'texture1.jpg' for the wall texture.

Steps taken:
  1. Import DAE in MCX
  2. Run Drawcall Minimizer
  3. Look at textures in Material Editor
  4. Rename textures in Mass texture editor
  5. Add reference to night textures in Material Editor
  6. Run Drawcall Minimizer
  7. Receive crash report

I did the test again skipping step #3 and got the same result.
 
Hi Patrick,

Thanks, I'll try that approach step by step and see if it wants to crash :).
 
Hi,

Even with your step by step instructions I can reproduce the crash here. And if I look at the line of code that crashes it makes no sense to me either.

Since you found a work around already, I will just close this issue now. But if somebody has it again in the future, let me know and I will check again.
 
Oh absolutely, there is not need to sweat over it. I reported the error to you just as an FYI. Thank you very much for looking into it though.
 
A suggestion, though, Arno. After minimize drawcalls the materials list in the materials editor is updated to reflect the new materials. Old textures that are no longer needed are not deleted, though. I have to compare the list in the materials editor to the textures I have in my work folder and delete those textures that are no longer used. It would be nice to have the option of letting MCX automatically synch the two lists by deleting unused textures.
Wow, what a great idea! Don't you think so, Arno? :D
 
Hi,

I guess that can be added as am option. Although ModelConverterX can't know if another object still uses it.
 
As the designer, I should know that. :)

I'm talking about only the files in the folder that SU creates when you export a 3D model that uses external texture. The files processed by MCX reside in that same folder, or at least that's the way I work. So the option to delete unused textures would apply only to what's in the work folder. I keep the original texture files outside the export folders so I could always go back to those if I need to.
 
Back
Top