Error

funnnyfarm

New member
Dose anyone know how to fix this error? "Error: Unable to load mesh file: 'sd40-2b_shadow\sd40-2b_shadow.pm'". Thanks funnnyfarm
 
It seems like you need an Advanced Content Editing tutorial. I'm not sure if one exists or, if it does, where. I would give you one now, but it's after 11:00 PM where I am.
 
The Erecting Hall has a very good loco Content Editing tutorial.
Your not going to learn this in a few minutes.
 
Last edited:
Curious, but is this one of the 6 SD40-2B units on the DLS that were made for TSP3? If so, which one? I just downloaded one of them (the Santa Fe unit by Phil_C) into TS-2010 and noticed there is no SD40-2b_shadow folder or SD40-2b_shadow.pm file in the asset. It gave me the same errors you are getting. I haven't looked at any of the others. Also, do you have the SD40-2B BNSF Phase I unit released by Norfolksouthern37? I don't recall where I got it but it works without error or warnings in 2010 and has a shadow.im file. I assume you are working in TS12, which is somewhat close to 2010. It is possible that TS12 has "evolved" to the point where this will not clear the error. But, here is how I fixed it in 2010 and got it to work with only warnings and it displays a shadow now.

Create an empty folder outside Trainz, any name will do. I named mine Temp1.

In CMP, open the asset for edit in explorer.

Highlight all files/folders and copy them. Paste the files/folders into Temp1.

In Temp1, create a folder named sd40-2b_shadow.

In CMP, if you have the norfolksouthern37 file I mentioned above open it, otherwise open any SD40-2 file for edit in explorer and go to the shadow folder and copy the shadow file. It may be an IM or a PM file. The one in my folder was named shadow.im. Copy that file and paste it into the sd40-2b_shadow folder you created in Temp1.

Rename it to sd40-2b_shadow.pm (in your Temp1 folder). If you change the suffix from im to pm you will get a warning message; ignore it.

In CMP, delete the "broken" SD40-2b asset.

Use the Import Content option and highlight the Temp1 file and import it's contents into Trainz.

Commit.

Hopefully you will now see only warnings pertaining to PM vs IM files. Try placing the loco in Surveyor and it should appear. If shadows are important to you (I don't use the shadow option) you should see a shadow resembling the outline of an SD40-2.
 
Last edited:
torino72 The PM2IM is only for pm to im. Can you please tell me how to change the suffix from im to pm? thanks funnnyfarm
 
Under normal circumstances, you should not need to reverse the process (which is not possible anyway). It's more likely that you haven't got the right information in the config file.

Shane
 
torino72 The PM2IM is only for pm to im. Can you please tell me how to change the suffix from im to pm? thanks funnnyfarm[/QUOTE

You do that using PM2IM which converts the format and automatically creates the IM File.

Once you've created your IM file, you can then create your shadow mesh using the Quick Shadows program from PEV, and then copy the shadow.IM to the Shadow folder for your asset.

After all that is done...

Add the following container to your config.txt and change the names to fit your asset.

mesh-table
{
default
{
mesh "xpt_cl_new_xd_body/xpt_cl_new_xd_body.im"
auto-create 1
}

shadow
{
mesh "xpt_cl_new_xd_shadow/shadow.im"
}
}

The process takes about 2 minutes to fix. Save this mesh-table information to a text file so you can use it again for another asset.

John
 
Funnyfarm: I simply renamed the im file to have a pm suffix while I had it in the temp1/sd40-2_shadow folder outside Trainz. I tried the file with an im suffix but the error was still there. I see no way to rename anything in the config file. The asset is looking for a pm file and will not accept anything else. This worked for me in 2010 but, as I said, I do not know whether it will work in 2012. I got a warning that if I changed the file suffix the file might not work but I renamed it anyhow and it did work in 2010. I have Windows set to display all file suffixes; not sure how you have yours set.
 
Funnyfarm: I simply renamed the im file to have a pm suffix while I had it in the temp1/sd40-2_shadow folder outside Trainz. I tried the file with an im suffix but the error was still there. I see no way to rename anything in the config file. The asset is looking for a pm file and will not accept anything else. This worked for me in 2010 but, as I said, I do not know whether it will work in 2012. I got a warning that if I changed the file suffix the file might not work but I renamed it anyhow and it did work in 2010. I have Windows set to display all file suffixes; not sure how you have yours set.

This really isn't the best way to do things. Renaming the file only confuses the program because PMs load poorly in the newer versions of the game. By creating a proper IM file, you are future-proof and the content won't have any problems going forward.

John
 
JCitron, normally I would not question the experts. But, pull down the SD40-2b by Phil_C (kuid:86105:6212) and see if you can get it to work with an IM shadow file. This is an old Trainz-Build 1.3 asset. There is no PM file to convert to IM. I tried adding your mesh_table and a shadow IM file from a SD40-2b built to work in TS2010/12 (everything renamed to match what this asset is looking for) and the same errors are still there. It is looking for a PM file and cannot find it. Based on what is in the config file and asset folder, I'm not sure what is telling it the supposed location of the shadow PM file, but it is demanding a sd40-2b_shadow/sd40-2b_shadow.pm file.

funnyfarm: What is the kuid # of the sd40-2b giving you problems and is it from the DLS? It may look differently than the Phil_C model.
 
Last edited:
That may be a different problem. Use PEV's Quickshadows tool and point the shadow entry in the config file to the shadow.im file that the tool creates.

Shane
 
What JCitron says is correct. I think where you might be going wrong is copying a shadow file from another asset which does not quite match your asset. Also you might not have created the mesh-table correctly, it might be pointing to the wrong folders.

To correct kuid:86105:6212

Use PEV's PM2IM utility to convert the .pm file in the body folder to a .im file you can then use PEV's Quickshadow utility to create a shadow .im file.

Next step is to add a mesh-table in the config.txt file as shown below.



mesh-table
{
default
{
mesh "sd40-2b_body/sd40-2b_body.im"
auto-create 1
}

shadow
{
mesh "sd40-2b_body/shadow.im"
}
}


If you have Asset-X this can all be done for you.

Note that Quickshadow has created the shadow.im in the body folder and so the mesh-table points to that folder for the shadow.
 
JCitron, normally I would not question the experts. But, pull down the SD40-2b by Phil_C (kuid:86105:6212) and see if you can get it to work with an IM shadow file. This is an old Trainz-Build 1.3 asset. There is no PM file to convert to IM. I tried adding your mesh_table and a shadow IM file from a SD40-2b built to work in TS2010/12 (everything renamed to match what this asset is looking for) and the same errors are still there. It is looking for a PM file and cannot find it. Based on what is in the config file and asset folder, I'm not sure what is telling it the supposed location of the shadow PM file, but it is demanding a sd40-2b_shadow/sd40-2b_shadow.pm file.

For the above. Ran it through AssetX to bring it up to a more current state, Pm2IM couldn't find the pm, been here before so renamed the pm file to im then ran pm2im on it, that works for some obscure reason, perhaps it actually is an IM file with the wrong extension? then ran quickshadows on it, job done.
The OP's problem may be similar?
 
For the above. Ran it through AssetX to bring it up to a more current state, Pm2IM couldn't find the pm, been here before so renamed the pm file to im then ran pm2im on it, that works for some obscure reason, perhaps it actually is an IM file with the wrong extension? then ran quickshadows on it, job done.
The OP's problem may be similar?

That's interesting. I've never seen that one before.

John
 
Back
Top