<<reply 98589>>
Nin I would have responded earlier but I have work to do every so often =)
Oh don't even get me started on Max's rotation Matrix.
Really next time I am at Siggraph or GDC I am going to beat someone with a stick. A lot.
Some of the issues look to be coming from parenting. That is what I am starting out with at least. Why start there.
Glad you asked.
If you know the parent and the child of a bone it becomes a trival task in auto bone creation.
you get do the following:
[code]<br>
This is taken from Mike Comets Auto Rigger for Max 6 and Above. <br>
My Notes on this: <br>
-- ptToe and ptAnkle in the Auto Rigger are the locations of points that later become bones. <br>
-- since you are basically auto generating the bones on the fly you can do basically the same thing. <br>
-- Create points first for location, placement and parenting then Replace those with Bones.</p>
<p>vec = ptToe.pos - ptAnkle.pos -- get nice vector to determine Z up<br>
vec = cross [0,0,1] vec; -- now make vec more on side not front/back</p>
<p> bUL = BoneSys.createBone ptLeg.pos ptKnee.pos vec; -- upper leg<br>
<a href="http://bUL.name" rel="nofollow">bUL.name</a> = (prefix+"_upperLeg_"+LR+"_BN"); <br>
boneSetup bUL true mixColor:sideColor;<br>
bLL = BoneSys.createBone ptKnee.pos ptAnkle.pos vec; -- lower leg<br>
<a href="http://bLL.name" rel="nofollow">bLL.name</a> = (prefix+"_lowerLeg_"+LR+"_BN");<br>
boneSetup bLL true mixColor:sideColor;<br>
bFT = BoneSys.createBone ptAnkle.pos ptBall.pos vec; -- foot<br>
<a href="http://bFT.name" rel="nofollow">bFT.name</a> = (prefix+"_foot_"+LR+"_BN");<br>
boneSetup bFT true mixColor:sideColor;<br>
bTO = BoneSys.createBone ptBall.pos ptToe.pos vec; -- toe<br>
<a href="http://bTO.name" rel="nofollow">bTO.name</a> = (prefix+"_toe_"+LR+"_BN");<br>
boneSetup bTO true mixColor:sideColor;</p>
<p>[/code]
This of course is just a sample. My intial thought on this is to Create an Array matrix to record the parent child relationships
This way I can create everything cleanly. This should remove the gimbal locks of most everything. BTW I HATE max rotations.
Last Gmax that I am aware was based on Max 5. As of Max 6 there were some changes to core script parts. The bone creation is much different in Max 6 and higher. There are also other max script changes as well. Which is one of the reasons you will see on most scripts that saw good for Max 6.0 and Higher.
You cna get a trail verision of Max, and if you have a student .edu email address you should be able to get a student version of Max. In most cases if you can get a your hands on a student ID you can get a student /Educational Verision of most any software fairly inexpensively. This is a much better route then dredging through the dark places on the internet for other methods.
Comment by KorvinGump taken from the last newspost: Quote:
NiNToxicated Thank you for plugin. Hi all i found impexpMDX plugin, which work in 3ds max 2010, you can import models from warcraft 3, but i don't know imports if he animation or not because I recently started studying 3dsMax. Put files in 3dsmax directory/scripts/startup
DOWNLOAD
MIRROR 1
MIRROR 2
This is having major issues importing some of my WoW models in mdx format, the animations get totally destroyed. :\
First of I tried importing a ghost and modifying the bone animations a bit just to see how the exporter worked. The importer seems to be importing just a bit of the animation, somewhere around frames 5600k to 6600k. That was the "walking" animation. But I couldn't see any of the others.
The exporter works just great, whatever I modified worked, though, since I couldn't view the other frames that weren't walking animation the model just stayed still on the other animations.
Then I tried animating my link model and it got even more lulzy, I couldn't view the mesh at all, just the shadows it casted.
Can you please explain what animation "steps" are required for a model to work properly? I'm probably just doing something wrong but I'd like more input as to where I could've got lost.
Put sc2plugins.ms in your plugins directory so that it autoloads when max loads. Or you can just use 'run script' to load it before you import a model. A 'M3 - Sequences' utility should appear in the maxscript utilities menu for animation browsing. I'll be doing a tutorial at some point to make this all clearer however I'm midway through university exams so most of my spare time is devoted to study.
At the moment the ghost is exporting really messed up. It has something to do with the base frame going awry. I'll be fixing the problem in future updates. It's good to let me know about any models that have severe problems. They're a useful way to improve the plugins.
I can't stress enough, sc2plugins.ms must be running. It adds alot of vital functionality to the two scripts. You cannot create or edit animations properly without the plugin loaded as it contains a very handy animations UI, and the custom starcraft 2 shader and bitmaps I've designed will not be present without it loaded. It's absolutely essential for editing your models properly with the extra M3-specific properties I've integrated into the custom materials and animation UI. Once again, sc2plugins.ms should be loaded before you import or export. Placing it in your 3dsmax\Plugins directory will cause it to be loaded automatically upon launching 3dsmax. Importing/Exporting without it loaded is asking for trouble ><.
You are going to have no end of issues with the Ultralisk. This is primarily due to the fact it has a bad name in the Bone heirarchy. You can see it in the SC2 GE (Star Craft 2 Galaxy Editor). If you turn on View Bones. You will see the ~DUP~ as a duplicated Name for its Tail. I have already Bugged this with Bliz on their Forums.
There are a number of models with Bad names. So the problem may not be entirely on you NiN. It may be on Blizzard's side for sending out bad models to begin with.
The ghost model has some issues with its heirachy to begin with as well. One of the key tip offs is that Dummy01 and such should be coming in as a DummyHelper and not a Bone. I am fairly sure that the Ref_* objects should all be Point Helpers (setup as Boxes) it looks like they are all being duplicated at the moment and made bones.
you can do something like the following
-- Existing Object
/*
* objExists() - Given an object name, with or w/o $, this tells if it exists or not.
* Returns true on exists, false otherwise.
*/
fn objExists objname =
(
name="";
if (objname[1] == "$") then -- already have $ in it?
name = objname;
else
name = ("$"+objname);
ret = execute(name+" != undefined");
return (ret);
)
to check to see if a name matches.
resulting in something like this
if (objExists("$"+"Ref_*")) then
(
print "Do something here"
)
I use this bit with more precision since I know the naming convention that I use in my own companies Rigs.
M3 export v0.16b is a really small update that fixes the skinned bone issues. Use that with the other 1.2 plugin files. Just tested it with the Ultralisk and the Ghost models, they both export with correct animations. The ultralisk has really wacky animations in 3ds max but exports them correctly to M3. The ultralisk has massive import/export times (30 seconds for the export on my end). I'll have to figure out solutions for that.
I hear what you're saying. The problem is of course that the Ref_ objects are defined as bones in the M3 file. I could just treat them as point helpers instead of bones when you import but I don't know if that's the correct way to do things. Ultimately I want the M3 file to be imported as objectively as possible, without my arbitrary intervention. The Dummy01 bone definition in the ghost is interesting. It suggests that maybe when Blizzard are exporting their M3's they're using dummy boxes as part of their bone chains and those dummy boxes get converted into bones upon export. This would be pretty easy to code for in the exporter. The other problem is M3's have an entirely seperate attachment-style definition which specifies bones as their parent. This again could be done simply with a dummy box acting as an attachment then having a bone specified during export instead of requiring a bone AND a dummy helper in 3ds max.
I'll think about those kind of features. Right now attachments and dummy boxes aren't my biggest priority. My top priorities are to get accurately imported models, especially animations, and to export animations equally accurate. Particles/Ribbons will be next on my hitlist once animations are exported properly.
Got the sequences thing, but now it seems to not be saving wether the animations loop or not. I've managed to animate my link model gave him a walk[0] and stand[1] animation but when I make it walk it starts the animation, stops after being played once and then it returns to stand pose after it's done walking :P
Have tried closing/opeing the max scene and importing back the .m3 and the M3 sequence plug in always shows the "looping" as unchecked.
@NiN Oh trust me I understand. It makes me rather curious to know what it happening under the hood. I am halfway tempted to write an reader for the binary so just see all the information and how its laid out. I am thinking that the M3 format might read them as bones but they may not start out in life that way. They may just be packing them in as bones for the sake of size. Those Helpers may be points to help zero out the rotations of bones.
I am using the SC2 GE as my baseline since that is the reader/viewer that Blizz has provided. I have some auto rig scripts for max that I have to work on today, but I will see about kicking around the bones and such this weekend.
Or I may just write a Binary reader for the M3 format so I can see what it says in the file. I really want to see every last bit in that file and then decrypt that.
Unfuntuntely there is of course no one at Blizz that can give us the right information. However I can certianly gleen information based on what was not done or left behind. via naming and such.
Ah, some of the animations when imported are definitely broken still (My test is the Thor), but it's improving every version. Last time there were parts freaking out all over the place, now it's just the rear of the guns and the legs.
Too bad I don't know how to do anything other than basic modeling, or I'd try throwing in my mecha spider.
Alot of the models are freaking out in 3ds max. The ultralisk and the immortal are two very good examples. I'm working on figuring out the problem with those. Some of the warped animations are just messed up in max. The ultralisk exported back to M3 animates fine in the GE previewer. I'll have a look at the Thor model too.
I've had a look at the DarkTemplar model. Very bizzare. There's a bone being placed waaaaaaay out in the middle of nowhere. I've triple checked the M3 binary data and the bone is actually meant to be there according to the M3 file. Thank you Blizzard for cleaning up your models ><. It's messing up max pretty good, zooming gets destroyed by that rogue bone. As for the leg bone being curled up, I'll have to look into that, not sure why it's happening exactly. Exporting that model back to M3 has unexpected effects, such as the leg bone being completely missing even if I'm exporting without animation info (i.e. just the bindpose). Something odd going on there which I'll have to look into.
If you have 010 Editor (a hex editor, can download a 30 day trial with a quick google), I have an up-to-date template for the M3 format. I'll upload it to the libm3 site. It puts the binary data into easy to read structures. I find it a much better system for parsing data.
well do the process that the IK snapper does manually, which is snap IK poses for some frames, then erase the IK Solvers.
The option can be found in the motion panel, select a solver and click IK/FK Snap.
That wont work as expected. I have too complicated Rigg for that.
But I found a way how to bake animations.
Anyway... I need to know how to preview model ingame. Do bones have specific name requirements ? Do I need texture ? How to create new unit with custom model, or how to assign custom model to already existing model ? How to add texture to assigned model in GE ?
:P
I tried few things, none of it works.
BTW: Does the size matter ? haha, no really :D, model size. How to resize ?
To preview them "fast" in game what I do is I name all my models to SCV.m3 and I save them under LibertyMulti.SC2Mod\Assets\Units\Terran\SCV\ I uncheck the "Use internal path" in the exporter plugin and save the model's texture to LibertyMulti.SC2Mod\Assets\Textures \
That way I don't have import them in GE every single time I want to test a new change on the model.
However, to get them inside a map, the GE import manager should be able to import the .m3 file just fine. It should auto load the texture too. Then you can assign it to an existing model.
If you really do need an step by step I can do it but really, it's not hard >.>
I know all that. I dont know how to assign model o a unit :D .ΕΎ
:D :D Stupid me.
I just have to place SCV on the map ?
"and I save them under LibertyMulti.SC2Mod\Assets\Units\Terran\SCV\" how do you mean ?
EDIT2: what can cause model not being invisible ? First I experienced this problem, so I posted this question here, about not knowing how to make it work.
Missing texture ? I did your way(basically what I did before...) got same problem.
How to change size of unit ? Gonna search for that now. I think that's the problem..
EDIT3: Oh I did evythign fine first time... I just had to scale down the size of unit. Its HUGE !
OK, got it, but frames are not kinda messy...
WEll animations wont export right... I am doing something wrong...
Bindpose, base ? What is this for ? Read it but dont get it :P .
Anyone knows any good IK to FK for 3dsmax ?
I have to remove all shapes and helpers so I can export mesh. Need scene with bones and mesh. And I am using different shapes for my rigg.
<<reply 98589>>
Nin I would have responded earlier but I have work to do every so often =)
Oh don't even get me started on Max's rotation Matrix.
Really next time I am at Siggraph or GDC I am going to beat someone with a stick. A lot.
Some of the issues look to be coming from parenting. That is what I am starting out with at least. Why start there.
Glad you asked.
If you know the parent and the child of a bone it becomes a trival task in auto bone creation.
you get do the following:
[code]<br> This is taken from Mike Comets Auto Rigger for Max 6 and Above. <br> My Notes on this: <br> -- ptToe and ptAnkle in the Auto Rigger are the locations of points that later become bones. <br> -- since you are basically auto generating the bones on the fly you can do basically the same thing. <br> -- Create points first for location, placement and parenting then Replace those with Bones.</p> <p>vec = ptToe.pos - ptAnkle.pos -- get nice vector to determine Z up<br> vec = cross [0,0,1] vec; -- now make vec more on side not front/back</p> <p> bUL = BoneSys.createBone ptLeg.pos ptKnee.pos vec; -- upper leg<br> <a href="http://bUL.name" rel="nofollow">bUL.name</a> = (prefix+"_upperLeg_"+LR+"_BN"); <br> boneSetup bUL true mixColor:sideColor;<br> bLL = BoneSys.createBone ptKnee.pos ptAnkle.pos vec; -- lower leg<br> <a href="http://bLL.name" rel="nofollow">bLL.name</a> = (prefix+"_lowerLeg_"+LR+"_BN");<br> boneSetup bLL true mixColor:sideColor;<br> bFT = BoneSys.createBone ptAnkle.pos ptBall.pos vec; -- foot<br> <a href="http://bFT.name" rel="nofollow">bFT.name</a> = (prefix+"_foot_"+LR+"_BN");<br> boneSetup bFT true mixColor:sideColor;<br> bTO = BoneSys.createBone ptBall.pos ptToe.pos vec; -- toe<br> <a href="http://bTO.name" rel="nofollow">bTO.name</a> = (prefix+"_toe_"+LR+"_BN");<br> boneSetup bTO true mixColor:sideColor;</p> <p>[/code]
This of course is just a sample. My intial thought on this is to Create an Array matrix to record the parent child relationships
This way I can create everything cleanly. This should remove the gimbal locks of most everything. BTW I HATE max rotations.
Last Gmax that I am aware was based on Max 5. As of Max 6 there were some changes to core script parts. The bone creation is much different in Max 6 and higher. There are also other max script changes as well. Which is one of the reasons you will see on most scripts that saw good for Max 6.0 and Higher.
You cna get a trail verision of Max, and if you have a student .edu email address you should be able to get a student version of Max. In most cases if you can get a your hands on a student ID you can get a student /Educational Verision of most any software fairly inexpensively. This is a much better route then dredging through the dark places on the internet for other methods.
WOOOOOOOOO!
Sorry, had to do that.
This is having major issues importing some of my WoW models in mdx format, the animations get totally destroyed. :\
Even non-WoW mdx's are getting destroyed.
I'm having some issues animating my own models :P
First of I tried importing a ghost and modifying the bone animations a bit just to see how the exporter worked. The importer seems to be importing just a bit of the animation, somewhere around frames 5600k to 6600k. That was the "walking" animation. But I couldn't see any of the others.
The exporter works just great, whatever I modified worked, though, since I couldn't view the other frames that weren't walking animation the model just stayed still on the other animations.
Then I tried animating my link model and it got even more lulzy, I couldn't view the mesh at all, just the shadows it casted.
Can you please explain what animation "steps" are required for a model to work properly? I'm probably just doing something wrong but I'd like more input as to where I could've got lost.
@xcorbo: Go
Put sc2plugins.ms in your plugins directory so that it autoloads when max loads. Or you can just use 'run script' to load it before you import a model. A 'M3 - Sequences' utility should appear in the maxscript utilities menu for animation browsing. I'll be doing a tutorial at some point to make this all clearer however I'm midway through university exams so most of my spare time is devoted to study.
At the moment the ghost is exporting really messed up. It has something to do with the base frame going awry. I'll be fixing the problem in future updates. It's good to let me know about any models that have severe problems. They're a useful way to improve the plugins.
I can't stress enough, sc2plugins.ms must be running. It adds alot of vital functionality to the two scripts. You cannot create or edit animations properly without the plugin loaded as it contains a very handy animations UI, and the custom starcraft 2 shader and bitmaps I've designed will not be present without it loaded. It's absolutely essential for editing your models properly with the extra M3-specific properties I've integrated into the custom materials and animation UI. Once again, sc2plugins.ms should be loaded before you import or export. Placing it in your 3dsmax\Plugins directory will cause it to be loaded automatically upon launching 3dsmax. Importing/Exporting without it loaded is asking for trouble ><.
You are going to have no end of issues with the Ultralisk. This is primarily due to the fact it has a bad name in the Bone heirarchy. You can see it in the SC2 GE (Star Craft 2 Galaxy Editor). If you turn on View Bones. You will see the ~DUP~ as a duplicated Name for its Tail. I have already Bugged this with Bliz on their Forums.
There are a number of models with Bad names. So the problem may not be entirely on you NiN. It may be on Blizzard's side for sending out bad models to begin with.
The ghost model has some issues with its heirachy to begin with as well. One of the key tip offs is that Dummy01 and such should be coming in as a DummyHelper and not a Bone. I am fairly sure that the Ref_* objects should all be Point Helpers (setup as Boxes) it looks like they are all being duplicated at the moment and made bones.
you can do something like the following
-- Existing Object
/*
* objExists() - Given an object name, with or w/o $, this tells if it exists or not.
* Returns true on exists, false otherwise.
*/
fn objExists objname =
(
name="";
if (objname[1] == "$") then -- already have $ in it?
name = objname;
else
name = ("$"+objname);
ret = execute(name+" != undefined");
return (ret);
)
to check to see if a name matches.
resulting in something like this
if (objExists("$"+"Ref_*")) then
(
print "Do something here"
)
I use this bit with more precision since I know the naming convention that I use in my own companies Rigs.
@NiNtoxicated01: Go
Totally missed the M3 sequences part, thanks!
The sc2plugins.ms was already copied to my max plugins folder, so I didn't have to load it everytime.
M3 export v0.16b is a really small update that fixes the skinned bone issues. Use that with the other 1.2 plugin files. Just tested it with the Ultralisk and the Ghost models, they both export with correct animations. The ultralisk has really wacky animations in 3ds max but exports them correctly to M3. The ultralisk has massive import/export times (30 seconds for the export on my end). I'll have to figure out solutions for that.
@darksuit: Go
I hear what you're saying. The problem is of course that the Ref_ objects are defined as bones in the M3 file. I could just treat them as point helpers instead of bones when you import but I don't know if that's the correct way to do things. Ultimately I want the M3 file to be imported as objectively as possible, without my arbitrary intervention. The Dummy01 bone definition in the ghost is interesting. It suggests that maybe when Blizzard are exporting their M3's they're using dummy boxes as part of their bone chains and those dummy boxes get converted into bones upon export. This would be pretty easy to code for in the exporter. The other problem is M3's have an entirely seperate attachment-style definition which specifies bones as their parent. This again could be done simply with a dummy box acting as an attachment then having a bone specified during export instead of requiring a bone AND a dummy helper in 3ds max.
I'll think about those kind of features. Right now attachments and dummy boxes aren't my biggest priority. My top priorities are to get accurately imported models, especially animations, and to export animations equally accurate. Particles/Ribbons will be next on my hitlist once animations are exported properly.
Got the sequences thing, but now it seems to not be saving wether the animations loop or not. I've managed to animate my link model gave him a walk[0] and stand[1] animation but when I make it walk it starts the animation, stops after being played once and then it returns to stand pose after it's done walking :P
Have tried closing/opeing the max scene and importing back the .m3 and the M3 sequence plug in always shows the "looping" as unchecked.
@NiN Oh trust me I understand. It makes me rather curious to know what it happening under the hood. I am halfway tempted to write an reader for the binary so just see all the information and how its laid out. I am thinking that the M3 format might read them as bones but they may not start out in life that way. They may just be packing them in as bones for the sake of size. Those Helpers may be points to help zero out the rotations of bones.
I am using the SC2 GE as my baseline since that is the reader/viewer that Blizz has provided. I have some auto rig scripts for max that I have to work on today, but I will see about kicking around the bones and such this weekend.
Or I may just write a Binary reader for the M3 format so I can see what it says in the file. I really want to see every last bit in that file and then decrypt that.
Unfuntuntely there is of course no one at Blizz that can give us the right information. However I can certianly gleen information based on what was not done or left behind. via naming and such.
Ah, some of the animations when imported are definitely broken still (My test is the Thor), but it's improving every version. Last time there were parts freaking out all over the place, now it's just the rear of the guns and the legs.
Too bad I don't know how to do anything other than basic modeling, or I'd try throwing in my mecha spider.
http://img147.imageshack.us/img147/4402/spider11gd8.jpg
He'd need working ik for sure.
@xcorbo: Go
Ah xcorbo, my very bad, the animation info is not being updated correctly. It'll be fixed in a soon to be released update.
@IskatuMesk: Go
Alot of the models are freaking out in 3ds max. The ultralisk and the immortal are two very good examples. I'm working on figuring out the problem with those. Some of the warped animations are just messed up in max. The ultralisk exported back to M3 animates fine in the GE previewer. I'll have a look at the Thor model too.
@Omnimmotus: Go
I've had a look at the DarkTemplar model. Very bizzare. There's a bone being placed waaaaaaay out in the middle of nowhere. I've triple checked the M3 binary data and the bone is actually meant to be there according to the M3 file. Thank you Blizzard for cleaning up your models ><. It's messing up max pretty good, zooming gets destroyed by that rogue bone. As for the leg bone being curled up, I'll have to look into that, not sure why it's happening exactly. Exporting that model back to M3 has unexpected effects, such as the leg bone being completely missing even if I'm exporting without animation info (i.e. just the bindpose). Something odd going on there which I'll have to look into.
@darksuit: Go
If you have 010 Editor (a hex editor, can download a 30 day trial with a quick google), I have an up-to-date template for the M3 format. I'll upload it to the libm3 site. It puts the binary data into easy to read structures. I find it a much better system for parsing data.
How hard would it be for you to make a standalone 3ds-to.m3 program?
NiN, how sure are you Blizz wont release game with updated models ?
I mean, they could have changed some code in models, improve them. Fix problems.
So How I can actually test model ingame ? Step by step please. Ty BTW if there is texture missing, what will happen ?
well do the process that the IK snapper does manually, which is snap IK poses for some frames, then erase the IK Solvers.
The option can be found in the motion panel, select a solver and click IK/FK Snap.
That wont work as expected. I have too complicated Rigg for that. But I found a way how to bake animations.
Anyway... I need to know how to preview model ingame. Do bones have specific name requirements ? Do I need texture ? How to create new unit with custom model, or how to assign custom model to already existing model ? How to add texture to assigned model in GE ?
:P
I tried few things, none of it works.
BTW: Does the size matter ? haha, no really :D, model size. How to resize ?
To preview them "fast" in game what I do is I name all my models to SCV.m3 and I save them under LibertyMulti.SC2Mod\Assets\Units\Terran\SCV\ I uncheck the "Use internal path" in the exporter plugin and save the model's texture to LibertyMulti.SC2Mod\Assets\Textures
\ That way I don't have import them in GE every single time I want to test a new change on the model.
However, to get them inside a map, the GE import manager should be able to import the .m3 file just fine. It should auto load the texture too. Then you can assign it to an existing model.
If you really do need an step by step I can do it but really, it's not hard >.>
I know all that. I dont know how to assign model o a unit :D .ΕΎ
:D :D Stupid me.
I just have to place SCV on the map ?
"and I save them under LibertyMulti.SC2Mod\Assets\Units\Terran\SCV\" how do you mean ?
EDIT2: what can cause model not being invisible ? First I experienced this problem, so I posted this question here, about not knowing how to make it work. Missing texture ? I did your way(basically what I did before...) got same problem.
How to change size of unit ? Gonna search for that now. I think that's the problem..
EDIT3: Oh I did evythign fine first time... I just had to scale down the size of unit. Its HUGE !
OK, got it, but frames are not kinda messy...
WEll animations wont export right... I am doing something wrong...
Bindpose, base ? What is this for ? Read it but dont get it :P .