• 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 Cannot get MCX to load light map file

Messages
639
Country
panama
My model uses a single texture sheet (.jpg) with 1024x1024 size and I made a copy of it with the _LM suffix and modified the sheet so that it has Multiply blend mode to show the image as if it was during the night.

Now, in MCX I used the Material Editor and in the properties of my texture sheet I changed its Night Texture property to select the _LM file and at the top I selected Add Night Texture and clicked on Apply.

But when I switch to the Texture tab of the Material Editor I see that it shows the name of the _LM file but without its size attributes and a blank thumbnail. The event log says "Failed to load texture mytexturename_LM.jpg"

I tried with my _LM file in .jpg, .png and .dds formats but can't get it to recognize it. What's the problem here?
 
Did you locate the night texture in the same folder as the day texture?

Sketchup models often use relative paths. In that case you should only use the apply night texture template and not select the texture file manually.
 
The problem is the Sketchup model usually has many little textures that are not even multiple of power of 2, so I need to apply the _LM after MCX has generated the single texture sheet by minimizing draw calls as you stated. That does not seem to work well. If on the other hand my Sketchup model was built out of a single texture then it seems to work well because I can create _LM right there.

That however only works for simple stuff because the texture(s) on the sheet must fill an entire surface and cannot be replicated on the surface.
 
Where did you put the merged texture relative to the location of your dae file? Or mdl file if you have exported already?

I think it's somewhere out of the search path.

Sketchup uses relative paths with a sub folder. Once the drawcall minimizer runs the combined sheet is in memory.

You could also make night versions of all small textures and then a combined night sheet is made for you. So then you would have to run the night texture template before the drawcall minimizer.
 
I first saved the textures (after optimization) as DDS texture sheet, then edited it to create the nightmap sheet and then I tried to use the Apply Night Texture and got the error message about failing to load it.
 
Hi,

Like I asked before, where did you save the textures compared to the model you loaded? That determines if they are found or not. Let me try to explain what happens.

You load the COLLADA files and all textures are loaded as well. If you know use the drawcall minimizer the textures are combined in one sheet. You save these to DDS in a specific folder. This folder might not be on the default search path, but since the sheet is already in memory that's no problem. If you know put the night texture in the same folder the DDS it will not be found if your texture folder is not on the search path.

So either you need to export to MDL and import in between (assuming you put the MDL somewhere where the textures can be found). Or you need to make sure your texture folder is on the texture search path.

By default MCX will look in the same folder as your model, in ..\texture and in ..\..\texture. So if you texture folder is somewhere else compared to the model it might not be found.
 
Will check that. Because I have multiple scenery projects in progress I refined by workflow. I created the following structure:

01-SketchUp <--- all I need for my SketchUp 3D models
MyProject/
CustomTextures/
myTextureSheet.jpg <--- some projects don't have sheet but individual SU textures
*.jpg​
myProject.skb
myProject.skp​
02-Collada
MyProject/
*.jpg <--- all textures created by SketchUp Export 3D Model​
myProject.dae​
03-ModelConverterX <--- everything needed by MCX
MyProject/
scenery/ <---- BGL created by MCX Export Scenery for non-library objects
texture/ <---- MCX Texture Export folder (Save Textures) [1]
myTextureSheet.dds
mcxComposedSheet.dds
myProject.mdl <--- MCX Object Export​
04-Library <--- Libraries made by me used in my projects (LibraryCreatorXML)
MyLibrary1/
scenery/ <--- MyLibrary1.bgl
texture/
myLibrary.txt​
MyLibrary2/​

So the file system reflects the workflow -I don't need to relearn it after months of absence) and has what I need for that particular tool to do its work and becomes the input for the next tool in the toolchain (SU, MCX, LCXML).

If my project makes use of individual textures -regardless of whether it also uses a sheet for other parts of it- AFTER I save the textures in MCX [1] I use myTextureSheet.dds and if generated mcxComposedSheet.dds to create the respective _LM files that I save in the same texture folder of the regular sheet/file in the 03-ModelConverterX hierarchy.

I noticed that when I do that it is seldom recognized (Cannot load night texture...) as indicated in the log. If I create the file right in the 01-SketchU (or 02-Collada, don't remember) hiearchy (say, when my SU model uses exclusively a texture sheet) then MCX appears not to warn me about being unable to load _LM.
 
Last edited:
I just got an idea on how to reduce this issue. I'll see if I can code it somewhere in the next days.
 
Hi Arno,

My issue might be a bit different but I'll piggyback on this thread anyway.

Using the latest development release, MCX will not display my night texture for my current model using the Texture Night Render Mode, although when I click 'apply' night texture in the Material Editor, MCX indicates that it's loaded, and the thumbnail is correct. The Material Editor correctly lists the name of the night texture in the properties of the texture it replaces.

When I export as .bgl and check in the sim, the night texture is not rendered at night, and when I open that same bgl in MCX, then go to the Material editor and check the properties of the day texture, the night texture file name is now missing. As for file naming, nothing different from what I've always done -- adding _LM.

And further, when I open any of my older models which have functioning LMs in the sim, MCX displays the same day texture whether using Texture Render Mode or Texture Night Render Mode. However, MCX does say that the LMs are loaded. I don't want to risk my old models, but I suspect if I just saved the model, I might lose the LMs.

I'm stumped. Any ideas?

Thanks much,

Larry
 
Hi Larry,

Let me check, I haven't touched the renderer code recently.

Are you using the simple shader mode maybe?
 
Hi Arno,
I had tried both the simple and complex shader using the options menu but neither worked. Just now I simply toggled the shader icon and the LM's on an older test model now appear.

So Problem Solved.

What's weird is that it seems as though one needs to use the complex shader mode so that the LMs 'stick' when compiling. Could that be right?? I just checked my new (huge) model where the LM was not showing up as mentioned above. Clicked the complex shader icon, then used the Material Editor to add the first LM; now it shows up in MCX. Saved the .bgl, and loaded it, LM is now present.

It's unrelated, with the model now over 60 k triangles, when I save the model (overwriting the old without making any changes) I get the warning:

4:20 PM XtoMDL Warning warning : Index buffer exceeds maximum size.

The model seems intact; should I be worried? I've got 7 more LMs to do and maybe more stuff I'd like to add.

Larry
 
Last edited:
I have lost models due to corrupted incremental edits, the solution is to write to another folder or name and not overwrite. Nothing to worry about at all if you can fit that step into your work flow.
 
The shader choice only influences the display and should not affect exporting. Let me check if the simple shader has night textures or not.
 
Back
Top