• This is a read only backup of the old Emudevs forum. If you want to have anything removed, please message me on Discord: KittyKaev

Sword made in Blender

Tok124

Respected Member
Drop your M2 file into a text editor and do a search for .blp and figure out what the folder/file it's looking in for the texture. Chances are you just have your texture in the wrong place. also did you convert it to a BLP?
Yeah, I did convert it. Is it possible to read the M2 files? didnt know that. I will have a look :)

I just tried to open M2 file with Notepad++ and it's not readable.

Anyway, I'm currently working on a Head. So i did try again and the texture is still not applied. But i use Blender 2.70 and it seems like they replaced option "Include Normals" with "Write Normals" Not sure if that could be the reason. My settings looks like this
Y0GLTku.png


And after exporting the mtl file looks like this
# Blender MTL File: 'None'
# Material Count: 1

newmtl Material.001
Ns 96.078431
Ka 0.000000 0.000000 0.000000
Kd 0.640000 0.640000 0.640000
Ks 0.500000 0.500000 0.500000
Ni 1.000000
d 1.000000
illum 2
map_Kd head.png

So the newmtl shows Material.001 instead of the name of the texture. I tried to change that to the name of my texture (I did not include .png because i saw that you didnt have .png after newmtl), Anyway. That didnt really solve my problem either.

I tried to apply every type of texture option in Blender but nothing changed. So it must be when i Export the Model. Maybe i should try another Blender version?
 
Last edited:

Anthonys-Toolbox

Epic Member
Yeah, I did convert it. Is it possible to read the M2 files? didnt know that. I will have a look :)

I just tried to open M2 file with Notepad++ and it's not readable

You don't read it, however the blp data is in text form. like the weapon I made of your model that I sent you, when I look for .blp, it brings me to this:

ga7Jx.png

As you can see the texture it looks for is mycustoms\diff.blp

Meaning the folder mycustoms must be at the front of the patch with the diff.blp texture inside of it.

It does not say anything like items\weapon\mycustoms\diff.blp, so if you have your texture folder in some sort of folder arrangement where the m2 isn't looking for it, that's whyyou have a green look, and or if you have your texture a different name than what is set into the m2, that's also why.
 

Tok124

Respected Member
You don't read it, however the blp data is in text form. like the weapon I made of your model that I sent you, when I look for .blp, it brings me to this:

ga7Jx.png

As you can see the texture it looks for is mycustoms\diff.blp

Meaning the folder mycustoms must be at the front of the patch with the diff.blp texture inside of it.

It does not say anything like items\weapon\mycustoms\diff.blp, so if you have your texture folder in some sort of folder arrangement where the m2 isn't looking for it, that's whyyou have a green look, and or if you have your texture a different name than what is set into the m2, that's also why.
Well yeah. For some wierd reason it set it to the name of the material instead of the name of the texture. I tried to edit that and import but i think i messed up something earlyer

Ok, The model is not visible if i change that in the file so i gotta find another way to solve that :/

And yeah, I did type the correct command when converting obj to m2. I typed "OBJtoM2 myfile.obj Helm_Plate_Headless_D_01 foldername\"
and there were no errors when i exported
 
Last edited:

Anthonys-Toolbox

Epic Member
And yeah, I did type the correct command when converting obj to m2. I typed "OBJtoM2 myfile.obj Helm_Plate_Headless_D_01 foldername\"

If you did indeed type it as foldername\

that means the the texture must be in your MPQ patch's folder called foldername

gaiu7.png


Well yeah. For some wierd reason it set it to the name of the material instead of the name of the texture

So your point? Why not just rename your Texture FILE to the name it's looking for to solve your problem? As for it using the name of the material, that's how it works. That's why I chose to rename my material to match my texture just to alleviate confusion. I didn't feel I had to comment on why I did that, people eventually figure it out and make one small adjustment to their practice, such as you should have by now. If not, hopefully you got it now.

You gotta realize one thing, I'm not being rude or cold or harsh, I'm just speaking from a point of view where I didn't have any assistance, didn't have any help or tutorials, I had to figure out all of it on my own since I used different applications compared to Garthog's initial 3DS Max > obj export information, he may have blender info now but that wasn't there initially. Most people tend to "Self Correct" when they hit issues, by self correct I mean your little comment about the blp name not being your image file's name but rather the material, that's not that big of a deal, just change your work flow by one thing(keep your material and texture filenames the same) and you're fine. Carry on.

The model is not visible if i change that in the file so i gotta find another way to solve that.

You can't just blindly modify the text data in the m2 file. Everything is set up in a very specific pattern, If you make the file bigger or smaller than it originally was(by adding more letters or taking away letters or shortening it or making it longer), you are inadvertently changing the pattern structure of the file. Since you changed the structure of the file, and you aren't changing the information in the header to correspond with the change, you will in turn break the m2 file. The Header Information is basically like a roadmap to where various places are in the file and exactly how big or small they are and exactly where the next piece of information starts or ends., If you modify stuff by doing what you did, naturally the map will now be wrong and various points of interests in the file will now be mis-aligned since you have either shortened or grown some areas and everything is now wrong. This is how you get Corrupted Files, when a Change in a file is made and the handlers for the file isn't updated, things go to hell pretty instantaneously.

I do not recommend you learning how the structure of an M2 file works unless you plan to get into making your own tool for generating m2 files, just change your workflow a bit to wrinkle out any loose ends that are being caused by your current work flow.

Good day. :)
 
Last edited:

Tok124

Respected Member
If you did indeed type it as foldername\

that means the the texture must be in your MPQ patch's folder called foldername

gaiu7.png




So your point? Why not just rename your Texture FILE to the name it's looking for to solve your problem? As for it using the name of the material, that's how it works. That's why I chose to rename my material to match my texture just to alleviate confusion. I didn't feel I had to comment on why I did that, people eventually figure it out and make one small adjustment to their practice, such as you should have by now. If not, hopefully you got it now.

You gotta realize one thing, I'm not being rude or cold or harsh, I'm just speaking from a point of view where I didn't have any assistance, didn't have any help or tutorials, I had to figure out all of it on my own since I used different applications compared to Garthog's initial 3DS Max > obj export information, he may have blender info now but that wasn't there initially. Most people tend to "Self Correct" when they hit issues, by self correct I mean your little comment about the blp name not being your image file's name but rather the material, that's not that big of a deal, just change your work flow by one thing(keep your material and texture filenames the same) and you're fine. Carry on.



You can't just blindly modify the text data in the m2 file. Everything is set up in a very specific pattern, If you make the file bigger or smaller than it originally was(by adding more letters or taking away letters or shortening it or making it longer), you are inadvertently changing the pattern structure of the file. Since you changed the structure of the file, and you aren't changing the information in the header to correspond with the change, you will in turn break the m2 file. The Header Information is basically like a roadmap to where various places are in the file and exactly how big or small they are and exactly where the next piece of information starts or ends., If you modify stuff by doing what you did, naturally the map will now be wrong and various points of interests in the file will now be mis-aligned since you have either shortened or grown some areas and everything is now wrong. This is how you get Corrupted Files, when a Change in a file is made and the handlers for the file isn't updated, things go to hell pretty instantaneously.

I do not recommend you learning how the structure of an M2 file works unless you plan to get into making your own tool for generating m2 files, just change your workflow a bit to wrinkle out any loose ends that are being caused by your current work flow.

Good day. :)
I didnt actually use the name "foldername" it was just a random name to let you know that it was the name of the folder. I did add the blp texture in that folder. But okey, I think i got all info i need. I'm too lazy to work more on it now. I try again later. Anyway, I also downloaded 2.69 Blender. I noticed that everyone who are converting files to M2 use 2.69 so i downloaded it myself.

Thanks for all help mate :)
 
Top