"Material already exists, and will not be saved again"

Discuss ZModeler 1 series issues here, ask for help and help others to become advanced users

Moderator: Oleg

ZModelerUser897342
Posts: 5
Joined: Tue Apr 14, 2020 8:09 am

"Material already exists, and will not be saved again"

Post by ZModelerUser897342 »

Hi,

I'm using ZModeler v1.07b, and fixing a body of a bus for OMSI 2.

The bus body is split into two files - one file has the front and back, and another file has the left and right walls, etc. Then both are loaded ingame, and they combine seamlessly.

There is also another unused file with both parts combined, but it has some slight improvements in the front and back details, which I want to use instead.

However, because the original file with only the left and right walls is the only file with the rear door gap correctly added in, I need to essentially recreate the file with only the front and back of the body, using the unused file with the whole body and the minor improvements, by deleting the left and right side walls. Then replace this with the one used ingame.

----------------------------

NOTE: The only process for all OMSI model editing is:

1. Export OMSI .o3d to Waveform .obj using 3D Object Converter

2. Import .obj to a new file in ZModeler 2 (I'm using 2.26 Build 981)

3. Make your edits

4. Export to .z3d (old files)

5. Open in ZModeler 1 (I'm using v1.07b)

6. Select Left view > rotate -90 degrees (this doesn't work correctly when using dialog for some reason, but I do it by hand precisely and it seems to be fine)

7. Select Front view > rotate 180 degrees

8. Export to .x

9. Convert .x to .o3d (using a non-ZModeler tool)

----------------------------

Now, this sounds complicated, but it works absolutely perfect.

First time, it worked great. It shows in OMSI, all textures work, but there are a few gaps because of small differences between the models as mentioned above (NOT because of any conversion errors).

So, to solve this, I made a new ZModeler 2 project, imported BOTH the unused file with all of the body in one, and the file with only the front and back of the bus body, and deleted the left and right walls, and duplicate parts (one over the other), so that only the missing parts were added.

This worked well, as initially, without deleting anything, there was flickering ingame as two models were being displayed in the same place, but after deleting the duplicates and the unneeded stuff, flickering was gone completely.

HOWEVER there was a huge issue - the textures on the front and back of the bus (the only part involved in this entire post), were all using the completely wrong files.

HERE IS WHY:

When I exported to .x from ZModeler v1.07b, I got about 10 of these errors:

Image

"Material x already exists, and will not be saved again"

Now, I assumed its the cause of the texture issue, and its happening because I imported two bus bodies into one model.

However, I deleted all the duplicates I found (in Step 3 above)! Whats more - the SAME NUMBER of errors appeared when exporting (still ZModeler 1, to confirm), before AND after I deleted all the duplicate body parts I could find!

I went back to Step 3 to check again for dupes, and there were none. However, I noticed in the left sidebar that a lot of materials had the same name:

Image

So I thought this was the issue, and gave each and every element a unique name, as shown below:

Image

I re-exported to old z3d files, and opened in ZModeler v1.07b, and tried to export to .x, but the same issue occured!

Even though the renames worked:

Image

It was still throwing up the exact same errors, but with the OLD names!:

Image

Yes, it was still saying names like Material_9 instead of Material_9a.

I triple checked ALL the material names so carefully but all of them were unique..

Now I don't know what to do. I googled and googled, checked all options, even checked the .ini file in notepad, and searched this forum in every way I could but can't find a solution. Here is my question:

Is there any way to fix this, or force ZModeler v1.07b to export absolutely everything? Or does it not just work like that?

I really await your reply.

Thanks for all help in advance.

P.S I notice that the developer Oleg is still going through every forum, even ZModeler 1, and answering questions regularly, and every question is so detailed and in depth and considers their problem so well. I am stunned, this is extremely selfless, rare and kind, and definitely does NOT go unnoticed. Thank you so much for your efforts!!
User avatar
Oleg
Site Admin
Posts: 14044
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: "Material already exists, and will not be saved again"

Post by Oleg »

I don't know anything on his conversion chain, a lot of conversion steps involved here. My guess is that you should give unique names to materials too (in Materials browser). There should be no error message referring to an object "Material_9" if you've exported a scene that has no such an object name.
ZModelerUser897342
Posts: 5
Joined: Tue Apr 14, 2020 8:09 am

Re: "Material already exists, and will not be saved again"

Post by ZModelerUser897342 »

Oleg wrote:I don't know anything on his conversion chain, a lot of conversion steps involved here. My guess is that you should give unique names to materials too (in Materials browser). There should be no error message referring to an object "Material_9" if you've exported a scene that has no such an object name.
Thank you so much. This was the exact solution. Really appreciate your near instant and fast and spot on reply! You're the best!! Actually I was a newbie to ZModeler, and didn't realise that although the model bits are named Material_x in my file, they aren't actual materials / textures, those are in another menu.

Info for other newbies viewing this thread - the material names aren't stored in the file.

If you rename the materials in the material editor, and close, you won't be asked to save, and the file modified date won't change, nothing is written to the file.

You have to open the file, and right before you export (for me, in ZModeler 1), you have to open View > Materials Editor... and rename each material so it is unique. THEN it will work.

Thanks again Oleg! :)
Post Reply