I'll add specular functionality in the next update, fairly easy to do. I'll just be using max's spec level. As for Specularity and HDR spec multiplier, should they both be set to 1 for the mean time? I think I'll have to design some UI to adjust these custom kind of settings as max doesn't support them natively. I'll figure something out. I'm not much good when it comes to materials and such, you'll have to give me feedback so I can get that part of the exporter right.
I'll look into the emissive shaders and being able to adjust them. I'm really hoping I can setup a UI with the M3 material settings incorporated so you can adjust things such as priority and whether team colour is used for the bitmap alpha and such.
Team colours are done via the alpha channels I believe, so you're correct. Materials that use the alpha channel for team colours require a flag switched that my exporter currently doesn't do. I should be able to add it in for the next update.
I've looked at the billboards, they're pretty cool. Animated textures shouldn't be a problem. I'm impressed with the formats the engine is willing to support. I didn't think .png would work but it does. There's probably flags that setup and allow animated textures. I'll check out the billboard models and see what I can figure out.
I'll look into the problem but could you list the steps you're doing for exporting. The steps should be:
Use an 'editable_mesh' for your mesh.
Use 'Multimaterial' material, with the UI set to the one you're using.
For each material in the multimaterials, use 'Standard' materials and use bitmaps for the maps (diffuse, specular, etc). Apply these maps to the parts of your mesh you want. Each material in the multimaterials represents a 'submesh' of the main mesh for the exporter.
Honestly, i'm not too certain what the HDR spec does, might use some external texture based on the level tileset to give it a sort of "cube map" effect, it's a cheap way of making something look reflective.
In the meantime speculatiry I would think specularity would be fine set to 1 (I'm assuming it's just the multiplier for spec power), we can just darken our specs in photoshop to adjust the level of spec. As stated i'm not sure what would happen if HDR was set to one, could throw things off, make everything look like reflective metal but i'm not entirely sure.
Thanks for keeping us in the loop and all the hard work! If you don't mind me asking, I'm kinda curious as to what the drive behind this exporter project? You working on a mod NiNtoxicated?, looking to be a technical artist and this is a side project? Always wondered why people spend so much time for cool free stuff we get to use ;) Regardless it's much appreciated!
I'm having issues getting Spec Maps and Normal Maps working, however. I'm using a Multishader and the Diffuse map works perfectly. I have tried plugging the Spec map into the Specular channel and Normal Map into Bump Map channel (using Tangent space normals). The exporter hiccups at the normal map when I try to export this. Even when I export without a Normal Map, the Spec map doesn't seem to work. I've tried using .dds and .tga, 512X512 maps.
-Edit- Figured out the Normal issue. Had to change it to "Bitmap" type instead of "Normal Bump". Shows in game now. Still trying to figure out my Specular issue.
-2nd edit- Okay going through older posts, seems like Specular isn't fully supported by the script. That's cool.
One added issue. The lighting affecting my custom unit seems to be different from other units in game; the lighting falloff is a lot sharper and makes my model look 'darker' when not in the light. Wondering if this has to do with the default shaders being exported not being the same as the ones the SC2 ones are exported; and if there's any way to tweak this.
a friend helps me with 3Ds and the exporter to convert my old Wc3 models into m3. But there is one thing which won't work.
Dou you guys remember the material setting in Wc3 called 'Unshaded'? I think it was even in 3Ds.
I informed me that it is equal to 100% Self-Illumination. So what do we have to do to export "unshaded" or change something in the .m3 file?
That would help me a lot!
I appreciate your help :)
My motivation for the script is hard to pinpoint exactly. I like to create and design tools, but I'm not quite able to step up to C plus and do proper programming. Maxscript is really fun to work with. It's forgiving and flexible, my only qualms is that it can be inconveniently slow and accessing and setting some of 3ds max's settings can be a nightmare (don't get me started on vertex normals...). However I enjoy overcoming the technical hurdles and the challenges involved. I also love models, especially highly detailed ones such as the ones from WoW and first person shooters in general. I know there are artist rights at hand, but I find it frustrating that such great models can be limited to one game. Ontop of all these reasons, I have lots of affection for SC and its universe, so I have a fascination with SC2 and its models I guess you could say.
I'm working on a big update that's on the verge of release. Basically for materials I discovered maxscript provides plugins that you can use to extend the native material types. I've used this to create custom materials that hold all the custom kind of settings that M3's have, and a custom bitmap too that allows you set layer properties such as if it uses the material alpha to render team colour and texture wrapping. You'll still be using a multimaterial for the submeshes, but each mulimaterial will be of the 'Starcraft 2' type and you'll use a 'Starcraft 2 Map' for each map (diffuse, spec, emissive, etc). I'm looking forward to this update as the custom materials are exactly what I've been wanting to implement from the outset.
Similar to above, you'll be able to set materials to 'Unshaded' via the custom material flags once the new update is done. I hope to get it out soon so stay tuned.
Thanks, I hope we will see that update soon :) Keep up your work, hope that I will have in the near future the same interest & time to write some model stuff scripts like you :x Well then, I hope to see your updated exporter, it's atm. totally awesome, waiting on StarTools sucks :D
Update is up and waiting for approval. The new file has an extra script, sc2_objects.ms. If you place it in your 3ds max plugins directory it'll allow you to use custom Starcraft 2 materials that lets you tweak the material settings. There's also a custom map type which allows you to set team colour and texture wrapping for a bitmap. The map type will be expanded upon later. Enjoy :D
I'm playing around with the script right now. Emmissive seems to work (Self Illuminate in Max), though I still can't get Specularity to work. The map is applied but the Spec value in the SC2Edit Previewer has Spec set at 0.00. I'll test out custom shaders in a bit.
-Edit- Woo! Works great :D
Specularity issues were fixed by using the Starcraft 2 shader. The SC2 shader seemed to fix the diffuse lighting fall off as well, so it looks like other units.
I've got a weird problem. My model is always brighter(totally!) in the editor than in the 3Ds preview. Does Self-Illuminace work right?
I tried different settings :/ Well, I'll try more settings in that time.
Great way to debug your shaders is to cycle shader types in the previewer (S and Shift + S). You can see what you're looking at below, be it emisive or whatever.
@crazyfingers619: Looks kewl even without details.
Great way to debug your shaders is to cycle shader types in the previewer (S and Shift + S). You can see what you're looking at below, be it emisive or whatever.
That helped me a lot, but now I wonder how I can apply different shaders in 3Ds or in the editor? That is all what I want to know, would help me a lot...
For example I would like to have Emissive only
-------
I've read your posts again and I want to know how you did that:
Specularity issues were fixed by using the Starcraft 2 shader. The SC2 shader seemed to fix the diffuse lighting fall off as well, so it looks like other units.
How do you do that ?!
Maybe I explain again what I want to do:
I've got a model and I want that the model will be exported with 100% Self-Illuminace and it must be like in 3Ds with the same lightning(100% Self-Illu = No lightning ;) ). Hope you can explain how you did that.
Where your material ID 1 texture is, change the material in there from "standard" material to "starcraft 2" material. Didn't realize this right away myself.
If you want just an emmisive plug in just your emmisive texture and leave the rest blank, at least I *think* that's what you were asking
>Where your material ID 1 texture is
Oh boy, finally found that. It is very important to change it there and not in the maps brackets. You saved my day(s?) :)
Edit: Holy crap! It works :) No diffuse, only emissive.
Diffuse + Emissive :)
So with the current state of the importer and exporter is it possible to import a SCII .m3 unit model, rotate it 90 degrees along Y and export it out? I tried importing just a regular Phoenix.m3, import and rotate 90 degrees, but when I export I get some errors: "only one mesh currently allowed". I have little skill with 3ds and I would just like to do a simple rotation on a unit...
The current exporter only supports you use one mesh in order for it to convert to m3.
Meaning you can have hundreds of objects and expect them to convert, nor you can connect or join them together, they'll still output a "Only one mesh allowed error"
I think that the m3 -> 3ds max converters make the m3 models into several parts.
could you please explain how you fixed the problem, because I have the same.
@crazyfingers619: Go
I'll add specular functionality in the next update, fairly easy to do. I'll just be using max's spec level. As for Specularity and HDR spec multiplier, should they both be set to 1 for the mean time? I think I'll have to design some UI to adjust these custom kind of settings as max doesn't support them natively. I'll figure something out. I'm not much good when it comes to materials and such, you'll have to give me feedback so I can get that part of the exporter right.
I'll look into the emissive shaders and being able to adjust them. I'm really hoping I can setup a UI with the M3 material settings incorporated so you can adjust things such as priority and whether team colour is used for the bitmap alpha and such.
@Skizot: Go
Team colours are done via the alpha channels I believe, so you're correct. Materials that use the alpha channel for team colours require a flag switched that my exporter currently doesn't do. I should be able to add it in for the next update.
I've looked at the billboards, they're pretty cool. Animated textures shouldn't be a problem. I'm impressed with the formats the engine is willing to support. I didn't think .png would work but it does. There's probably flags that setup and allow animated textures. I'll check out the billboard models and see what I can figure out.
@Samoner: Go
I'll look into the problem but could you list the steps you're doing for exporting. The steps should be:
@NiNtoxicated01: Go
Honestly, i'm not too certain what the HDR spec does, might use some external texture based on the level tileset to give it a sort of "cube map" effect, it's a cheap way of making something look reflective.
In the meantime speculatiry I would think specularity would be fine set to 1 (I'm assuming it's just the multiplier for spec power), we can just darken our specs in photoshop to adjust the level of spec. As stated i'm not sure what would happen if HDR was set to one, could throw things off, make everything look like reflective metal but i'm not entirely sure.
Thanks for keeping us in the loop and all the hard work! If you don't mind me asking, I'm kinda curious as to what the drive behind this exporter project? You working on a mod NiNtoxicated?, looking to be a technical artist and this is a side project? Always wondered why people spend so much time for cool free stuff we get to use ;) Regardless it's much appreciated!
You jacked that from project revolution... o wait you were a part of that
@vadremix: Go
i RAN that. lol
can i use that wraith model?
Great script!
I'm having issues getting Spec Maps and Normal Maps working, however. I'm using a Multishader and the Diffuse map works perfectly. I have tried plugging the Spec map into the Specular channel and Normal Map into Bump Map channel (using Tangent space normals). The exporter hiccups at the normal map when I try to export this. Even when I export without a Normal Map, the Spec map doesn't seem to work. I've tried using .dds and .tga, 512X512 maps.
-Edit- Figured out the Normal issue. Had to change it to "Bitmap" type instead of "Normal Bump". Shows in game now. Still trying to figure out my Specular issue. -2nd edit- Okay going through older posts, seems like Specular isn't fully supported by the script. That's cool.
One added issue. The lighting affecting my custom unit seems to be different from other units in game; the lighting falloff is a lot sharper and makes my model look 'darker' when not in the light. Wondering if this has to do with the default shaders being exported not being the same as the ones the SC2 ones are exported; and if there's any way to tweak this.
Hey guys, especially dear NiNtoxicated01,
a friend helps me with 3Ds and the exporter to convert my old Wc3 models into m3. But there is one thing which won't work. Dou you guys remember the material setting in Wc3 called 'Unshaded'? I think it was even in 3Ds. I informed me that it is equal to 100% Self-Illumination. So what do we have to do to export "unshaded" or change something in the .m3 file? That would help me a lot! I appreciate your help :)
@crazyfingers619: Go
My motivation for the script is hard to pinpoint exactly. I like to create and design tools, but I'm not quite able to step up to C plus and do proper programming. Maxscript is really fun to work with. It's forgiving and flexible, my only qualms is that it can be inconveniently slow and accessing and setting some of 3ds max's settings can be a nightmare (don't get me started on vertex normals...). However I enjoy overcoming the technical hurdles and the challenges involved. I also love models, especially highly detailed ones such as the ones from WoW and first person shooters in general. I know there are artist rights at hand, but I find it frustrating that such great models can be limited to one game. Ontop of all these reasons, I have lots of affection for SC and its universe, so I have a fascination with SC2 and its models I guess you could say.
@Triceron: Go
I'm working on a big update that's on the verge of release. Basically for materials I discovered maxscript provides plugins that you can use to extend the native material types. I've used this to create custom materials that hold all the custom kind of settings that M3's have, and a custom bitmap too that allows you set layer properties such as if it uses the material alpha to render team colour and texture wrapping. You'll still be using a multimaterial for the submeshes, but each mulimaterial will be of the 'Starcraft 2' type and you'll use a 'Starcraft 2 Map' for each map (diffuse, spec, emissive, etc). I'm looking forward to this update as the custom materials are exactly what I've been wanting to implement from the outset.
@Cyb3rD3lux3: Go
Similar to above, you'll be able to set materials to 'Unshaded' via the custom material flags once the new update is done. I hope to get it out soon so stay tuned.
@Skizot: Go
Nice Wraith model! It'd be cool to reproduce the original SC models for SC2. Definitely nostalgia attached to that.
Thanks, I hope we will see that update soon :) Keep up your work, hope that I will have in the near future the same interest & time to write some model stuff scripts like you :x Well then, I hope to see your updated exporter, it's atm. totally awesome, waiting on StarTools sucks :D
Update is up and waiting for approval. The new file has an extra script, sc2_objects.ms. If you place it in your 3ds max plugins directory it'll allow you to use custom Starcraft 2 materials that lets you tweak the material settings. There's also a custom map type which allows you to set team colour and texture wrapping for a bitmap. The map type will be expanded upon later. Enjoy :D
Great work NiNtoxicated01!
I'm playing around with the script right now. Emmissive seems to work (Self Illuminate in Max), though I still can't get Specularity to work. The map is applied but the Spec value in the SC2Edit Previewer has Spec set at 0.00. I'll test out custom shaders in a bit.
-Edit- Woo! Works great :D
Specularity issues were fixed by using the Starcraft 2 shader. The SC2 shader seemed to fix the diffuse lighting fall off as well, so it looks like other units.
I've got a weird problem. My model is always brighter(totally!) in the editor than in the 3Ds preview. Does Self-Illuminace work right? I tried different settings :/ Well, I'll try more settings in that time.
Woot!
Edit: Don't judge the back no engines or particles in yet!
@Cyb3rD3lux3: Go
Great way to debug your shaders is to cycle shader types in the previewer (S and Shift + S). You can see what you're looking at below, be it emisive or whatever.
@crazyfingers619: Looks kewl even without details.
Great way to debug your shaders is to cycle shader types in the previewer (S and Shift + S). You can see what you're looking at below, be it emisive or whatever.
That helped me a lot, but now I wonder how I can apply different shaders in 3Ds or in the editor? That is all what I want to know, would help me a lot...
For example I would like to have Emissive only
-------I've read your posts again and I want to know how you did that:
Specularity issues were fixed by using the Starcraft 2 shader. The SC2 shader seemed to fix the diffuse lighting fall off as well, so it looks like other units.
How do you do that ?!
Maybe I explain again what I want to do: I've got a model and I want that the model will be exported with 100% Self-Illuminace and it must be like in 3Ds with the same lightning(100% Self-Illu = No lightning ;) ). Hope you can explain how you did that.
@Cyb3rD3lux3: Go
Where your material ID 1 texture is, change the material in there from "standard" material to "starcraft 2" material. Didn't realize this right away myself.
If you want just an emmisive plug in just your emmisive texture and leave the rest blank, at least I *think* that's what you were asking
So with the current state of the importer and exporter is it possible to import a SCII .m3 unit model, rotate it 90 degrees along Y and export it out? I tried importing just a regular Phoenix.m3, import and rotate 90 degrees, but when I export I get some errors: "only one mesh currently allowed". I have little skill with 3ds and I would just like to do a simple rotation on a unit...
The current exporter only supports you use one mesh in order for it to convert to m3.
Meaning you can have hundreds of objects and expect them to convert, nor you can connect or join them together, they'll still output a "Only one mesh allowed error"
I think that the m3 -> 3ds max converters make the m3 models into several parts.
@xcorbo: Go
I didn't fully understand your explanation, but I'm taking that as a "no" in regards to my question.