maybe you can fix the cape issue, I'll post the WIP at my Mario'sCorner Topic in the mean while I'm trying to import the hair from the actual shinobu model itself. RandomTbush's method sounds like it should work, but I haven't had any success yet. but I'm not worried.. it's worked for Random before, so its a proven hackup
I made a maxscript to read a stripified DAE then write only the strips to a bin file as hex.
it follows what I sorta understand but it's not tested.. cause I haven't even gotten this to work yet the info supllied by RandomTbush really confused me after he said the polygon file doesn't have faces, its just ID's IDs IDs.. if thats the case I have no clue. cause there is alot of random numbers at the end of the polygon block.. but I can makeout the starting pattern, which also is backed up by the melee info
[2bytes] ID {9800=triStrips} [2bytes] FaceCount {??not sure on base unit 0 or 1} DAE uses 1, usually hex is 0 [2bytes][FaceCountx3] faces...
anyway here's the script, please test it out. I think I have the endian wrong
-- fn writeBElong fstream = ( -- long = readlong fstream -- long = bit.swapBytes long 1 4 -- long = bit.swapBytes long 2 3 -- return long -- )
-- fn readBEshort fstream = ( -- short = readshort fstream -- short = bit.swapBytes short 1 2 -- return short -- ) fn ReadFixedString bstream fixedLen = ( local str = "" for i = 1 to fixedLen do ( str += bit.intAsChar (ReadByte bstream #unsigned) ) str )
filetest="" while(filetest!="tristrips") do( file=bit.intAsChar (ReadByte f #unsigned) if file=="<" do( filetest=readFixedString f 9 triStripOffset=((ftell f)+7) fseek f -9 #seek_cur ) if filetest=="tristrips" then exit )
if triStripOffset!=undefined do( fseek f triStripOffset #seek_set faceCount="" do( file=bit.intaschar (ReadByte f #unsigned) if file=="\"" then exit if file!=" " do( faceCount+=file ) ) while (file!=" ") faceCount =(faceCount as float)
while(ftell f!=end) do( file=bit.intAsChar (ReadByte f #unsigned) if file=="<" do( filetest=readFixedString f 2 if filetest=="p>" then exit ) )
fseek f -4 #seek_cur start=ftell f -- while(ftell f!=end) -- do( -- file=bit.intAsChar (ReadByte f #unsigned) -- if file=="/" do( -- filetest=readFixedString f 9 -- if filetest=="tristrips" then exit -- ) -- ) -- last=ftell f -- stripSize=(last-start)
-- fseek f start #seek_set -- StripRead="" -- for x = 1 to stripSize do( -- StripRead+=bit.intAsChar (ReadByte f #unsigned) -- ) -- StripRead as stringStream -- fr=readDelimitedString StripRead " "
faceArray=#() stripCount=#() for x = 1 to faceCount do( counter=0 do( fseek f -1 #seek_cur file2=bit.intAsChar (ReadByte f #unsigned)
if file2=="<" then exit
face=""
do( file=bit.intAsChar (ReadByte f #unsigned) if file==" " then exit if file=="<" then exit if file!=" " do(face+=file)
)while(file!=" ")
face=(face as float) append faceArray face counter+=1 )while(file2!="<")
append stripCount counter fseek f 27 #seek_cur )
-- print faceArray -- print stripCount fclose f gc()
createFile (fpath+fname+"_strips.bin") s = fopen (fpath+fname+"_strips.bin") "ab" for x = 1 to stripCount.count do( write=writeshort s 0x0098 write=writebyte s stripCount[x] for i = 1 to stripCount[x]/3 do( write=writeshort s (bit.swapBytes (faceArray[1]) 1 2) write=writeshort s (bit.swapBytes (faceArray[2]) 1 2) write=writebyte s 0x00 write=writeshort s (bit.swapBytes (faceArray[3]) 1 2) deleteItem faceArray 1 deleteItem faceArray 1 deleteItem faceArray 1
) -- gc light:false delayed:false )
fclose s gc()
) wh = ftell f print wh
-- totalLength=readBElong f -- mdl0Offset=readBElong f -- nodeId=readBElong f -- elemFlags=readBElong f -- texFlags=readBElong f -- dataFlags=readBElong f -- defSize=readBElong f -- defFlags=readBElong f -- defOffset=readBElong f -- dataLen1=readBElong f -- dataLen2=readBElong f -- dataOffset=readBElong f -- unk2=readBElong f -- unk3=readBElong f -- stringOffset=readBElong f -- index=readBElong f -- numVertices=readBElong f -- numFaces=readBElong f -- vertSet=readBEshort f -- normalSet=readBEshort f -- fseek f 20 #seek_cur -- part10Offset=readBElong f -- dataJump=totalLength-dataLen1 -- fseek f dataJump #seek_set
the Export button isn't finished, I was going to make my own injector, instead o having to use DasDonkeyVertexBox... if that name wasn't long enough, its built on java.. and I just despise java.
and yes your right, there are a types of "shortcuts" but there not like 5second things.. they do however shave off a few hours of work. but in actually yes I am sitting here 16hours+ trying to remodel from scratch.
things like geometry wrapping and texture projection are 2 things I was going to cover in the next extensive video. but I've had alot of recent failure as I was working with mewtwo and shinobu, thus the videos were placed on hold.
the models are in pieces, separated by texture or material for whatever game technical reason. and thats how they are stored in the game files.
since we're not programming GOD's we use a very primitive method for grabbing vertices.. we simple dump them. we dump them as they are stored in the file, which is in pieces.
this makes modding extremely difficult, but they theory is, that A-B=C so therefore C+A=B or C+A=B .. meaning if we created a patch (finding a difference between coordinates) then we can subtract the difference, save it to a patch file, and reapply these values to a modified mesh which should offset the verts back and forth to a form where they are in pieces again
the updated script only has a tick box I called max2010. tick that before you press AIS Fix and it'll rescale the import for some other collada importer... the importer your using is actually the 3dsmax default. called FBX.. which will not work at all. YOU NEED TO DOWNLOAD A 3RD PARTY PLUGIN.
there are soo many reversions of max, it was easier for me just to say, go google a plugin.
I don't know why you kept stubbornly working on a broken import. the whole idea is to work from a fully assembled mesh. if it doesn't look right, why bother continuing the rest of the steps. when you know you got the very first step wrong... if the gemometry is literally missing, my fix button can't fix that
just download the proper max, and the proper plugin that I worked from
spent alot of time trying to edit marth's Cape.. but sadly no good even with the Collada trick, the cape still gets badly deformed.. can't figure it out. wasted the entire day, just trying to get the cape sort of decent for my shinobu mod...
anyways, I've heard about a few bugs, and even experienced alot problems myself.
all I can say, is this method isn't "Full Proof" and likely won't be. unless brawlbox is better devloped to suit our 3d modding needs.
though it's an effective trick to help edit certain static meshes, such as face, and the chest... probably the arms but some objects just don't seem to work.. and I've spent all day trying to come to a resolve... no luck.
also there seems to be a HUGE issue with Collada Importers.. AiS was made off of the Free ColladaMax plugins.. some people have different plugins which do some funny stuff
if so try this updated script, it'll fix your AIS scene and rescale it properly.
Code:
fn 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 = ( return floatSwap2(readfloat fstream) ) fn floatSwap2 f = ( i = bit.floatAsInt f h = bit.intashex i while h.count < 8 do h = "0" + h s = (substring h 7 2) + (substring h 5 2) + (substring h 3 2) + (substring h 1 2) bit.intAsFloat (bit.hexasint s) )
on btn1 pressed do( fsource = GetOpenFileName \ caption:"Brawl Vert Import" types: \ "All files (*.*)|*.*|" 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] )
-- fclose f -- fsource = GetOpenFileName \ -- caption:"Brawl Polygon Import" types: \ -- "All files (*.*)|*.*|" -- f= fopen fsource "rb" -- -- fSize=readBElong f -- mdlOffset=readBElong f -- nodeID=readBElong f -- pfUkn1=readBElong f
-- elementFlag=readBElong f -- pfUkn2=readBElong f --count for weird data -- defSize=readBElong f -- defFlags=readBElong f
-- defOffset=readBElong f -- datalen1=readBElong f -- datalen2=readBElong f -- dataOffset=readBElong f
-- pfUkn3=readBElong f -- pfUkn4=readBElong f -- strOffset=readBElong f -- itmOffset=readBElong f
-- pfUkn5=readBElong f -- numFaces=readBElong f -- vertSet=readBEshort f -- normSet=readBEshort f
-- partXOffset=readBEshort f --???
-- if vertID!=vertSet then( -- MessageBox( -- "WARRNING!!!" +"\n"+ -- "Incorrect Index Buffer" +"\n"+ -- "-Sorry (mariokart64n)") -- )else( -- fseek pf 0x111 #seek_cur -- for x = 1 to pfUkn2 do ( -- ukn=readbyte f #unsigned -- ukn=readbyte f #unsigned -- ukn=readbyte f #unsigned -- ukn=readbyte f #unsigned -- ukn=readbyte f #unsigned -- ) -- ) -- -- ukn=readbyte f #unsigned -- ukn=readbyte f #unsigned -- ukn=readbyte f #unsigned -- ukn=readbyte f #unsigned
-- ukn=readBEshort f -- ukn=readbyte f #unsigned -- ukn=readBEshort f
-- ukn=readBEshort f -- ukn=readbyte f #unsigned -- ukn=readbyte f #unsigned
-- ukn=readBEshort f
-- end of file is a loop of data -- 27bytes long per loop -- msh = mesh vertices:vertArray faces:faceArray --build mesh msh.numTVerts = vertArray.count msh.name=fname --msh.rotation = quat -0.5 0.5 -0.5 0.5 --msh.rotation = quat 0.5 0.5 0.5 0.5 --msh.scale = [0.3937008,0.3937008,0.3937008] buildTVfaces msh -- modPanel.setCurrentObject $Object01.baseObject -- subobjectLevel = 1 -- rotate $Object01.verts[#{1..580}] (quat 0.707107 0 0 0.707107) -- subobjectLevel = 0 -- for j = 1 to UV_array.count do setTVert msh j UV_array[j] -- for j = 1 to faceArray.count do setTface msh j faceArray[j] -- for j = 1 to Normal_array.count do setNormal msh j Normal_array[j]
messageBox "Done !"
gc() fclose f )
on btn2 pressed do( fsource = GetOpenFileName \ caption:"Brawl Vert Import" types: \ "All files (*.*)|*.*|" 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
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 )
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] )
on btn4 pressed do( -- obj = getnodebyname "Box01" -- if obj != undefined then select obj
-- select $Polygon* -- select $helpers
disableSceneRedraw() st = timestamp() --get start time in milliseconds undo off( geo=$polygon* -- print geo 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] m2010=chk1.checked if m2010==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 ) )
donno, I'm a max user. but if you had the experience with blender, I would think anything in max is more then possible in blender. but I can't help you in that area, sorry.
under my icon, is all my contact info... so um yeah there it is.
and I made a video last night, after talking with the DasDonkey Vertex Box author. he's solved the last issue in my method. and also will be implementing these techniques into a new vertex box.
I'll create one more video outlining my technique for creating browser. then I'll release the videos. you guys will now have all the information required to create high quality mods. I promise you that. it's soo easy everyone should be able to learn this.
also due to the recent events the shinobu updates fell behind, nothing new yet.
today I'm going to make a video on how to turn lucario into mewtwo...
alot of them were odd tweaks, not really character ideas..
anyways got a fair amount of work done with shinobu, the main body is reconstructed. just have the face, hair and the scarf thing to make. though I didn't have any luck with editing the cape last time.. so donno how well that's going to pan out. lol
here's just a quick snap shot of my 3dsmax scene. as is, the mod already looks like its turning out well. I'm sure many could reuse this in future skins, vert hacks etc..
yeah feel free to drop your requests here. they might not get done, but I'll make an effort to generate a Hit-list. that way I'll work on stuff that sparks my interest
and oddly enough mewtwo is one of those things that needs to be DONE! I would have taken on Roy, but the current hacks are impressive on their own.