That just saved me a lot of time! Thank you for sharing this. I wasn't going to guess that it was shader issue anytime soon.
And this indeed can affect any other map. I'm suprised there's no info about this anywhere else (or maybe i missed it?).
For clarification purposes, only Shaders30989 (30989 is a build ID - may differ in future) directory from \Blizzard Entertainment\StarCraft II\Versions must be removed. If you don't want to lose all downloaded maps from battle.net.
Ok i found the cause. I've been saving normal map as:
DXT5 ARGB 8 bpp | interpolated alpha
What was apparently incorrect. With .TGA it worked like a charm.
The right format for normal map seems to be:
DXT5_NM XY 8 bpp | using DXT5
I'm having hard time following those instructions.
Perhaps i should mention that i'm total newb to 3ds max, lol.
Also, model wasn't made by me.
It is one object. I've detached it into 2 pieces, and applied normal modifier on the left part. Is it what i was supposed to do? If so, no change after export.
I'm having weird issue with model i'm trying to export into SC2. It's cargo container which has mirrored texture on top of it. Applying generated normal map causes lighting to behave incorectly, as in the picture:
Why does it happen? Is there something special in the way SC2 handles normal maps? Or i'm doing something wrong? How can i solve it?
I've been trying to export other models aswell, with pretty much the same result.
I'm relativly new to the 3d graphics stuff, so some explanation of this behavior would be really appreciated.
It must. If no animations were defined while exporting, then Art Tools binds the existing animation to Stand by default. That's why your animation is played while unit stands. The best apporach is to re-export the model and assign animations properly.
Although there might exist a hacky solution via data. Like swap the actor baseline animation from Walk to Stand and Stand to None. Or use the actor events with msg UnitMovementUpdate to manually start the animation while unit moves. Then pause it once unit stopes etc.
But i just tried the above and couldn't exactly make it work.. so again i would rather advice you to re-export the model with animations properly assigned.
It is correct. But more than that needs to be done to make animation recognizable for SC2.
M3 format stores animations in named groups. Like Birth, Stand, Walk etc.
In 3dsmax you have all the animations on single timeline. Thus you need to assign keyframes to groups in the exporter options.
For example:
Stand = Frame 1 -> Frame 1
Walk = Frame 10 -> 20
This way SC2 will known which frames to play for standing, walking etc.
It is all explained in Blizz Art Tools documenation.
I assume you have imported your own model? As for the animation you need to reassign current Stand animation to Walk. So it will be played while unit walks. For the Stand animation just create an empty frame, then unit will be motionless while standing.
Done.
You should check if anything broke with the model. Blender (tool i used) tends to fuckup particles effects sometimes if they are used in animations.
I assume everyone above uses trigger editor to build dialogs?
The best approach is to get familiar with the scheme of UI editor, which is based on XML. Then build dialog templates in there. Besides few annoying things it's much faster than using triggers. Also there are things you can do that you couldn't do using only triggers.
Once you have a template done you just call native to insert template in desired place:
This is list of probably all existing elements in the UI structure: http://www.sc2mapster.com/paste/7445/
Also you can look up how the builtin UI templates look like and learn basing on this.
Scripting in GUI is a bit painful to me. Their editor can't even highlight syntax properly.. not even talking about bunch of other features that editor should have. Although aslong as you use scripts as a backup to the existing trigger system that's build into GUI, there's unfortunately no other way to keep both of those working properly.
If you would like to rely only only on scripts, the best way is to save map in unpacked format (.SC2Component) and then edit MapScript.galaxy directly. This way you can have editor open (data, terrain etc.) and at the same time do the scripting in your own editor. There's package to the Notepad+ with syntax highlight and autocompletion of the natives. http://www.sc2mapster.com/assets/notepad-galaxy-package/
Although i personally use the sublime text.
Once you get familiar with natives, scripting triggers etc. Everything will be much faster than building stuff in GUI.
The bad side of it is the galaxy language itself. It's really poor.. lacks a lot of features that modern script language should have. There were few galaxy extensions in the past, but unfortunately they died.. so there's no alternative at the moment.
I've been trying to export models of terran console panels with poorly results :(
Assets\UI\Console\Terran\ConsoleTerran\ConsoleTerran_02.m3 (command card panel)
Does export, but incorrectly - command card frame resize horizontally and overlap with portrait.
Assets\UI\Console\Terran\ConsoleTerran\ConsoleTerran_00.m3 (minimap panel)
Doesn't import at all. Error i get:
ImportConsoleTerran_00.m3Traceback(mostrecentcalllast):File"C:\Users\KK\AppData\Roaming\Blender Foundation\Blender\2.69\scripts\addons\m3addon\__init__.py",line4401,inexecutem3import.importM3BasedOnM3ImportOptions(scene)File"C:\Users\KK\AppData\Roaming\Blender Foundation\Blender\2.69\scripts\addons\m3addon\m3import.py",line1857,inimportM3BasedOnM3ImportOptionsimporter.importM3BasedOnM3ImportOptions(scene)File"C:\Users\KK\AppData\Roaming\Blender Foundation\Blender\2.69\scripts\addons\m3addon\m3import.py",line398,inimportM3BasedOnM3ImportOptionsself.model=m3.loadModel(fileName)File"C:\Users\KK\AppData\Roaming\Blender Foundation\Blender\2.69\scripts\addons\m3addon\m3.py",line1176,inloadModelsections=loadSections(filename,checkExpectedValue)File"C:\Users\KK\AppData\Roaming\Blender Foundation\Blender\2.69\scripts\addons\m3addon\m3.py",line1119,inloadSectionssection.determineContentField(checkExpectedValue)File"C:\Users\KK\AppData\Roaming\Blender Foundation\Blender\2.69\scripts\addons\m3addon\m3.py",line45,indetermineContentFieldself.content=self.structureDescription.createInstances(buffer=self.rawBytes,count=indexEntry.repetitions,checkExpectedValue=checkExpectedValue)File"C:\Users\KK\AppData\Roaming\Blender Foundation\Blender\2.69\scripts\addons\m3addon\m3.py",line170,increateInstanceslist.append(self.createInstance(buffer=buffer,offset=instanceOffset,checkExpectedValue=checkExpectedValue));File"C:\Users\KK\AppData\Roaming\Blender Foundation\Blender\2.69\scripts\addons\m3addon\m3.py",line150,increateInstancereturnM3Structure(self,buffer,offset,checkExpectedValue)File"C:\Users\KK\AppData\Roaming\Blender Foundation\Blender\2.69\scripts\addons\m3addon\m3.py",line236,in__init__self.readFromBuffer(buffer,offset,checkExpectedValue)File"C:\Users\KK\AppData\Roaming\Blender Foundation\Blender\2.69\scripts\addons\m3addon\m3.py",line254,inreadFromBufferfield.readFromBuffer(self,buffer,fieldOffset,checkExpectedValue)File"C:\Users\KK\AppData\Roaming\Blender Foundation\Blender\2.69\scripts\addons\m3addon\m3.py",line553,inreadFromBufferraiseException("Expected that field %s of %s (V. %d) has always the value %s, but it was %s"%(self.name,structureName,structureVersion,self.expectedValue,value))Exception:Expectedthatfieldunknown4ofEVNT(V.1)hasalwaysthevalue0,butitwas20
I've tried to comment part of the code that checks for expected value, but of course it didn't help. I got this:
ImportConsoleTerran_00.m3WARNING:CHARV0(20repetitions)got0timesreferenced->Foundareferenceatoffset88inasectionoftypeEVNTV1OffsetsofEVNTinversion1:0:name12:unknown016:unknown118:unknown220:matrix84:unknown388:unknown492:unknown596:unknown6100:unknown7WARNING:CHARV0(21repetitions)got0timesreferenced->Foundareferenceatoffset88inasectionoftypeEVNTV1OffsetsofEVNTinversion1:0:name12:unknown016:unknown118:unknown220:matrix84:unknown388:unknown492:unknown596:unknown6100:unknown7WARNING:CHARV0(21repetitions)got0timesreferenced->Foundareferenceatoffset88inasectionoftypeEVNTV1OffsetsofEVNTinversion1:0:name12:unknown016:unknown118:unknown220:matrix84:unknown388:unknown492:unknown596:unknown6100:unknown7Traceback(mostrecentcalllast):File"C:\Users\KK\AppData\Roaming\Blender Foundation\Blender\2.69\scripts\addons\m3addon\__init__.py",line4401,inexecutem3import.importM3BasedOnM3ImportOptions(scene)File"C:\Users\KK\AppData\Roaming\Blender Foundation\Blender\2.69\scripts\addons\m3addon\m3import.py",line1857,inimportM3BasedOnM3ImportOptionsimporter.importM3BasedOnM3ImportOptions(scene)File"C:\Users\KK\AppData\Roaming\Blender Foundation\Blender\2.69\scripts\addons\m3addon\m3import.py",line398,inimportM3BasedOnM3ImportOptionsself.model=m3.loadModel(fileName)File"C:\Users\KK\AppData\Roaming\Blender Foundation\Blender\2.69\scripts\addons\m3addon\m3.py",line1178,inloadModelcheckThatAllSectionsGotReferenced(sections)File"C:\Users\KK\AppData\Roaming\Blender Foundation\Blender\2.69\scripts\addons\m3addon\m3.py",line1173,incheckThatAllSectionsGotReferencedraiseException("Unable to load all data: There were %d unreferenced sections. View log for details"%numberOfUnreferencedSections)Exception:Unabletoloadalldata:Therewere3unreferencedsections.Viewlogfordetails
Any chance for fix?
I've attached the models to this post so you dont have to dig for them.
I know that i can just copy fields for every of my child actors.
But that's exactly what i want to avoid. Having a parent actor should provide an easy way to modify fields that are shared with the childs. So i don't have to do it for every of them separately. For example mentioned scale - i change it only in the parent, and then all of my xxx childs are sharing this field.
And it actually work, as long as i stick to XML editor. But if i modify any field of parent in the table view, then editor overrides fields of childs to the old value. Like WTF. I completely don't understand purpose behind it.
I really hope there's a solution to workaround it, so i can keep my data clean. Without duplicating same fields xxx times and hoping i won't ever have to edit any of them in the future..
I was going to make several actors similiar to each other, so i made a Parent actor with values i want to change for every of my actors. To not do it for each other actor separately and keep it easy to edit. The actual actors are just child of Parent actor.
The problem is that when i make any change to the Parent actor, the data editor is trying to be smart and override the field change i made in every child actor. That doesn't make sense for me. Why does there exist data extending feature if i can't use it this way.
To better visualize the problem:
Child and parent actor without any fields filled
Here i made a change to the parent actor, changing the scale to 0.5. But editor tried to be smarter and automitaclly overided the scale in child to default one - 1.0
Why does it do that? Is there any way to avoid this?
0
That just saved me a lot of time! Thank you for sharing this. I wasn't going to guess that it was shader issue anytime soon.
And this indeed can affect any other map. I'm suprised there's no info about this anywhere else (or maybe i missed it?).
For clarification purposes, only Shaders30989 (30989 is a build ID - may differ in future) directory from \Blizzard Entertainment\StarCraft II\Versions must be removed. If you don't want to lose all downloaded maps from battle.net.
0
Ok i found the cause. I've been saving normal map as:
DXT5 ARGB 8 bpp | interpolated alpha
What was apparently incorrect. With .TGA it worked like a charm.
The right format for normal map seems to be:
DXT5_NM XY 8 bpp | using DXT5
0
I'm having hard time following those instructions.
Perhaps i should mention that i'm total newb to 3ds max, lol.
Also, model wasn't made by me.
It is one object. I've detached it into 2 pieces, and applied normal modifier on the left part. Is it what i was supposed to do? If so, no change after export.
http://i.imgur.com/U1b5U2r.png
0
Yes.
Should i try old M3 exporter?
0
I'm having weird issue with model i'm trying to export into SC2. It's cargo container which has mirrored texture on top of it. Applying generated normal map causes lighting to behave incorectly, as in the picture:
http://imgur.com/sNDcLXy
(right side is darker for no reason)
Why does it happen? Is there something special in the way SC2 handles normal maps? Or i'm doing something wrong? How can i solve it?
I've been trying to export other models aswell, with pretty much the same result.
I'm relativly new to the 3d graphics stuff, so some explanation of this behavior would be really appreciated.
3ds max files + textures: https://www.sendspace.com/file/kfzj0p
.sc2mod with .m3 + textures: https://www.sendspace.com/file/wh7e50
0
@penguinwars: Go
It must. If no animations were defined while exporting, then Art Tools binds the existing animation to Stand by default. That's why your animation is played while unit stands. The best apporach is to re-export the model and assign animations properly.
Although there might exist a hacky solution via data. Like swap the actor baseline animation from Walk to Stand and Stand to None. Or use the actor events with msg UnitMovementUpdate to manually start the animation while unit moves. Then pause it once unit stopes etc.
But i just tried the above and couldn't exactly make it work.. so again i would rather advice you to re-export the model with animations properly assigned.
0
It is correct. But more than that needs to be done to make animation recognizable for SC2.
M3 format stores animations in named groups. Like Birth, Stand, Walk etc. In 3dsmax you have all the animations on single timeline. Thus you need to assign keyframes to groups in the exporter options.
For example:
Stand = Frame 1 -> Frame 1
Walk = Frame 10 -> 20
This way SC2 will known which frames to play for standing, walking etc.
It is all explained in Blizz Art Tools documenation.
0
I assume you have imported your own model? As for the animation you need to reassign current Stand animation to Walk. So it will be played while unit walks. For the Stand animation just create an empty frame, then unit will be motionless while standing.
0
Done. You should check if anything broke with the model. Blender (tool i used) tends to fuckup particles effects sometimes if they are used in animations.
You can do things like that by yourself, without modeling knowledge or heavy tools like 3dsmax. Use Blender with m3addon extension http://www.sc2mapster.com/forums/resources/tutorials/35492-blender-how-to-create-an-animated-coin-model-for-starcraft/
0
I assume everyone above uses trigger editor to build dialogs?
The best approach is to get familiar with the scheme of UI editor, which is based on XML. Then build dialog templates in there. Besides few annoying things it's much faster than using triggers. Also there are things you can do that you couldn't do using only triggers.
Once you have a template done you just call native to insert template in desired place:
And then hookup desired element of the dialog. Like a label which text you would like to change dynamically:
This is list of probably all existing elements in the UI structure: http://www.sc2mapster.com/paste/7445/
Also you can look up how the builtin UI templates look like and learn basing on this.
0
Scripting in GUI is a bit painful to me. Their editor can't even highlight syntax properly.. not even talking about bunch of other features that editor should have. Although aslong as you use scripts as a backup to the existing trigger system that's build into GUI, there's unfortunately no other way to keep both of those working properly.
If you would like to rely only only on scripts, the best way is to save map in unpacked format (.SC2Component) and then edit MapScript.galaxy directly. This way you can have editor open (data, terrain etc.) and at the same time do the scripting in your own editor. There's package to the Notepad+ with syntax highlight and autocompletion of the natives.
http://www.sc2mapster.com/assets/notepad-galaxy-package/
Although i personally use the sublime text.
Once you get familiar with natives, scripting triggers etc. Everything will be much faster than building stuff in GUI.
The bad side of it is the galaxy language itself. It's really poor.. lacks a lot of features that modern script language should have. There were few galaxy extensions in the past, but unfortunately they died.. so there's no alternative at the moment.
0
Yeah, i meant "import" when i was saying "export" :)
Anyway i manually fixed ConsoleTerran_02 by editing bones. It fit my needs, cause i just wanted to cut off info panel.
Thanks.
0
I've been trying to export models of terran console panels with poorly results :(
Assets\UI\Console\Terran\ConsoleTerran\ConsoleTerran_02.m3 (command card panel) Does export, but incorrectly - command card frame resize horizontally and overlap with portrait.
Assets\UI\Console\Terran\ConsoleTerran\ConsoleTerran_00.m3 (minimap panel) Doesn't import at all. Error i get:
I've tried to comment part of the code that checks for expected value, but of course it didn't help. I got this:
Any chance for fix? I've attached the models to this post so you dont have to dig for them.
0
I know that i can just copy fields for every of my child actors. But that's exactly what i want to avoid. Having a parent actor should provide an easy way to modify fields that are shared with the childs. So i don't have to do it for every of them separately. For example mentioned scale - i change it only in the parent, and then all of my xxx childs are sharing this field.
And it actually work, as long as i stick to XML editor. But if i modify any field of parent in the table view, then editor overrides fields of childs to the old value. Like WTF. I completely don't understand purpose behind it.
I really hope there's a solution to workaround it, so i can keep my data clean. Without duplicating same fields xxx times and hoping i won't ever have to edit any of them in the future..
0
I was going to make several actors similiar to each other, so i made a Parent actor with values i want to change for every of my actors. To not do it for each other actor separately and keep it easy to edit. The actual actors are just child of Parent actor.
The problem is that when i make any change to the Parent actor, the data editor is trying to be smart and override the field change i made in every child actor. That doesn't make sense for me. Why does there exist data extending feature if i can't use it this way.
To better visualize the problem:
Child and parent actor without any fields filled
Here i made a change to the parent actor, changing the scale to 0.5. But editor tried to be smarter and automitaclly overided the scale in child to default one - 1.0
Why does it do that? Is there any way to avoid this?