ModelConverterX batch import process should insert path to the texture files or copy them into the export folder

I was just testing the dev version of MCX and wanted to see the FSX objects contained in a .BGL file. I selected "Import " and selected the \Scenery\Global\scenery\ airport_objects.bgl file. But MCX only imported a single object.

So I tried the Wizards\Batch Convert and selected the same file as before. I created a NEW folder and pointed the export to it with export as the default .ac format. MCX did its thing and I had a whole heap of .ac files to import. However they imported either black/white squares and the status showed that it could not find the associated .dds file.

I opened the .ac file in Notepad and it showed:
AC3Db
MATERIAL "mat0" rgb 0.588235020637512 0.588235020637512 0.588235020637512 amb 0.588235020637512 0.588235020637512 0.588235020637512 emis 0 0 0 spec 0.196078404784203 0.196078404784203 0.196078404784203 shi 0 trans 0
OBJECT WORLD
kids 3
OBJECT POLY
name partpart0_lod_5
texture "gen_beacons.dds" <----- here is the texture but no path so MCX cannot find it.
numvert 63
-0.97843 -0.50244 -0.33062
-0.97843 -0.50244 0.70477
-0.97843 0.50244 -0.33062
-0.97843 0.50244 0.70477
....
....

So it had the texture name of "gen_beacons.dds" but no way to find the texture. So I added the full path before the texture, in Notepad and saved:

texture "c:\fsx\scenery\global\texture\gen_beacons.dds"

and now MCX could find it. Also I discovered that selecting the "Material Editor" icon opened a window that had properties and I could navigate to set the full path for the texture in the "Diffuse texture" property.
But doing this for each object is counter productive especially as a batch process.

So I have a suggestion for adding in the next dev version:

Either

Save the FULL path to the texture into the ac file
In FSX ALL textures are stored in the texture folder of the relevant scenery.
So if I select a BGL file from \Global\scenery then we KNOW that the texture is located in ..\texture from the path of the selected BGL file!!
The FULL path if the BGL file can easily be obtained because when a user selects a single file or a series of files using the "ADD" button on the batch form, the full path+file name are stored in the "Input" list box.
Thus the path to the texture for each BGL file can be deduced and inserted into the .ac file so that importing a .ac file brings in its texture as well.

OR

Get the path to the texture as before but now create a \texture folder and copy the textures into, inserting the texture path into each .ac file or code that into MCX:

name partpart0_lod_5
texture "..\texture\gen_beacons.dds"
numvert 63
-0.97843 -0.50244 -0.33062

Either way is ok, but to avoid duplicates the first method is better, as the path to the FSX scenery textures NEVER changes unless the installation is redone.

Since the MCX app is still being developed, it should be easy to do.

Thanks for this excellent app, which I am still learning.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Hi,

An easier way to find the textures might be to add the folder to the texture search path. That why MCX will look there as well.

I would have to check if the AC format intends to save a full path or not. Many formats only store the filename only and not a full path.
 
As I mentioned when I opened the property sheet of the object, I was able to browse and select the correct DDS texture and on saving MCX saved the full path.
There are so many folders that it is a hassle to add all of these.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
I checked and the AC3D formats allows a full path. In general I don't like a full path, as it makes moving the models harder. But I can probably have an option to save either way.
 
Full paths me too. But how would this affect moving models? I mean we are talking here about FSX and its paths are Fixed. The textures paths are fixed relative to the install. It is these paths we are talking about as we want to avoid having a duplicate set of textures in the models export folders.

So for instance in the case I mentioned:

name partpart0_lod_5
texture "gen_beacons.dds" <----- here is the texture but no path so MCX cannot find it.

I might move the model to another folder but the path to the textures remains the same, [In the FSX install scenery folder] unless we create duplicates of the textures used and move both the duplicate textures and the model together.

Your idea is also workable too with a checkbox. Up to you anyway as you are the author. Thanks again.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Hi,

I guess it depends on the tool or system you will be importing the models into again. They might have their own rules of how the textures are found. So typically when I convert a bunch of models between two systems I make a copy of the textures in a supported format that go together with the converted models. That way you have a self-contained package for the conversion.

But I like the idea to support full path as well, so I'll have a look at that.
 
I was just fooling around and wanted to add some objects into a barren area to see how it was done, which is why I started looking at FSX default objects. I also am looking at Whisplacer to place the objects. Thanks and looking forward to the update whenever you have the time.

By the way I started with MSFS v2 as I worked for the Airline Industry at that time and PC's were my hobby. I still have every version though I had to get rid of the floppies long ago. I had put away FSX because after Acceleration, my computer[at that time] struggled to handle 20 fps. Now that my time is my own, I pulled the DVD's out and installed the lot and since I had been in the IT industry for the last 26 years, I was interested in all the tools/utilities for FSX of which I have a lot of.

Cheers.
 
Top