You also have to do something more to make a SC2 normal map. If you note they're not regular purple shaded maps, they're orange.
@tigerija: To make your normal maps, since you don't know how to do them, you want to use either the NVIDIA NormalMapFilter plug in for PS or crazybump. You'll get better results with crazybump but they'll also be smoother (sort of) so you really don't want to use crazybump for non organical things or things that are meant to be sharp and have pretty well defined edges. (So in this case I advice you to use the NVIDIA plug in)
To ready a normal map for SC2 you have to do this:
- Get your normal map open in something that can manipulate channels in RGB.
- Copy the red channel to an alpha channel
- Delete the red channel and fill it with white
- Delete the blue channel and fill it with black.
That should give you a nice orange-y normal map to use on SC2 UNITS. Terrain normals are different.
I promise I'll make a vid later today?
What I did, I opened model in max. I went to material editor. Clicked on Starcraft 2 material type.
Then I picked type of map, lets say diffuse, then INSTEAD USING BITMAP I SELECTED STARCRAFT 2 BITMAP. Then I selected blabla_diff.dds texture. Repeating same steps for normal and spec.
Then I scaled model down to 1/100.
Exported as Marine.m3 , imported in editor. Works.
EDIT: Ok I tried all possible ways, adding specular, normal, removing, only diffuse but at the end there is or normal map shading error, or spec error, or diffuse shading error.
http://img295.imageshack.us/img295/5067/94837407.png
I noticed that that guy with bug model dont have any problems. Anyone has solution here ?
Pls someone post fully working custom model in SC2.
Thank you, now I'm a step closer to the finish, but I still have such a confusing glow around the model (not only in the previewer) and yes I did everything like you said. Also tried without spec and normal!
I'll step in here. The exporter isn't perfect at exporting smooth groups. Infact it's terrible at it. I've yet to code in a good smooth group algorithm so at the moment I use the edit_normals modifier present in max to grab each custom vertex normal. It's pretty slow and it's far from perfect. It works well with the importer, but I could see how you could run in to problems with custom models. The problem here is vertex normals, which M3's use, but 3ds Max hates. 3ds Max likes to calculate its vertex normals on the fly using smoothing groups, which is great, but it means you can't use custom vertex normals without a modifier. This is a problem when importing/exporting and if someone has a 3ds Max solution that bypasses using the modifier I'd love to hear it (I don't think there is one, besides designing the script to use smoothing groups instead).
My advice, add an 'edit normals' modifier to your mesh and mess around with it to try and get the correct smoothing. The script directly accesses the vertex normals through the modifier so you should be able to fix smoothing errors through experimentation with the modifier. In the future I hope to code in an algorithm to handle smoothing groups in 3ds Max properly on export, however the math behind such an algorithm is pretty complex and I've yet to see any example code of it anywhere. I'd love to have smoothing groups applied on import too, but again the math I just can't do. If anyone knows how to convert vertex normals to smoothing groups and smoothing groups to vertex normals, please enlighten me.
He used 1.5 NiN's tool. And he had no errors with shading or nothing. He is using normal maps, diffuse and specular. All working perfectly. When I try that with other models. I get different type of bugs....
I pmed him to send me his scene. Then I will give it to you so you can examine that. I dont understand what is causing that problems. Normal Maps are acting strange ingame...
Btw, did you know you could attach files & images in the forum post. Just click the Add attachment link :) It will integrate it inside your post and make thumbnails for images. Also, it won't disappear after some times and make your post unreadable in let say 2 months!
NiN, I just hope you will figure out how that guy exported his bug model into editor and it works perfectly when everyone else cant make custom models work properly.
Well, only shading, and textures are problems. Cant find what the problem is exactly.
EDIT: Only solution I did find is de-attaching polys as smoothing groups. That will increase vertex number.
I had exactly same problem with Wc3 models. Only way to avoid that problem was using Blizz art tools.
Seems like they are using some protection, well they are using some special shading system with smoothing groups or how normals hit the polys.
NiN, try to figure out how that guy exported that bug model. He used 1.5 tool. And he has not normal maps problem. You exported those WOW models into Sc2 ? Answer on that pls. it might help us.
NiN, I just hope you will figure out how that guy exported his bug model into editor and it works perfectly when everyone else cant make custom models work properly.
Well, only shading, and textures are problems. Cant find what the problem is exactly.
EDIT: Only solution I did find is de-attaching polys as smoothing groups. That will increase vertex number. I had exactly same problem with Wc3 models. Only way to avoid that problem was using Blizz art tools. Seems like they are using some protection, well they are using some special shading system with smoothing groups or how normals hit the polys.
NiN, try to figure out how that guy exported that bug model. He used 1.5 tool. And he has not normal maps problem. You exported those WOW models into Sc2 ? Answer on that pls. it might help us.
Technically I cheated :P whenever i used my normal or height map it would invert the specular map, so i just used specular and diffuse :\
I've seen others have the same problem and tried fixing em. Smoothing Groups are definately a pain in the ass right now.
An untested solution I've thought about is doing what Blizzard does for smoothing groups - separate the geometry at the edge that you want hard.
So for your box, separate each box face, but keep it as one mesh. That's how War3 does it, it might do the trick for SC2.
Otherwise, I have no problems with my meshes, although I don't work with a lot of things that have boxy faces. The exporter doesn't like hard edges, so I usually avoid them best I can.
Smoothing groups are an absolute pain to code for aswell. There's almost no specific code I can reference to figure out a good way to calculate vertex normals based on smoothing groups. That's the exporter side of things. I've been googling the problem a fair bit and there's little information about going from vertex normals to smoothing groups and from smoothing groups to vertex normals.
Looking at Blizzard M3 models that have creased surfaces, you can see in 3ds Max they have multiple vertices where adjacent faces are meant to be creased. Smoothed surfaces only need one vertex. This is because to have a creased surface, you require a seperate vertex normal for each adjacent face and M3's only support one normal per vertex. 3ds Max, on the other hand, allows you to have multiple normals per vertex however the normals are automatically calculated based on smoothing groups. I do believe smoothing groups can be used and the extra vertices and their normals automatically generated on export (as Warcraft III tools did) but I am absolutely stumped as to how to go from the generated vertex normals back to smoothing groups with the importer.
If I do figure out some solution I think I'll have to provide an option for the exporter whether to use custom vertex normals that are assigned through the Edit Normals modifier or to use smoothing groups.
As above, 3ds Max uses multiple vertex normals per vertex yet M3's have only one vertex per normal. You'll have to detach the faces like you've been doing for the moment until a solution is reached.
Honestly the math involved is frustrating and sparsely documented. I'll keep considering a solution but for now I don't know of an easy one.
Y tough like that :) . Didnt see normal map. So... do you exprience shading problems or you dont ? Since your model is quite dark, and high poly on round parts.
@Triceron:
Are you 100% sure art tool did cut faces off in order to establish proper angle or normal hitting the face (smoothing groups).
Also, how much will that affect processing ? Coz this will almost double number or vertexes.
I dont know about their tools. How long did it take to do it for Wc3 ? For now they arent showing much of support for mappers. Maybe just 10% of support... I dont even know if they will release them. Since GE, Galaxy Editor is now more like MAP editor. Where in wc3 we had WORLD editor. You would tough that GALAXY editor would be something bigger. It has more features, but those are features withing features.
Doubling vertex count on edges where it matters doesn't hurt processing power. Model files are tiny, and polycount rarely gets in the way of processing power. It's the combination of shaders, animations, effects and post processing that taxes your graphics card and ram. The only way this would affect your model is if you intend to use something that's greater than 15k polies. Otherwise, if we're talking about SC2 res models, it shouldn't be a problem.
I haven't used Art Tools in over 6 years, and I never had to cut faces on my units. I heard this method from others. Again, I haven't tested this method mostly because I've had no reason to. I don't have time to test that kind of stuff right now with the project I'm working on.
Art Tools came out AFTER Frozen Throne came out. I was there making models for Warcraft 3 the day it came out, and it was by using DEX and other community-made tools that I was able to test my assets in game. The Art Tools were more inclusive of certain features like adding effects and animations, but DEX was still very much used. If and when Blizzard comes out with their SC2 Art Tools, the .M3 exporter will still be a heavily-used asset in custom model making.
As Triceron says, polies don't impact performance nearly as much as they did back in 2001. You can confidently put six-digit models into the game without much issue. I've stress tested both this game and less efficient games with raw polies and they performed superbly. Shadows and lights are the big killers.
I was just messing around with exporting various models into 3DS MAX and noticed animations would do odd things. For example, I exported the basic marine and when I play its "walk" animation the left leg spins around. When I look at each frame, it is as if the rotation and placement (of the bones) for a few specific frames (in a row) is off, creating the spinning leg. This happened with most of the other models I looked at as well.
Is there something wrong on my end, or does the exporter not fully support animation as of yet*?
One additional question if animation is supported: is there a tutorial that describes how to add and edit unit animation sequences?
You also have to do something more to make a SC2 normal map. If you note they're not regular purple shaded maps, they're orange.
@tigerija: To make your normal maps, since you don't know how to do them, you want to use either the NVIDIA NormalMapFilter plug in for PS or crazybump. You'll get better results with crazybump but they'll also be smoother (sort of) so you really don't want to use crazybump for non organical things or things that are meant to be sharp and have pretty well defined edges. (So in this case I advice you to use the NVIDIA plug in)
To ready a normal map for SC2 you have to do this:
- Get your normal map open in something that can manipulate channels in RGB.
- Copy the red channel to an alpha channel
- Delete the red channel and fill it with white
- Delete the blue channel and fill it with black.
That should give you a nice orange-y normal map to use on SC2 UNITS. Terrain normals are different. I promise I'll make a vid later today?
Are you sure that it works, if so could you send me the working model (m3 format already)? Because I don't get it working this way :(
Thanks for the info on the orange normal map thing mate. Didn't know that one >.< Kinda weird though... those are more like distortion map colors.
your wrong however about crazy bump. Its very nice with hard surface as well. One of the guys from epic games has a tutorial on it in fact x)
Seen few tutorial about normal maps, will examine what your wrote about those colors converting when I come back from job.
Samoner, I will test it now. Then I will reply. Had to sleep yesterday.
EDIT: Ok I solved it. I think its problem in max material texture type.
What I told you...
http://img85.imageshack.us/img85/4797/44421722.png
What I did, I opened model in max. I went to material editor. Clicked on Starcraft 2 material type. Then I picked type of map, lets say diffuse, then INSTEAD USING BITMAP I SELECTED STARCRAFT 2 BITMAP. Then I selected blabla_diff.dds texture. Repeating same steps for normal and spec.
Then I scaled model down to 1/100.
Exported as Marine.m3 , imported in editor. Works.
EDIT: Ok I tried all possible ways, adding specular, normal, removing, only diffuse but at the end there is or normal map shading error, or spec error, or diffuse shading error.
http://img295.imageshack.us/img295/5067/94837407.png
I noticed that that guy with bug model dont have any problems. Anyone has solution here ?
Pls someone post fully working custom model in SC2.
Thank you, now I'm a step closer to the finish, but I still have such a confusing glow around the model (not only in the previewer) and yes I did everything like you said. Also tried without spec and normal!
http://img638.imageshack.us/f/unbenannt1xh.jpg/
@tigerija: Go
I'll step in here. The exporter isn't perfect at exporting smooth groups. Infact it's terrible at it. I've yet to code in a good smooth group algorithm so at the moment I use the edit_normals modifier present in max to grab each custom vertex normal. It's pretty slow and it's far from perfect. It works well with the importer, but I could see how you could run in to problems with custom models. The problem here is vertex normals, which M3's use, but 3ds Max hates. 3ds Max likes to calculate its vertex normals on the fly using smoothing groups, which is great, but it means you can't use custom vertex normals without a modifier. This is a problem when importing/exporting and if someone has a 3ds Max solution that bypasses using the modifier I'd love to hear it (I don't think there is one, besides designing the script to use smoothing groups instead).
My advice, add an 'edit normals' modifier to your mesh and mess around with it to try and get the correct smoothing. The script directly accesses the vertex normals through the modifier so you should be able to fix smoothing errors through experimentation with the modifier. In the future I hope to code in an algorithm to handle smoothing groups in 3ds Max properly on export, however the math behind such an algorithm is pretty complex and I've yet to see any example code of it anywhere. I'd love to have smoothing groups applied on import too, but again the math I just can't do. If anyone knows how to convert vertex normals to smoothing groups and smoothing groups to vertex normals, please enlighten me.
NiN, did you see that Bug model one guy posted ?
He used 1.5 NiN's tool. And he had no errors with shading or nothing. He is using normal maps, diffuse and specular. All working perfectly. When I try that with other models. I get different type of bugs....
I pmed him to send me his scene. Then I will give it to you so you can examine that. I dont understand what is causing that problems. Normal Maps are acting strange ingame...
NiN, can you export model from max, into game with no shading errors like that guy with bug model ?
http://forums.sc2mapster.com/development/artist-tavern/4893-starship-troopers-arachnid-model/
No errors here. Check map and mode. Strange... I dont get it. I examined the model but couldnt import textures as .m3. Need max scene.
Btw, did you know you could attach files & images in the forum post. Just click the Add attachment link :) It will integrate it inside your post and make thumbnails for images. Also, it won't disappear after some times and make your post unreadable in let say 2 months!
LoL vjuex :) .
NiN, I just hope you will figure out how that guy exported his bug model into editor and it works perfectly when everyone else cant make custom models work properly.
Well, only shading, and textures are problems. Cant find what the problem is exactly.
EDIT: Only solution I did find is de-attaching polys as smoothing groups. That will increase vertex number. I had exactly same problem with Wc3 models. Only way to avoid that problem was using Blizz art tools. Seems like they are using some protection, well they are using some special shading system with smoothing groups or how normals hit the polys.
NiN, try to figure out how that guy exported that bug model. He used 1.5 tool. And he has not normal maps problem. You exported those WOW models into Sc2 ? Answer on that pls. it might help us.
Technically I cheated :P whenever i used my normal or height map it would invert the specular map, so i just used specular and diffuse :\
Formally Kinkycactus
@ZombieZasz: Go
Ha ! knew I didn't see a normal map on that model . Looked far to smooth in game :P So you haven't got normal maps working magically. xD Damn it!
Does anyone think blizzard will create an export tool for max? I though they would have but it appears they haven't :/
@rustychops: Go
They are going to have a plugin but don't expect it for quite some time.
I've seen others have the same problem and tried fixing em. Smoothing Groups are definately a pain in the ass right now.
An untested solution I've thought about is doing what Blizzard does for smoothing groups - separate the geometry at the edge that you want hard.
So for your box, separate each box face, but keep it as one mesh. That's how War3 does it, it might do the trick for SC2.
Otherwise, I have no problems with my meshes, although I don't work with a lot of things that have boxy faces. The exporter doesn't like hard edges, so I usually avoid them best I can.
@Triceron: Go
Smoothing groups are an absolute pain to code for aswell. There's almost no specific code I can reference to figure out a good way to calculate vertex normals based on smoothing groups. That's the exporter side of things. I've been googling the problem a fair bit and there's little information about going from vertex normals to smoothing groups and from smoothing groups to vertex normals.
Looking at Blizzard M3 models that have creased surfaces, you can see in 3ds Max they have multiple vertices where adjacent faces are meant to be creased. Smoothed surfaces only need one vertex. This is because to have a creased surface, you require a seperate vertex normal for each adjacent face and M3's only support one normal per vertex. 3ds Max, on the other hand, allows you to have multiple normals per vertex however the normals are automatically calculated based on smoothing groups. I do believe smoothing groups can be used and the extra vertices and their normals automatically generated on export (as Warcraft III tools did) but I am absolutely stumped as to how to go from the generated vertex normals back to smoothing groups with the importer.
If I do figure out some solution I think I'll have to provide an option for the exporter whether to use custom vertex normals that are assigned through the Edit Normals modifier or to use smoothing groups.
@tigerija: Go
As above, 3ds Max uses multiple vertex normals per vertex yet M3's have only one vertex per normal. You'll have to detach the faces like you've been doing for the moment until a solution is reached.
Honestly the math involved is frustrating and sparsely documented. I'll keep considering a solution but for now I don't know of an easy one.
@kinkycactus:
Y tough like that :) . Didnt see normal map. So... do you exprience shading problems or you dont ? Since your model is quite dark, and high poly on round parts.
@Triceron:
Are you 100% sure art tool did cut faces off in order to establish proper angle or normal hitting the face (smoothing groups).
Also, how much will that affect processing ? Coz this will almost double number or vertexes.
I dont know about their tools. How long did it take to do it for Wc3 ? For now they arent showing much of support for mappers. Maybe just 10% of support... I dont even know if they will release them. Since GE, Galaxy Editor is now more like MAP editor. Where in wc3 we had WORLD editor. You would tough that GALAXY editor would be something bigger. It has more features, but those are features withing features.
@NiN:
I understand completely.
Doubling vertex count on edges where it matters doesn't hurt processing power. Model files are tiny, and polycount rarely gets in the way of processing power. It's the combination of shaders, animations, effects and post processing that taxes your graphics card and ram. The only way this would affect your model is if you intend to use something that's greater than 15k polies. Otherwise, if we're talking about SC2 res models, it shouldn't be a problem.
I haven't used Art Tools in over 6 years, and I never had to cut faces on my units. I heard this method from others. Again, I haven't tested this method mostly because I've had no reason to. I don't have time to test that kind of stuff right now with the project I'm working on.
Art Tools came out AFTER Frozen Throne came out. I was there making models for Warcraft 3 the day it came out, and it was by using DEX and other community-made tools that I was able to test my assets in game. The Art Tools were more inclusive of certain features like adding effects and animations, but DEX was still very much used. If and when Blizzard comes out with their SC2 Art Tools, the .M3 exporter will still be a heavily-used asset in custom model making.
As Triceron says, polies don't impact performance nearly as much as they did back in 2001. You can confidently put six-digit models into the game without much issue. I've stress tested both this game and less efficient games with raw polies and they performed superbly. Shadows and lights are the big killers.
Hey guys,
I was just messing around with exporting various models into 3DS MAX and noticed animations would do odd things. For example, I exported the basic marine and when I play its "walk" animation the left leg spins around. When I look at each frame, it is as if the rotation and placement (of the bones) for a few specific frames (in a row) is off, creating the spinning leg. This happened with most of the other models I looked at as well.
Is there something wrong on my end, or does the exporter not fully support animation as of yet*?
Thank you.
@ef55515: Go
Damn, that's a bug put in there by me. I could've swore I fixed that problem. Looking into it now.
I've come up with a way to export based on smoothing groups, now it's just coding it which is a major pain. Might have something to show soon.
EDIT: Ok I found the problem with the import script and have corrected it. It will be included with the next release.