Wc3C.net BlizzImporter
 Register Rules Get Hosted! Chat Pastebin FAQ and Rules Members List Calendar

 03-25-2007, 04:29 PM #16 ProFeT User     Join Date: Aug 2003 Posts: 189 Submissions (1) Yes, tangents are not imported yet, and TCB (hermite) are converted into bezier controller. But i'll add tangents soon ;) Thanks for your help proposition, i haven't an internet connection at home yet, but i could ask you some questions on msn later. ;) __________________ 3dsMAX 5 Scripts: mdl importer : http://wc3campaigns.net/showthread.php?p=918051 (with animations) events editor : http://wc3campaigns.net/showthread.php?t=89816
 03-25-2007, 07:54 PM #17 BlinkBoy User   Respected User   Join Date: Dec 2003 Posts: 835 Submissions (4) Just in case, here's my code for Hermite and Bezier Interpolation, it calculates the points, tangents and everything. There's also a Quaternion library JASS:``` library Angles struct EulerAngles real z real y real x static method Quat2Euler takes Quat q returns EulerAngles local EulerAngles Eu = EulerAngles.create() set Eu.x= Rad2Deg(Atan2(2*(q.x*q.w + q.y*q.z), 1 - 2*(q.y*q.y + q.x*q.x))) set Eu.y = Rad2Deg(Asin(2*(q.w*q.y - q.z*q.x))) set Eu.z = Rad2Deg(Atan2(2*(q.z*q.w + q.y*q.x) , 1 - 2*(q.y*q.y + q.z*q.z))) return Eu endmethod static method Euler2S takes EulerAngles Eu returns string return "{ " + R2S(Eu.x) + ", " + R2S(Eu.y) + ", " + R2S(Eu.z) + " }" endmethod endstruct struct Quat real w = 0. real z = 0. real y = 0. real x = 0. static method Euler2Quat takes EulerAngles Eu returns Quat local Quat q = Quat.create() local real x = Deg2Rad(Eu.x / 2) local real y = Deg2Rad(Eu.y / 2) local real z = Deg2Rad(Eu.z / 2) local real c1 = Cos(x) local real c2 = Cos(y) local real c3 = Cos(z) local real s1 = Sin(x) local real s2 = Sin(y) local real s3 = Sin(z) set q.w = c1 * c2 * c3 + s1 * s2 * s3 set q.x = s1 * c2 * c3 - c1 * s2 * s3 set q.y = c1 * s2 * c3 + s1 * c2 * s3 set q.z = c1 * c2 * s3 - s1 * s2 * c3 return q endmethod static method Quat2S takes Quat q returns string return "{ " + R2S(q.x) + ", " + R2S(q.y) + ", " + R2S(q.z) + ", " + R2S(q.w) + " }" endmethod method add takes Quat q2 returns nothing set this.x = this.x + q2.x set this.y = this.y + q2.y set this.z = this.z + q2.z set this.w = this.w + q2.w endmethod static method sum takes Quat q1, Quat q2 returns Quat local Quat Q = Quat.create() set Q.x = q1.x + q2.x set Q.y = q1.y + q2.y set Q.z = q1.z + q2.z set Q.w = q1.w + q2.w return Q endmethod method product takes Quat q2 returns nothing set this.x = this.x*q2.w + this.y*q2.z - this.z*q2.y + this.w*q2.x set this.y = -this.x*q2.z + this.y*q2.w + this.z*q2.x + this.w*q2.y set this.z = this.x*q2.y - this.y*q2.x + this.z*q2.w + this.w*q2.z set this.w = -this.x*q2.x - this.y*q2.y - this.z*q2.z + this.w*q2.w endmethod //Note: Quaternions aren't commutative, so on q1*q2 != q2*q1, but |q1*q2| == |q2*q1|. static method productScalar takes Quat q1, Quat q2 returns Quat local Quat Q = Quat.create() set Q.x = q1.x*q2.w + q1.y*q2.z - q1.z*q2.y + q1.w*q2.x set Q.y = -q1.x*q2.z + q1.y*q2.w + q1.z*q2.x + q1.w*q2.y set Q.z = q1.x*q2.y - q1.y*q2.x + q1.z*q2.w + q1.w*q2.z set Q.w = -q1.x*q2.x - q1.y*q2.y - q1.z*q2.z + q1.w*q2.w return Q endmethod endstruct endlibrary library Interpolation type bezier3 extends location array [3] function Linear_Intp takes real a, real b, real t returns real return a + (b - a)*t endfunction function Bezier_Intp3 takes real a, real b, real c, real t returns real local real m = a + (b - a)*t local real n = b + (c - b)*t return m + (n - m)*t endfunction function Bezier_Intp3_Alt takes real a, real b, real c, real t returns real return a + 2*t*(b-a) + t*t*(c - 2*b + a) endfunction function Bezier_Intp4 takes real a, real b, real c, real d, real t returns real local real ab = a + (b - a)*t local real bc = b + (c - b)*t local real cd = c + (d - c)*t local real m = ab + (bc - ab)*t local real n = bc + (cd - bc)*t return m + (n - m)*t endfunction function Bezier_Intp4_Alt takes real a, real b, real c, real d, real t returns real local real m = t*t return a + 3*t*(b - a) + 3*m*(c - 2*b + a) + m*t*(3*(b-c) + d - a) endfunction function Bezier_Intp5 takes real a, real T1, real T2, real T3, real b, real t returns real local real ab = Linear_Intp(a,T1,t) local real bc = Linear_Intp(T1,T2,t) local real cd = Linear_Intp(T2,T3,t) local real dc = Linear_Intp(T3,b,t) local real i = Linear_Intp(ab,bc,t) local real j = Linear_Intp(bc,cd,t) local real k = Linear_Intp(cd,dc,t) local real m = Linear_Intp(i,j,t) local real n = Linear_Intp(j,i,t) return Linear_Intp(m,n,t) endfunction function Power takes real n, integer pow returns real if pow > 0 then return n*Power(n,pow-1) endif return 1.0 endfunction function GetCardTan takes real p1, real p3 returns real return 0.5*(p3-p1) endfunction // t = tension, c = continuety, b = bias // tension is how sharply the curve makes turns. // continuety specifies the rate of change between speed and direction. // bias specifies the direction of the curve. // sidenote: specify p1 as 0, when working with 2 points // sidenote2: for converting a 3dsmax TCB to a normal TCB you must use // MaxTCB2TCB function // the next function returns the intan of p2 function InTan takes real p1, real p2, real p3, real t, real c, real b returns real return (1-t)*(1-c)*(1+b)*(p2-p1)/2 + (1-t)*(1+c)*(1-b)*(p3-p2)/2 endfunction // the next function returns the outtan of p2 function OutTan takes real p1, real p2, real p3, real t, real c, real b returns real return (1-t)*(1+c)*(1+b)*(p2-p1)/2 + (1-t)*(1-c)*(1-b)*(p3-p2)/2 endfunction // element can be any TCB value, like tension. function MaxTcb2Tcb takes real element returns real return (element - 25.0) / 25.0 endfunction function Hermite_Intp takes real p1, real p2, real t1, real t2, real s returns real local real s2 = s*s local real h1 = 8.0*s*s2 - 9.0*s2 local real h2 = h1*(-1) local real h3 = s2*(s - 2.0) + s local real h4 = s2*(s - 1.0) set h1 = h1 + 1 return h1*p1 + h2*p2 + h3*t1 + h4*t2 endfunction endlibrary ``` __________________ Tools: NeoDex - a Gmax and 3ds Max modeling Toolset for Wc3! Learn to animate! check out my: Basic Animation Tutorial! Currently working at a sequel to my animation tutorial.
03-25-2007, 08:33 PM   #18
Chriz.
Vast Graphics Animator

Join Date: Jan 2006
Posts: 2,770

Submissions (17)

Holy hell...if this works, I'll be so grateful.

I'll try it myself soon.
__________________
Models Animated by Chriz.:
 Vast Graphics Goblin Mortar Trike, ToB:Inquisitor, ToB: Battlerager, ToB: Pirate War of the Three Hammers Dark Iron Slave, Firelord, Hugan Hammerlock, Drenn Stoneaxe, Mort Blackblade, Priest of Khaz, Bronzebeard Crossbowman, Bronzebeard Thane, Mountaineer, Obsidian Guard, Dark Iron Magi Mc ! Scamp: The Imp olofmoleman Trebuchet, Pleurosaurus, Spongebob Squarepants, Diplodocous Assorted Dionesiist: Ogre Butcher, Dan van Ohllus: Boo, xXm0RpH3usXx: Assorted

 03-25-2007, 08:43 PM #19 Lord.DarthVader User     Join Date: Mar 2006 Posts: 24 Nice but, where finds 3dmax 5? I have start creat models but 3d max is out of my range... In google only 3dmax 8 and higer is. Cant someone give link to 3d max 5? Pliss... :( __________________ Acathla Campaigns Watcher Samurai Legends Map Player Lord.DarthVader - Northrend (Europe) - Poland Sorry for bad English! Im not learned It in school. :(
 03-25-2007, 08:58 PM #20 TDR ♪♫   Modeling & Gallery Moderator   Join Date: Aug 2004 Posts: 4,481 Submissions (84) 3ds max is not for download. And you can't find version 5 anywhere. If you missed it 3-4 years ago, tough luck. __________________ DOOM models - currently on hold... I DON'T TAKE ANY REQUESTS! p o r t f o l i o Last edited by TDR : 03-25-2007 at 08:59 PM.
 03-25-2007, 09:57 PM #21 ProFeT User     Join Date: Aug 2003 Posts: 189 Submissions (1) Thanks Blinkboy, but 3dsMax already support quat and angles conversion, but i keep that in mind ... ;) __________________ 3dsMAX 5 Scripts: mdl importer : http://wc3campaigns.net/showthread.php?p=918051 (with animations) events editor : http://wc3campaigns.net/showthread.php?t=89816
 03-26-2007, 12:48 AM #22 Hey its X Dance puppet dance!     Join Date: Jul 2006 Posts: 252 Submissions (1) OMG OMG OMG I cant get my 3dsmax to work but does this import anims AND the model? if it does I love you. __________________ <>
03-26-2007, 03:10 PM   #23
Pris0n
User

Join Date: May 2006
Posts: 35

Submissions (1)

Quote:
 Originally Posted by Hey its X OMG OMG OMG I cant get my 3dsmax to work but does this import anims AND the model? if it does I love you.

yeah it does!
it worked fine for me
i used the Furion modell.
All worked fine
thx a lot your the best!!!!
but 3ds max 5 freezed for about 1 min to load the modell is that normal? (not that it freezes; i mean the time length)
__________________

03-26-2007, 03:31 PM   #24
Vexorian
Free Software Terrorist

Technical Director

Join Date: Apr 2003
Posts: 14,898

Submissions (37)

So far discreet should abandonware 3dsmax 5 haha... well there are still ways to get it though...
__________________
 Wc3 map optimizer 5.0 Someone should fix .wav sound in this thing. JassHelper 0.A.2.A Turns your simple code into something that is complicated enough to work.
 Wc3 map optimizer 5.0 JassHelper 0.A.2.A Xye 0.12.1 | Editor/Levels xe0.9 CS16.0 My spells jEdit modes for vJass&Zinc (v9) WarCiTy 0.2.0
Faster != more useful

03-26-2007, 08:17 PM   #25
Hey its X
Dance puppet dance!

Join Date: Jul 2006
Posts: 252

Submissions (1)

Quote:
 Originally Posted by Vexorian So far discreet should abandonware 3dsmax 5 haha... well there are still ways to get it though...

*cough* Vex's brother knows *cough*
__________________
<<There's a bit of X in all of us.>>

 03-30-2007, 02:24 AM #26 Mc ! Master Creator !   Acting art directorProject Member: WotTH   Join Date: Dec 2005 Posts: 1,432 Submissions (101) I do? Btw, this importer works perfectly for me. Good job! __________________ Download: Burning One! Awesomeness = #Rep / #Posts Last edited by Mc ! : 03-30-2007 at 02:37 AM.
 03-31-2007, 05:59 PM #27 ProFeT User     Join Date: Aug 2003 Posts: 189 Submissions (1) New version, first post updated =) __________________ 3dsMAX 5 Scripts: mdl importer : http://wc3campaigns.net/showthread.php?p=918051 (with animations) events editor : http://wc3campaigns.net/showthread.php?t=89816
04-03-2007, 07:11 AM   #28
Kojiro
User

Join Date: Oct 2002
Posts: 342

Quote:
 Type error: Call needs function or class, got: undefined <<

Tried importing a model with it into 3dsMax 9, that's the error that I got.

Any way to work around it?

 04-04-2007, 01:05 AM #29 Mc ! Master Creator !   Acting art directorProject Member: WotTH   Join Date: Dec 2005 Posts: 1,432 Submissions (101) it only works in 3dsmax 5 as far as I know. __________________ Download: Burning One! Awesomeness = #Rep / #Posts
 04-04-2007, 12:52 PM #30 xXm0rpH3usXx I want my rep back! asap     Join Date: Jan 2006 Posts: 854 Submissions (35) even if you can import it into version 9... why should you? art tools are only for 5 and you cant export again. and your not allowed to use blizz property in other games! __________________