@RanchBurner: Go
Actually I think the solution for your problem might be doing the opposite. The m3 format only allowed a limited amount of vertices and bones per mesh. So complex models have to be splitted into multiple meshes. Can you send me a link to the model via PM? Then I can have a look and check if you are really hitting some kind of m3 limitiation or if it's a bug in my m3addon.
I'm working on a plugin for skyrim and I can upload it if you wan't to take a look at it
BTW making a new one with a more simple setup for the entire file
But the strange is that the old script works on x86 and not on x64 and sometimes it works om a file with 6 meshes and in the other case on one with 3 meshes and no more
Since i'm a programmer I can probably fix this by modifying the code but now i have a new structure so I'll work from that plan instead of the old and failing one
but this resulting in that I can currently only export the header in the file (can be opened in Nifscope a tool for skyrim meshes)
You said the m3 have a max number of vertices in one mesh how many is it cause there is the same in skyrim and there it is a limitation of 65535 the length of a ushort
Currently I am not interested in modding Skyrim. However if you want to help improving the m3addon, feel free to contact me via PM. I am sure I can find some time to introduce you into the code. There is still a lot to implement. E.g. lights, ribbons, better visualization for bounding boxes, particle areas and attachment volumes. Some are really easy to add. Currently I am working on the issue that the global loop animations override all other exported animations.
I understand that you are not interested in the Skyrim plugin but it was only a thought I had. (If you don't ask you never know)
But you said that the Global Loop override all other animations. Seems like a big issue... I can take a look at the code if you like. but i'm not really familiar with the m3 format so it may be hard for me to find anything useful. Please tell me if there is anything i should know about before I stare searching for the problem. I'll have a quick look now.
The models you sent me look like models with a high polygon count.
Can you check how many vertices the models have? Blender displays the Vertex count in the top right corner (The "Ve" value).I guess it are more then about 10.000 vertices. Am I right?
If your model has really a lot of vertices or polygons I would recommend you to generate (or create) a low poly version of the model and then Bake textures for it. The following tutorial explains the proceess of creating a low poly version of a high polygon model:
I also have a textures question: when I export the coin as m3, should I be able to import it back and have the textures appear? When I try to import coin.m3 back into blender, the texture no longer appears.
So when I import an m3 (or any file) I have to set up all of the materials and textures manually? I'm not even sure how to do this for the coin model (save recreating the texture entirely), let alone for existing models which might have complicated material/texture information.
For reexporting as an m3 file you don't need to setup the materails and textures manually again. For actually rendering the object in Blender you have to setup materials and textures yes. Currently materials (and a lot more) get imported as custom data of which Blender doesn't know what it's meaning is. Real Blender materials don't get created at import.
Ok, I think I understand that. But if want to import a model from another format, I only have existing Blender materials. Is there some systematic way of converting these into m3 materials? So far, I have tried the following:
Create an m3 material for each Blender material.
Set the diffuse image path of the m3 material to that of its corresponding Blender material.
Set the M3 Material of each Blender material to its corresponding m3 material.
So far, exactly one of my 4 meshes has its texture rendered properly in SC2. I'll continue trying to manually adjust the m3 materials... But it really seems to me that converting Blender materials to m3 materials is something that the m3addon should do automatically.
Edit: Well, after doing the same thing over and over, I finally figured out the problem... the SC2 editor needed to be restarted. Now give me a moment to bang my head against a hard object one more time.
Okay! So doing the above 3 steps does indeed work. However, now that I can actually see the textures of my model in the SC2 editor, I can see that the geometry itself is messed up. Many of the vertices are simply in the wrong places, as if the actual wires of the wireframe were randomly bent.
Does your model have modifieres? They could cause problems. Also it's a good idea to export while being in object mode. That's just 2 guesses what can be the cause. Without having the actual model I can't tell what's wrong.
You could also try what happens if you reimport the broken model back into Blender.
The material conversion could be automated, but currently I have other things I want to fix first in my spare free time. If you want it badly you could fix it yourself. Afterwards I could then integrate your change in the m3addon. If you want help getting started with it let me know.
I assume that by modifiers you mean the Object Modifiers tab with the wrench? There doesn't appear to be anything there. And I did export in Object Mode. Interestingly, re-importing the m3 file showed the geometry perfectly intact.
As for automating the conversion, I was already planning on writing the code myself if it turned out that the m3addon didn't already have the functionality. Unfortunately, I'm not familiar with either blender or the code for your m3addon, so some pointers for getting started would be very much appreciated.
Hi. I've been testing out this addon, and seem to have an issue with normal mapping.
I imported the .m3 from the "Temple Bridge Broken" doodad into Blender then tried to export it back into the editor via the add-on. This works ok, but the model doesn't appear to be normal mapped at all when displayed in the editor (see attachment for screenshot - imported bottom left, original top right).
Is there something else I need to do in the editor or add-on settings to get this working?
EDIT: disregard this post - turns out this was just the "unapplied scale" issue mentioned on the previous page, and could be fixed by changing the custom bone property. :)
I'm having another issue as well, with an animated part being scaled weirdly.
In blender, when I import the Temple Bridge Broken model, the glowy crystal on top of the bridge pillar is scaled wrongly (by 2.67 in x and y and 4.58 in z - see attached image). This is done through the posed bones - if I change the scale of the bones back to 1.0 then it displays properly in blender (second image).
Unfortunately, when I correct the scale in Blender and import back into the SC2 editor, the mesh is scaled down by the corresponding amount, and the crystal is really tiny instead. It seems like there's maybe some hidden scale being applied to the model / bones on import?
Hi, I fixed your issue with the "Temple Bridge Broken". The m3addon imports and exports now a new flag. The new flag is called "Dark Normal Mapping" and is a material property. I am not 100% what it does, but it seems to result in a darker shading. Maybe it's some kind of advanced normal mapping which just looks differnent then the usual normal mapping.
@RanchBurner: Go Actually I think the solution for your problem might be doing the opposite. The m3 format only allowed a limited amount of vertices and bones per mesh. So complex models have to be splitted into multiple meshes. Can you send me a link to the model via PM? Then I can have a look and check if you are really hitting some kind of m3 limitiation or if it's a bug in my m3addon.
@chaos2night: Go
On what kind of plugin are you working on?
@println: Go
I'm working on a plugin for skyrim and I can upload it if you wan't to take a look at it
BTW making a new one with a more simple setup for the entire file
But the strange is that the old script works on x86 and not on x64 and sometimes it works om a file with 6 meshes and in the other case on one with 3 meshes and no more
Since i'm a programmer I can probably fix this by modifying the code but now i have a new structure so I'll work from that plan instead of the old and failing one
but this resulting in that I can currently only export the header in the file (can be opened in Nifscope a tool for skyrim meshes)
You said the m3 have a max number of vertices in one mesh how many is it cause there is the same in skyrim and there it is a limitation of 65535 the length of a ushort
Please ask more if you are interested
@RanchBurner: Go
What I meant by merging was that my own script would work and not fail and crash blender :( I thought my script was so good but apparently not.
@chaos2night: Go
Currently I am not interested in modding Skyrim. However if you want to help improving the m3addon, feel free to contact me via PM. I am sure I can find some time to introduce you into the code. There is still a lot to implement. E.g. lights, ribbons, better visualization for bounding boxes, particle areas and attachment volumes. Some are really easy to add. Currently I am working on the issue that the global loop animations override all other exported animations.
@println: Go
I understand that you are not interested in the Skyrim plugin but it was only a thought I had. (If you don't ask you never know)
But you said that the Global Loop override all other animations. Seems like a big issue... I can take a look at the code if you like. but i'm not really familiar with the m3 format so it may be hard for me to find anything useful. Please tell me if there is anything i should know about before I stare searching for the problem. I'll have a quick look now.
EDIT: Which of the check-boxes is global loop
@RanchBurner: Go
The models you sent me look like models with a high polygon count. Can you check how many vertices the models have? Blender displays the Vertex count in the top right corner (The "Ve" value).I guess it are more then about 10.000 vertices. Am I right?
If your model has really a lot of vertices or polygons I would recommend you to generate (or create) a low poly version of the model and then Bake textures for it. The following tutorial explains the proceess of creating a low poly version of a high polygon model:
@println: Go
Yep. Way over 10,000 vertices. Some over 30,000! o_o
Hey PrintIn we are counting on you and Leruster to add support for HoTS models ;-)
Hey guys, solving one of the errors I posted went far with me trying to export some other models. So thanks again... :)
I also have a textures question: when I export the coin as m3, should I be able to import it back and have the textures appear? When I try to import coin.m3 back into blender, the texture no longer appears.
@XPilot: Go
M3 files don't contain the actual textures. Currently the m3 importer does not import external images, instead it just imports the image path.
@println: Go
So when I import an m3 (or any file) I have to set up all of the materials and textures manually? I'm not even sure how to do this for the coin model (save recreating the texture entirely), let alone for existing models which might have complicated material/texture information.
@XPilot: Go
For reexporting as an m3 file you don't need to setup the materails and textures manually again. For actually rendering the object in Blender you have to setup materials and textures yes. Currently materials (and a lot more) get imported as custom data of which Blender doesn't know what it's meaning is. Real Blender materials don't get created at import.
Ok, I think I understand that. But if want to import a model from another format, I only have existing Blender materials. Is there some systematic way of converting these into m3 materials? So far, I have tried the following:
So far, exactly one of my 4 meshes has its texture rendered properly in SC2. I'll continue trying to manually adjust the m3 materials... But it really seems to me that converting Blender materials to m3 materials is something that the m3addon should do automatically.
Edit: Well, after doing the same thing over and over, I finally figured out the problem... the SC2 editor needed to be restarted. Now give me a moment to bang my head against a hard object one more time.
Okay! So doing the above 3 steps does indeed work. However, now that I can actually see the textures of my model in the SC2 editor, I can see that the geometry itself is messed up. Many of the vertices are simply in the wrong places, as if the actual wires of the wireframe were randomly bent.
@XPilot: Go
Does your model have modifieres? They could cause problems. Also it's a good idea to export while being in object mode. That's just 2 guesses what can be the cause. Without having the actual model I can't tell what's wrong.
You could also try what happens if you reimport the broken model back into Blender.
The material conversion could be automated, but currently I have other things I want to fix first in my spare free time. If you want it badly you could fix it yourself. Afterwards I could then integrate your change in the m3addon. If you want help getting started with it let me know.
@println: Go
I assume that by modifiers you mean the Object Modifiers tab with the wrench? There doesn't appear to be anything there. And I did export in Object Mode. Interestingly, re-importing the m3 file showed the geometry perfectly intact.
As for automating the conversion, I was already planning on writing the code myself if it turned out that the m3addon didn't already have the functionality. Unfortunately, I'm not familiar with either blender or the code for your m3addon, so some pointers for getting started would be very much appreciated.
Hi. I've been testing out this addon, and seem to have an issue with normal mapping.
I imported the .m3 from the "Temple Bridge Broken" doodad into Blender then tried to export it back into the editor via the add-on. This works ok, but the model doesn't appear to be normal mapped at all when displayed in the editor (see attachment for screenshot - imported bottom left, original top right).
Is there something else I need to do in the editor or add-on settings to get this working?
EDIT: disregard this post - turns out this was just the "unapplied scale" issue mentioned on the previous page, and could be fixed by changing the custom bone property. :)
I'm having another issue as well, with an animated part being scaled weirdly.
In blender, when I import the Temple Bridge Broken model, the glowy crystal on top of the bridge pillar is scaled wrongly (by 2.67 in x and y and 4.58 in z - see attached image). This is done through the posed bones - if I change the scale of the bones back to 1.0 then it displays properly in blender (second image).
Unfortunately, when I correct the scale in Blender and import back into the SC2 editor, the mesh is scaled down by the corresponding amount, and the crystal is really tiny instead. It seems like there's maybe some hidden scale being applied to the model / bones on import?
@netherh: Go
Hi, I fixed your issue with the "Temple Bridge Broken". The m3addon imports and exports now a new flag. The new flag is called "Dark Normal Mapping" and is a material property. I am not 100% what it does, but it seems to result in a darker shading. Maybe it's some kind of advanced normal mapping which just looks differnent then the usual normal mapping.
@println: Go
Thanks, that works nicely. :)
I introduced two people to the code of the m3addon. One of them, chaos2night, added import and export support for lights :D.