YEAH YEAH ITS "PLAGARIZED" KK
Just tryin to make it easier for people who have no experience. Also Mariokart's video didn't explain how to do the raw vertex edit method like this does. YEAH YEAH THERES KCMM VIDEOS ON THAT TOO I KNOW
Just trying to help out here.
Anyway.....
So, you wanna edit vertices? I have to admit that I'm no master, but I have at least enough knowledge to
make this guide. This guide will also help you people still using that meathod of just editing raw
vertices (Just editing the blue dots floating in space....ungh!) Well first off, I better give you a few
links. I am assuming you already have Brawlbox installed. If you dont........go get it right now!
DAS DONKEY BOX: (You really, really need this. Alot.)
http://cid-c59ea3c98a300f31.skydrive.live.com/self.aspx/.Public/Programs/DasDonkey%20Box%20v1.0.zipAiS: (You need this if you wanna edit DAE files, which I'll explain later. Not required, but
recommended.)
http://cid-c59ea3c98a300f31.skydrive.live.com/self.aspx/.Public/Programs/ais0.1.3.zip3DS Max: It would be best if you could find a 2009 version, as thats what I use and the changes in some
versions of max are very different. 2008 and 2010 should work fine too. This program costs money, though,
unless you know of a fun little thing called P2P........
COLLADA plugin for 3DS Max: (You need this for DAE. Again, not required, but STRONGLY reccomended.)
http://sourceforge.net/projects/colladamaya/files/COLLADAMax%201.4.1%20plug-ins/ColladaMax_FREE_3.05C.exe/ColladaMax_FREE_3.05C.exe/download
Now, before we get started, you need to add a code to 3ds max. If you're new to the program, here's how:
1. Click on the Maxscript button on the top of 3ds max
2. Click new script
3. Copypasta the script I'm about to give you
4. Save and run the script
This code was created by Mariokart64n as well as the meathod I will be teaching you. It is only requried
if you are going to edit DAEs.
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)
)
rollout DDV "Vertex Modding Patcher" width:320 height:270
(
button btn1 "Import Verts" pos:[8,16] width:144 height:40
button btn2 "Create Patch" pos:[8,112] width:144 height:40
button btn3 "Patch Model" pos:[8,160] width:144 height:40
groupBox grp1 "Description" pos:[160,8] width:143 height:48
label lbl1 "Imports a RAW VertexSet from BrawlBox." pos:[169,21] width:128 height:30
groupBox grp2 "Description" pos:[160,152] width:143 height:48
label lbl2 "Patches finished model, for use with DDV" pos:[169,165] width:128 height:30
groupBox grp3 "Description" pos:[160,104] width:143 height:48
label lbl3 "Creates a Patch File from the RAW and Imported File" pos:[169,117] width:131
height:30
label lbl4 "-Mario_Kart64n, (June3, 2010)" pos:[164,253] width:156 height:18
button btn4 "Fix AiS Import" pos:[8,208] width:144 height:40
groupBox grp5 "Description" pos:[160,200] width:143 height:48
label lbl5 "Removes Collada Lib From Imported mesh" pos:[169,213] width:128 height:30
checkbox chk1 "Checkbox" pos:[10,250] width:14 height:13
label lbl7 "Max2010" pos:[27,249] width:45 height:15
button btn5 "Export Verts" pos:[8,64] width:144 height:40
checkbox chk2 "Checkbox" pos:[159,68] width:14 height:13 enabled:false checked:false
label lbl8 "Save As Seperate File" pos:[176,67] width:119 height:15
checkbox chk3 "Checkbox" pos:[159,84] width:14 height:13 enabled:false checked:false
label lbl9 "Save Changes to MDL0" pos:[176,83] width:119 height:15
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
mX=(vertArray[x][1])-(vert[1])
mY=(vertArray[x][2])-(vert[2])
mZ=(vertArray[x][3])-(vert[3])
append diffArray[mX,mY,mZ]
-- $.modifiers[#Edit_Poly].Commit ()
-- $.modifiers[#Edit_Poly].SetSelection #Vertex #{}
)
-- subobjectLevel = 0
-- modPanel.setCurrentObject obj.modifiers[#Edit_Poly]
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 btn3 pressed do(
fsource = GetOpenFileName \
caption:"Brawl Vert Patcher" types: \
"Patch(*pta)|*.pta|All files (*.*)|*.*|"
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 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
)
)
createDialog DDV
Ok, one last thing before the tutorial starts. I wanna show you waht DAE editing is and what raw vertex
editing is.
Here's editing raw vertices:
And here's editing DAEs:
Yeeeeah, kinda easy to tell which one's easier to edit, amirite? However, DAE does require more
converting work but in the end it saves a lot of time. But sometimes, this meathod doesn't work. And raw
vertexes aren't THAT hard to work with if you're working with something obvious, such as Yoshi's shell,
and its faster. So first I'll go over raw vertex editing, as DAE builds upon it.
Ok, first you gotta find what polygon you're going to edit. In this example, we're going to make Yoshi's
shoes bigger.
Go to brawbox and preview Yoshi's model. Turn off polygons until you find the one that includes his
shoes. It's polygon 2. Now look in Yoshi's folders in brawlbox until you find polygon 2. Now scroll down
to the bottom of that window to find the vertex ID. It's 2 as well, but they wont always match. Now find
the vertex with the ID of 2, and export it to the folder where dasdonkey box is, and name it vertex.ddf.
Now export the model file to the same place, naming it model.mdl0. Run dasdonkeybox and click create 3DS.
A 3ds file will appear and now you can import (Yes, IMPORT, not OPEN) it into 3ds max and edit it! If
you're new to 3ds, here's the basic way to edit them.
Here's what you get when you import: A big fat load of NOTHING!
Click this....
Then this....
And you should see something like this!
Now, how to edit stuff. Highlight vertices and then right click. You can choose between 3 types of
editing, move, scale and rotate. When you click on any of them, they give you can click on the
mini-axises that appear to make changes in one direction, or move them freely. For example, when you
choose scale, you can drag on the mini-x axis to stretch it on the X axis, or click in the triangle that
appears to enlarge it in all directions.
When you are done, click on file>export (NOT save) and save over the ddv.3ds that 3ds originally created.
Now go to dasdonkeybox and click on "insert 3ds on mld0". It will ask you for an offset. Go to brawlbox,
and look at the vertex data for what you just edited. There will be a mld0 offset there, copy it. The one
for Yoshi's feet and head is -168960. (The - sign doesnt really matter, so if you dont copy it, dont
worry about it.) Now go to brawlbox and replace Yoshi's model with model.mld0. Ta-da! The changes you
made should now be there.
Ok, time for DAE. First, install AiS. To do so, run the install.bat file in the 3ds download. If that
doesn't work, copy everything in it and paste it in C:\Program Files\ais0.1.3. (Create the folder.) Now,
follow the original steps - export model.mdl0 and vertex.ddf. Now, export the brres file for Yoshi's
model. It doesnt matter what you name this one, but save it in the dasdonkey folder. Now go to that
folder, right click on the model data, and click convert to DAE. Great, now you're set. Import that DAE
into 3ds as a COLLADA, NOT as an autodesk DAE.
This one.
You should get an ugly looking character.
Blargh.
Ok, remember that script? Run it. Then click on THIS button:
And you should get this.
Much better! By the way, make sure you check the Max10 button if you're using Max 10. Yeah, kinda
obvious.
Now, click on the polygon you wanna edit (In this case his feet) and right click it and click hide
unselected. Now go to the script program, and click THIS:
Now navigate to your dasdonkey folder and double click vertex.ddf. Wait a bit, and it should say patch
created. If it gives you an error, close the script and reopen it and try again (But dont reclick fix AiS
import). After you click Ok, it puts the model on its back. Go to where you turned on the vertices in the
raw meathod, and.....
Bam!
Much easier editing.
Now edit to your liking. Like I said, I'm going to make his shoes bigger.
There we go.
Now open the script again, and click on patch model. Go to the dasdonkey folder and click on
vertex_Patch.pta. (It should be the only one there.) Now this part can take a while, so go to the
bathroom or get a snack while you wait.
Ok, when it patches, you should get something like this.
OH CRAP! Did it mess up? Nope, thats whats supposed to happen, dont worry! Now, if you havent already, go
to dasdonkey and make the 3ds file. Now import it into 3ds max. You dont really even have to turn on the
vertex thingy. Just make sure you're selected on the vertex and click here.....
And select morpher from that list. Now, on the thing that appeared on the side, RIGHT click here...
and click pick from scene. Now click on the model thingy and then click on the arrow next to the box you
right clicked on and move your mouse up until it reaches 100. Now go to file>export selected (MAKE SURE
IT SAYS EXPORT SELECTED) and export over the DDV.3ds. Now follow the rest of the steps in the raw vertex
meathod. Check it out in brawlbox.
Bigger is better!
However, we can see a problem - one of the feet got messed up! To fix this, we "double patch". To do
this, export the brres file again and convert to DAE again and then patch it in 3ds again and then import
the vertex again and morph it again and export again.....and then it should look fine.
So, any questions? Please post them and I'll do my very best to answer them. If there's anything vertex
related you want me to add to this guide, let me know aswell!
Video with some more stuff: