Jump to content

Problems generating .mat files, when the sourcefiles has a "_" in its name


Mordred
 Share

Recommended Posts

Hello fellow Leadwerkers,

 

i had this issue several times now and i saw that it always happens if a source texturefile has an "_" (underscore) in its name. For e.g. grass_a.tex and grass_b.tex will both be saved as "grass.mat" and thus overwriting eachother.

 

Someone else here who might confirm that issue?

 

I did try to rename the sourcefiles before importing them into leadwerks. I did remove the underscore, so they were named like grassa.tex and grassb.tex and i had no further issues generating the .mat files, so it seems to be a bug to me.

Link to comment
Share on other sites

Could you try this too? Import a 2nd file that's called map_test_map_2.jpg, that you should get the message that "map_test_map.mat" already exists (be aware, it say's: "map_test_map.mat" he, does remove the "_2" in the name.

 

[Edit] Okay, now that's strange, if i use .jpg files i do not have that issue too, but if i use the textures added to this posting, i do have the problem.

Link to comment
Share on other sites

I just tested and been able to generate materials in LE3 from the two textures without any problem.

do you use Steam Leadwerks 3.1 version ?

 

Note :

I noticed you had grass_d that have alpha texture, strange for a diffuse texture for floor ? should not it be plain texture without alpha , would be better no ?

Stop toying and make games

Link to comment
Share on other sites

Hi YouGroove,

 

yes i do use the Steam Leadwerks 3.1 edition, right no in it's beta branch, but i had the same issue in the release branch too. You did take those 2 textures i added to the posting, yes? And no issues at all? Than i'm wondering why it keeps telling me that "grassdirt.mat" already exists and want's to overwrite it. Maybe i'm doing smth. wrong?

 

I do extract the zip archive, i then copy both files into some folder in my leadwerks project (does it matter if it's a subfolder of "materials" or can i copy them anywhere? Actually i have a folder "new assets" added, but that's not a subfolder of "materials"). Leadwerks is going to convert the files after that into .tex format and than i just right click both textures and select "generate material", the material window pops up, i do this with the 2nd. .tex file and get the message "grassdirt.mat already exists, do you want to overwrite it?".

Link to comment
Share on other sites

You did take those 2 textures i added to the posting, yes? And no issues at all? Than i'm wondering why it keeps telling me that "grassdirt.mat" already exists and want's to overwrite it. Maybe i'm doing smth. wrong?

 

To make it simple and clear :

i use Leadwerks 3.1 Steam, not Beta.

I taken one texture than generate material , all is ok.

I select your second texture, the material generator proposes the same name for material that will overwrite first one.Must be a bug naming in material auto generation.

 

Two solutions :

1 ) Auto generate first mat than change it's name.

2 ) Create NEW material with a name you give to it.

 

Last thing : you can post a bug report about the name suggested by the Auto generation of material if you use a lot AutoGenerate material.

Stop toying and make games

Link to comment
Share on other sites

Must be a bug naming in material auto generation.

 

Yea, okay, in this case i'm in the right place, since this is the "Bug report" forum. Thus it seems as if you were able to confirm my first thought that it might be a bug.

 

Thanks.

 

P.S. Surely the workarounds you mentioned work, but they might result in other problems. Anyways, i can work that out for now, but it would be far easier if the .mat file would be generated without the need to rename anything.

  • Upvote 1
Link to comment
Share on other sites

Can you list a file name that will definitely cause this problem?

 

When generating materials, the editor looks at file names in the same folder and guesses what the suffix of the file name might be. For example, if you have "grass01_d.tex", and "grass01_n.tex", the editor will guess that those are meant to be the diffuse and normal textures of a material called "grass01.mat".

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

Well, in this example case it's grassdirt_d.tex and grassdirt_h.tex

followed by, but not only: grassdirt_s.tex, (new model --> generated .mat file will be tree2branch.mat) tree2branch_d.text, tree2branch_n.tex (that's actuall really a "normal" file), tree2branch_s.tex, [...] the list continues. But every single example i had issues with had an "underscore" in its name.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...