|
|
« Reply #405 on: August 12, 2010, 04:54:30 AM » |
|
Did my quick fix not work for you Death?
|
|
« Last Edit: August 12, 2010, 05:17:49 AM by DrPanda »
|
Logged
|
|
|
|
|
|
|
« Reply #406 on: August 12, 2010, 05:30:14 AM » |
|
Yeah it is far from perfect, and looking at Mariokart's new vid I'd say I won't need to continue using it. I would check out the vid you posted to see if I can help, but my comp is uber slow and it will probably take half a day for the vid to download
|
|
|
Logged
|
|
|
|
|
|
|
« Reply #407 on: August 12, 2010, 06:50:04 AM » |
|
Hey there, I am new to this board Well, I am having a problem not yet named I think. Everytime I want to import vertex sets from specific non-brawl models, Max spits out the following: I don't know if I am doing sth wrong, but as other Vertex sets work, I assume it has sth to do with them. I uploaded some of them here (don't care about the ddf; I try to handle them since DDVB1 and as the script doesn't care for the ending ): http://vuze.celes-network.de/tempfiles/notworkingsets.zipI would really appreciate if sb could take a look at them; maybe this can be fixed by editing the script. Thanks in advance!
|
|
|
Logged
|
|
|
|
|
|
|
« Reply #408 on: August 12, 2010, 07:49:45 AM » |
|
OH MY GOD! Finally! Finally?? I sure hope so.
I went over MarioKarts latest method again. And I think I pieced together how to fix my problems. So I THINK I'm good. For now anyway.
|
|
« Last Edit: August 12, 2010, 07:51:55 AM by Apprentice Of Death »
|
Logged
|
|
|
|
|
|
|
« Reply #409 on: August 12, 2010, 10:56:29 AM » |
|
err.. your video is easy to understand and all, but I can't get the new script to work... I paste it, press evaluate all, and nothing happens. If I try to save it and then run it, it says syntax error.
edit: when I copy it from the "code" thing, it doesn't work, but if I click "quote" then copy it from there, it works... but it's the june 22 version?! never mind, there's 2 codes in the post. The june 22 version works, the new one still gives me the error.
|
|
« Last Edit: August 12, 2010, 11:09:42 AM by Segab »
|
Logged
|
|
|
|
|
|
|
« Reply #410 on: August 12, 2010, 03:03:13 PM » |
|
hm, it was late, maybe i pasted the wrong code. I'll double check editI remember when i was on winXP, anything I used from my friends win7 machine wouldn't work. due to a syntex error. we couldn't figure it out, but my assumption was that win7 was using some strange new unicode which would inject random characters into the script. causing it to be broken when used on another system. I think this maybe the case? so here I've quoted the script below. and also I've included a RTF file, which maybe retain the unicode. please try both and report any issues between the copy and pasted script, and the RTF exported script. http://cid-c59ea3c98a300f31.office.live.com/self.aspx/.Public/MaxScripts/Wii%5E_BrawlScript%5E_.zipfn readBEshort fstream = ( short = readshort fstream #unsigned short = bit.swapBytes short 1 2 return short ) fn readBElong fstream = ( long = readlong fstream long = bit.swapBytes long 1 4 long = bit.swapBytes long 2 3 return long ) fn ReadBEfloat fstream = ( fpt=readfloat fstream itger = bit.floatAsInt fpt hih = bit.intashex itger while hih.count < 8 do hih = "0" + hih shn = (substring hih 7 2) + \ (substring hih 5 2) + \ (substring hih 3 2) + \ (substring hih 1 2) bit.intAsFloat (bit.hexasint shn) ) fn WriteBEFloat fnum = ( intgr = bit.floatAsInt fnum honey = bit.intashex intgr while honey.count < 8 do honey = "0" + honey sign = (substring honey 7 2) + \ (substring honey 5 2) + \ (substring honey 3 2) + \ (substring honey 1 2) xintgr=bit.intAsFloat (bit.hexasint sign) return xintgr )
rollout DDV "Brawl VertexHacker Tool" width:311 height:257 ( button btn1 "Import Verts" pos:[9,10] width:144 height:40 label lbl0 "-Mario_Kart64n, (Aug 11, 2010)" pos:[153,238] width:156 height:23 button btn2 "Export Verts" pos:[8,56] width:144 height:40 checkbox chk1 "Checkbox" pos:[165,59] width:14 height:13 enabled:false checked:false label lbl1 "Save as 3DS File" pos:[182,58] width:119 height:15 enabled:false checkbox chk2 "Checkbox" pos:[165,76] width:14 height:13 enabled:false checked:false label lbl2 "Save As Seperate Files" pos:[182,75] width:119 height:15 enabled:false checkbox chk3 "Checkbox" pos:[165,94] width:14 height:13 enabled:true checked:true label lbl3 "Save Changes to MDL0" pos:[180,93] width:119 height:15 checkbox chk4 "Checkbox" pos:[165,112] width:14 height:13 enabled:true checked:true label lbl4 "Read Offset from File" pos:[180,111] width:119 height:15 editText edt1 " MDL0 Offset:" pos:[162,129] width:130 height:16 groupBox grp1 "Export Options" pos:[157,7] width:143 height:147 radioButtons rdo1 "" pos:[165,21] width:147 height:32 labels:#("Vertices", "Texture Corrdinates") default:1 columns:1 button btn3 "Create" pos:[15,138] width:60 height:30 button btn4 "Patch" pos:[81,138] width:60 height:30 label lbl8 "Don't Use EditPoly" pos:[31,119] width:119 height:15 enabled:false groupBox grp3 "Patching Options" pos:[7,101] width:143 height:76 checkbox chk8 "Checkbox" pos:[15,120] width:14 height:13 enabled:false checked:false button btn5 "Fix AiS Import" pos:[165,205] width:128 height:25 groupBox grp2 "AiS Fixing Options" pos:[155,154] width:143 height:79 checkbox chk5 "Checkbox" pos:[166,173] width:14 height:13 enabled:true checked:false label lbl5 "Selected Only" pos:[182,172] width:111 height:15 enabled:true checkbox chk6 "Checkbox" pos:[167,189] width:14 height:13 checked:true label lbl6 "Scale" pos:[183,188] width:44 height:15 checkbox chk7 "Checkbox" pos:[222,189] width:14 height:13 enabled:false checked:true label lbl7 "Rotate" pos:[239,188] width:44 height:15 button btn6 "Import" pos:[14,198] width:60 height:30 enabled:false button btn7 "Export" pos:[80,198] width:60 height:30 enabled:false groupBox grp4 "VertexWeighting" pos:[6,180] width:143 height:72 enabled:false label lbl9 "Dump to LogFile" pos:[38,232] width:105 height:15 enabled:false checkbox chk9 "Checkbox" pos:[22,233] width:14 height:13 enabled:false checked:false
local typedOffset=""
on edt1 entered txt do( if txt != "" do( typedOffset=txt as float if typedOffset==undefined do( typedOffset=0 messageBox "Error: User Input \n Value Cannot be Identified \n as either a dec or hex number" ) if typedOffset<=0 do( typedOffset=typedOffset*-1 ) local typedOffset ) )
on btn1 pressed do( fsource = GetOpenFileName \ caption:"Brawl Vert Import" types: \ "All files (*.*)|*.*|" if fsource!=undefined do( f= fopen fsource "rb" fpath= getFilenamePath fsource fname = getFilenameFile fsource
vertArray=#() uvwArray=#() faceArray=#()
fSize=readBElong f mdlOffset=readBElong f dataOffset=readBElong f strOffset=readBElong f vertID=readBElong f vUkn1=readBElong f --flag? is XYZ? dataType=readBElong f entryStride=readBEshort f numVertices=readBEshort f eMinX=readBEfloat f eMinY=readBEfloat f eMinZ=readBEfloat f eMaxX=readBEfloat f eMaxY=readBEfloat f eMaxZ=readBEfloat f pad=readBElong f pad=readBElong f
if entryStride==12 then( for x = 1 to numVertices do( vX=readBEfloat f vY=readBEfloat f vZ=readBEfloat f append vertArray[vX,vY,vZ] append uvwArray[0,0,0] ) ) else( for x = 1 to numVertices do( vX=readBEfloat f vY=readBEfloat f vZ=0 append vertArray[vX,vY,vZ] append uvwArray[0,0,0] ) ) msh = mesh vertices:vertArray faces:faceArray --build mesh msh.numTVerts = vertArray.count msh.name=fname buildTVfaces msh select msh
messageBox "Done !" gc() fclose f ) )
on btn2 pressed do( doVerts=chk8.checked doUVs=rdo1.state do3DS=chk1.checked doDUMP=chk2.checked doMDL=chk3.checked doOffset=chk4.checked if doUVs==1 do( obj=getCurrentSelection() obj.pos = [0,0,0] obj.rotation = quat 0 0 0 0 local mdlSize="" local mdlOffset="" local numEntrtices="" -- if doOffset==true then( fsource = GetOpenFileName \ caption:"Select UVSet to Replace" types: \ "All files (*.*)|*.*|" if fsource!=undefined do( f=fopen fsource "rb" mdlSize=readBElong f-64 mdlOffset=(readBElong f*-1)+64 dataOffset=readBElong f strOffset=readBElong f vertID=readBElong f vUkn1=readBElong f --flag? is XYZ? dataType=readBElong f entryStride=readBEshort f numEntrtices=readBEshort f fclose f ) ) else( for g = 1 to obj.count do( tmesh = snapshotAsMesh obj[g] num_verts = tmesh.numverts num_uvws = tmesh.numtverts num_faces = tmesh.numfaces
mdlSize=(num_verts*12)+64 mdlOffset= typedOffset+64 numEntrtices=num_verts
delete tmesh ) )
-- fsource = GetOpenFileName \ caption:"Select the MDL0 to inject to" types: \ "MDL0(*mdl0)|*.mdl0|All files (*.*)|*.*|" if fsource!=undefined do( fext= getFilenameType fsource fsize= getFileSize fsource fpath= getFilenamePath fsource fname= getFilenameFile fsource fclose f
-- deleteFile (fpath+fname+"_backup"+fext) copyFile fsource (fpath+fname+"_backup"+fext) f=fopen (fpath+fname+"_backup"+fext) "rb" s = fopen fsource "wb"
print "ffff" print mdlOffset for wr = 1 to mdlOffset do( read=readbyte f write=writebyte s read )
fseek f -34 #seek_cur lenCheck=readBEshort f fseek f 32 #seek_cur
if numEntrtices==lenCheck then(
for g = 1 to obj.count do( tmesh = snapshotAsMesh obj[g] num_verts = tmesh.numverts num_uvws = tmesh.numtverts num_faces = tmesh.numfaces
padding=((mdlSize/8)-numEntrtices)
for t = 1 to numEntrtices do( tv=getVert tmesh t nSwap=writeBEfloat tv[1] write=writelong s (bit.floatasint nSwap) nSwap=writeBEfloat tv[2] write=writelong s (bit.floatasint nSwap) nSwap=writeBEfloat tv[3] write=writelong s (bit.floatasint nSwap) )
-- for p = 1 to padding do( -- write=writelong s 0 -- write=writelong s 0 -- )
delete tmesh )
fseek f (mdlOffset+(numEntrtices*12)) #seek_set for wr = 1 to (fsize-(mdlOffset+(numEntrtices*12))) do( read=readbyte f #unsigned write=writebyte s read ) messageBox "DONE!" ) else( gc() fclose f fclose s deleteFile (fpath+fname+fext) renameFile (fpath+fname+"_backup"+fext) (fpath+fname+fext) messageBox "ERROR! Wrong Offset?" )
) ) if doUVs==2 do( obj=getCurrentSelection() obj.pos = [0,0,0] obj.rotation = quat 0 0 0 0
-- if doOffset==true then( fsource = GetOpenFileName \ caption:"Select UVSet to Replace" types: \ "All files (*.*)|*.*|" if fsource!=undefined do( f=fopen fsource "rb" mdlSize=readBElong f-64 mdlOffset=(readBElong f*-1)+64 dataOffset=readBElong f strOffset=readBElong f vertID=readBElong f vUkn1=readBElong f --flag? is XYZ? dataType=readBElong f entryStride=readBEshort f numEntrtices=readBEshort f fclose f ) ) else( for g = 1 to obj.count do( tmesh = snapshotAsMesh obj[g] num_verts = tmesh.numverts num_uvws = tmesh.numtverts num_faces = tmesh.numfaces
padding=((mdlSize/8)-numEntrtices)
mdlSize=num_verts*8 mdlOffset= typedOffset+64 numEntrtices=num_verts
delete tmesh ) )
-- fsource = GetOpenFileName \ caption:"Select the MDL0 to inject to" types: \ "MDL0(*mdl0)|*.mdl0|All files (*.*)|*.*|" if fsource!=undefined do( fext= getFilenameType fsource fsize= getFileSize fsource fpath= getFilenamePath fsource fname= getFilenameFile fsource fclose f
-- deleteFile (fpath+fname+"_backup"+fext) copyFile fsource (fpath+fname+"_backup"+fext) f=fopen (fpath+fname+"_backup"+fext) "rb" s = fopen fsource "wb"
print "ffff" print mdlOffset for wr = 1 to mdlOffset do( read=readbyte f write=writebyte s read )
for g = 1 to obj.count do( tmesh = snapshotAsMesh obj[g] num_verts = tmesh.numverts num_uvws = tmesh.numtverts num_faces = tmesh.numfaces
padding=((mdlSize/8)-numEntrtices)
if num_uvws!=0 then( for t = 1 to numEntrtices do( tv=getTVert tmesh t nSwap=writeBEfloat tv[1] write=writelong s (bit.floatasint nSwap) nSwap=writeBEfloat tv[2] write=writelong s (bit.floatasint nSwap) ) ) else( for t = 1 to numEntrtices do( tv=getVert tmesh t nSwap=writeBEfloat tv[1] write=writelong s (bit.floatasint nSwap) nSwap=writeBEfloat tv[2] write=writelong s (bit.floatasint nSwap) ) )
-- for p = 1 to padding do( -- write=writelong s 0 -- write=writelong s 0 -- )
delete tmesh )
fseek f (mdlOffset+(numEntrtices*8)) #seek_set for wr = 1 to (fsize-(mdlOffset+(numEntrtices*8))) do( read=readbyte f #unsigned write=writebyte s read )
) ) gc() fclose f fclose s )
on btn3 pressed do( fsource = GetOpenFileName \ caption:"Brawl Vert Import" types: \ "All files (*.*)|*.*|" if fsource!=undefined do( f= fopen fsource "rb" fpath= getFilenamePath fsource fname = getFilenameFile fsource
vertArray=#() uvwArray=#() faceArray=#()
fSize=readBElong f mdlOffset=readBElong f dataOffset=readBElong f strOffset=readBElong f vertID=readBElong f vUkn1=readBElong f --flag? is XYZ? dataType=readBElong f entryStride=readBEshort f numVertices=readBEshort f eMinX=readBEfloat f eMinY=readBEfloat f eMinZ=readBEfloat f eMaxX=readBEfloat f eMaxY=readBEfloat f eMaxZ=readBEfloat f pad=readBElong f pad=readBElong f
for x = 1 to numVertices do( vX=readBEfloat f vY=readBEfloat f vZ=readBEfloat f append vertArray[vX,vY,vZ] append uvwArray[0,0,0] )
obj=getCurrentSelection() obj.pos = [0,0,0] obj.rotation = quat 0 0 0 0 max modify mode addModifier obj (edit_poly()) subobjectLevel = 1 -- modPanel.setCurrentObject obj.modifiers[#Edit_Poly] diffArray=#() directionArray=#() for x = 1 to numVertices do( $.modifiers[#Edit_Poly].SetSelection #Vertex #{} $.modifiers[#Edit_Poly].Select #Vertex #{x} vert=$.modifiers[#Edit_Poly].GetVertex x -- $.modifiers[#Edit_Poly].SetOperation #Transform
mX=(vertArray[x][1])-(vert[1]) mY=(vertArray[x][2])-(vert[2]) mZ=(vertArray[x][3])-(vert[3])
append diffArray[mX,mY,mZ]
)
deleteModifier obj 1
createFile (fpath+fname+"_patch.pta") s = fopen (fpath+fname+"_patch.pta") "ab" vcount=writelong s numVertices for x = 1 to numVertices do( write=writefloat s (diffArray[x][1]) write=writefloat s (diffArray[x][2]) write=writefloat s (diffArray[x][3]) write=writelong s 0x0 ) messageBox ("Patch Created !" +"\n"+ "\n"+ "File Saved To:" +"\n"+ (fpath+fname+"_patch.pta") )
gc() fclose s fclose f ) )
on btn4 pressed do( fsource = GetOpenFileName \ caption:"Brawl Vert Patcher" types: \ "Patch(*pta)|*.pta|All files (*.*)|*.*|" if fsource!=undefined do( f= fopen fsource "rb" fpath= getFilenamePath fsource
vertArray=#() vcount=readlong f #unsigned for x = 1 to vcount do( vX=readfloat f vY=readfloat f vZ=readfloat f dmy=readshort f #unsigned side=readshort f #unsigned append vertArray[vX,vY,vZ,side] )
obj=getCurrentSelection() obj.pos = [0,0,0] obj.rotation = quat 0 0 0 0 max modify mode addModifier obj (edit_poly()) subobjectLevel = 1 --modPanel.setCurrentObject obj.modifiers[#Edit_Poly] for x = 1 to vcount do( $.modifiers[#Edit_Poly].SetSelection #Vertex #{} $.modifiers[#Edit_Poly].Select #Vertex #{x} vert=$.modifiers[#Edit_Poly].GetVertex x $.modifiers[#Edit_Poly].SetOperation #Transform mX=(vertArray[x][1]) mY=(vertArray[x][2]) mZ=(vertArray[x][3]) $.modifiers[#Edit_Poly].MoveSelection [mX,mY,mZ] $.modifiers[#Edit_Poly].Commit () $.modifiers[#Edit_Poly].SetSelection #Vertex #{} ) subobjectLevel = 0 --modPanel.setCurrentObject obj.modifiers[#Edit_Poly]
messageBox "Patched !"
gc() fclose f ) )
on btn5 pressed do(
disableSceneRedraw() st = timestamp() --get start time in milliseconds undo off( delete $helpers if chk7.checked==true then( geo=getCurrentSelection() delete $helpers stuff=#() if geo.count!=0 do( for x = 1 to geo.count do(
addModifier geo[x] (Normalmodifier ()) geo[x].modifiers[#Normal].flip = on addModifier geo[x] (smooth ()) geo[x].modifiers[#Smooth].smoothingBits = 1 collapseStack geo[x] if chk6.checked==true do( --rotate geo[x] (quat -1 0 0 0) geo[x].scale = [2.54,2.54,2.54] ) -- aBox = Box length:0.2 width:0.2 height:0.2 name:"dummy" aBox = Box() aBox.rotation = quat 0.707107 0 0 0.707107 aBox.name = (geo[x].name) as string convertTo aBox TriMeshGeometry -- convertTo geo[x] TriMeshGeometry attach aBox geo[x] -- update aBox geometry:true delete aBox.verts[#{1..8}] addModifier aBox (Morpher ()) append stuff aBox ) addModifier stuff (Edit_Mesh ()) ) ) else( geo=$polygon* for x = 1 to geo.count do( addModifier geo[x] (Normalmodifier ()) geo[x].modifiers[#Normal].flip = on addModifier geo[x] (smooth ()) geo[x].modifiers[#Smooth].smoothingBits = 1 collapseStack geo[x] if chk6.checked==true do( --rotate geo[x] (quat -1 0 0 0) geo[x].scale = [2.54,2.54,2.54] ) ) delete $helpers for x = 1 to geo.count do( -- aBox = Box length:0.2 width:0.2 height:0.2 name:"dummy" aBox = Box() aBox.rotation = quat 0.707107 0 0 0.707107 convertTo aBox TriMeshGeometry ) dmy=$Box* myBoxes=#() myMeshes=#() for x = 1 to geo.count do( objA= dmy[x] objB= geo[x] append myBoxes objA append myMeshes objB )
for x = 1 to geo.count do( myBoxes[x].name = myMeshes[x].name attach myBoxes[x] myMeshes[x] )
for x = 1 to geo.count do( for i = 1 to 8 do( delete geo[x].verts[#{1}] ) addModifier geo[x] (Morpher ()) ) addModifier $Polygon* (Edit_Mesh ()) ) ) et = timestamp() --get end time in milliseconds enableSceneRedraw() gc() print ("Operation Completed In: "+(((et-st)/60)as string)+" Seconds") --print time to finish ) )
createDialog DDV
|
|
« Last Edit: August 12, 2010, 03:17:51 PM by mariokart64n »
|
Logged
|
|
|
|
|
|
|
« Reply #411 on: August 12, 2010, 04:19:46 PM » |
|
the .ms worked, thanks! (I haven't tried making a model with it yet though) also, is it possible that it's impossible to vertex hack Pikachu properly without messed up ears/tail and stuff?
|
|
« Last Edit: August 12, 2010, 04:21:04 PM by Segab »
|
Logged
|
|
|
|
|
|
|
« Reply #412 on: August 12, 2010, 06:25:52 PM » |
|
its possible to correct, but its extremely difficult
|
|
|
Logged
|
|
|
|
|
|
|
« Reply #413 on: August 12, 2010, 06:39:01 PM » |
|
like trial and error and stuff? nah.
do you have a list of characters or parts that can't be edited, so we don't waste our time on something that won't work? it would be useful...
|
|
|
Logged
|
|
|
|
|
|
|
« Reply #414 on: August 12, 2010, 06:43:58 PM » |
|
theres no list lol.
simply anything using physics, ask yourself what is logical to be affected by wind. ... hair... capes... tails... long ears... every character has some bit using a physics bone. its just a matter of avoiding to edit these areas.
|
|
|
Logged
|
|
|
|
|
|
|
« Reply #415 on: August 12, 2010, 09:15:42 PM » |
|
Wario's jacket (And thus, his belly, which is attached to the same polygon) is one of those, and it's extremely disappointing that I can't get it to work right. I certainly hope someone finds a way to fix these. I've been able to fix most of his belly after about an hour of work, but the jacket part itself gets way to screwed up to fix by any conventional ways.
|
|
|
Logged
|
|
|
|
|
|
|
« Reply #416 on: August 13, 2010, 10:48:54 AM » |
|
Wario's jacket (And thus, his belly, which is attached to the same polygon) is one of those, and it's extremely disappointing that I can't get it to work right. I certainly hope someone finds a way to fix these. I've been able to fix most of his belly after about an hour of work, but the jacket part itself gets way to screwed up to fix by any conventional ways. I just....I just......woooooooooooooooooooooooooooooooooooooo ooah
|
|
|
Logged
|
|
|
|
|
|
|
« Reply #417 on: August 13, 2010, 11:00:44 AM » |
|
You know that when you use mariokart64's newest method, you can fix those out-of-place verts. All you have to do is find the ones that move and then edit them after you morph it with the messed-up model. The dimensions are are a little different, like up is right, but it still works.
|
|
|
Logged
|
|
|
|
|
|
|
« Reply #418 on: August 13, 2010, 01:33:02 PM » |
|
yup what he said is the method of trial and error you would need to use to get that to work. I haven't covered it in any videos, cause its dodgy, just randomly moving verts till it works. I understand your frustration. but theres no solid fix, not unless kyral finishes brawlbox.
|
|
|
Logged
|
|
|
|
|
|
|
« Reply #419 on: August 14, 2010, 08:04:22 AM » |
|
I've seen some people request a written guide recapitulating your latest video. I've just made a French tutorial that recaps it, and also with some beginner advices to using 3DS MAX 8. I'll probably translate it in English now. Mind if I post it in a new topic (it's quite big ...), or would you prefer to include it in your OP ?
|
|
|
Logged
|
Round and round the signature goes ~ ~ where it stops, nobody knows.
|
|
|
|
|