Main Site | Forum | Rules | Downloads | Wiki | Features | Podcast

NLSC Forum

Resources for NBA 2K9.
Post a reply

Re: Hey, Headshape Modding 3D Tool (3DS MAX)Released!

Mon Mar 23, 2009 12:42 pm

Hey Pdub, could you kindly tell us how to open a .nk2m file or a .nk2f file (whatever's needed) into the 3ds max 9? I still can't figure it out.

Re: Hey, Headshape Modding 3D Tool (3DS MAX)Released!

Mon Mar 23, 2009 1:50 pm

chinoy316 wrote:Hey Pdub, could you kindly tell us how to open a .nk2m file or a .nk2f file (whatever's needed) into the 3ds max 9? I still can't figure it out.


Chinoy316

Firstly open the 3d mod tool and open your player png???.iff file you want to edit. Now on Left side there are two drop down boxes. Click on the first one and select file 1 ( this is the high quality model. File 2 is the low quality model, so depending on your player detail settings you use, select the model that suits) the second drop down now should display part 0. Now to export the model for editing just click on the "export moddings" button on the right. the tool will ask you save the file and you should give it the players name so you know what payer you editing. eg wade.n2km

Next what you have to do is place the n2kmod.ms file that you downloaded from the first post and place it in the "Autodesk\3ds Max 9\Scripts\Startup" folder.
Open 3d Max and select customise from the top menu. In the customise diag box that opens, scroll down to find the "edit_n2km" button, and hold the left mouse button and drag the "edit n2km" button to top of toolbar menu, where there is space obviously. What you have just done is just added the button to the toolbar so you can easily access it.

Next Click on the 'edit_N2kM" button and on the next diag box that opens, click on the top button to open your players .n2km file in 3dmax.
3dmax will warn that all object will be seperated etc and ask it you want to hold/yes, yes or no. I choose hold/yes.
Your players headshape should now appear for editing :lol:

When you are finished editing in 3d max just click on the "edit_n2km" button again on the tool bar and this time select the bottom button, a window will open, just click on okay (its in chinese, i think that what says)
You have now saved your new headshape back into the .n2km file that you exported earlier.

Now open the 3d mod tool again and select you players iff file. Again choose file 1 for high quality model or file 2 for low quality from the left drop down buttons . this time on the right just click on the "import modding" button and you should see a box saying that the file has been imported correctly. Just place your edited iff file in your nba 2k9 folder and.... whoala magic happens.

a note to remember is that you can only as far as i know reshape the verticies in 3dmax. If you create more or delete some then you will get an error when you try to import back to iff.
I found this out the hardway.

Thanks goes out to ken-fly for his help in making me understand it all.

Re: Hey, Headshape Modding 3D Tool (3DS MAX)Released!

Mon Mar 23, 2009 6:10 pm

I'll try to modify the Chinese character into to English... CREDIT to ORIGINAL CREATOR !!!

Code:
fn ReadFileStr fp=(
   string=ReadString fp
   --print string
   if (string=="2KM") then return "2KM"
    else ( MessageBox ("Please Select the Correct File!") title:"Error" beep:false;return false)
)

struct MYORC(
numV2,vert2=#(),
face2=#(),numF2,newobj,n,

   fn ImpWEP fp i=(
      numV2=ReadLong fp
      for n=1 to numV2 do(
         vert2[n]=[readfloat fp,readfloat fp,readfloat fp]
      )
      numF2=ReadLong fp
      for n=1 to numF2 do (
         a=(ReadShort fp)+1;b=(ReadShort fp)+1;c=(ReadShort fp)+1
         face2[n]=[a,b,c]
         if a>numV2 or a<0 then (print("a="+a as string+"fp="+(ftell fp) as string) )
      )
      --create object
      newobj=mesh name:"01" vertices:vert2 faces:face2
         defaultVCFaces newobj
         newobj.Material=getMeditMaterial 1
         select $01;
         modPanel.addModToSelection (Normalmodifier ()) ui:on
         $.modifiers[#Normal].flip = off
         $.modifiers[#Normal].unify = on
         maxOps.CollapseNode $ off
   ),--End Weapon impobj
   fn wrPoint3 fp outP3=(--write point3 data
      WriteFloat fp outP3.x
      WriteFloat fp outP3.y
      WriteFloat fp outp3.z
   ),
   fn wrshort3 fp in3=(
      WriteShort fp (in3.x-1)
      WriteShort fp (in3.y-1)
      WriteShort fp (in3.z-1)
   ),
   fn ExpWEP fp out i numobj type=(
         numV=GetnumVerts out[i]
         writelong fp numV
         --write verts data
         for n=1 to numV do
         (
            wrpoint3 fp (GetVert out[i] n)
         )
         --write faces data
         numF=GetnumFaces out[i]
         WriteLong fp numF
         for n=1 to numF do (
            wrshort3 fp (GetFace out[i] n)
         )
   MessageBox("100% Complete") title:"Saving File" beep:false
   )--End Weapon Export
)

fn objfilt obj=(
isKindof obj Editable_mesh
)

global typestr            
macroscript IFF_N2KM category:"NBA2K-Model"
(
try (destroyDialog IFF-N2KM) catch() -- this is up here since it doesn't always work at the end
rollout IFF_N2KM "IFF-N2KM"
(
   button impwep "Open N2KM File"
   button expwep "Save N2KM File"
   group "English Version:"
   (
      label titleLabel "NBA2K9 IFF TOOL Editing"
      HyperLink add0 "Made By Zsword" align:#center address:"mailto:jemizhuu@hotmail.com" color:blue hoverColor:red
      label txtdata "2009-03-14"
   )
   on impwep pressed do
   (
      local impzsw fname = getOpenFileName types:"*.n2km (*.n2km)|*.n2km|" caption:"Select File"
         if fname == undefined then return NULL
         fp =  fopen fname "rb"
         typestr=ReadFileStr fp
         if typestr==false then return false
         else (
            if typestr!="2KM" then ( messagebox("100% Complete") title:"Saving File" beep:false;return false)
         )
         max reset file
         setMeditMaterial 1 (standardMaterial selfIllumAmount:0)
         global numobj
         numobj=1;
         global mesh1=#()
         for i=1 to numobj  do (
            mesh1[i]=MYORC i
            mesh1[i].ImpWEP fp i
         )
         actionMan.executeAction 0 "369"
         fclose fp
   )--End Import Wep
   on expwep pressed do
   (
      out=#()
      out=selectByName title:"Select File" ButtonText:"Save" filter:objfilt obj
      if out==undefined then return false
      numsel=out.count
      if numsel!=1 then (messagebox("File Incomplete") title:"´Error" beep:false;return false)
      local export fname = getSaveFileName types:"*.n2km (*.n2km)|*.n2km|" caption:"Complete"
         if fname == undefined then return NULL
         fp = fopen fname "wb"
         WriteString fp "2KM"
         type=0
         for i=1 to numsel do (
            mesh2=MYORC i
            mesh2.ExpWEP fp out i numobj type
         )
         fclose fp
   )--End Export   Wep
)--End Rollout
createDialog IFF_N2KM width:240 height:240 pos:[905,407] style:#(#style_titlebar, #style_sysmenu, #style_minimizebox)
)--End Script


open the file using Notepad... Copy the code and paste... (Y) (Y) (Y) (Y) (Y) (Y) (Y)

RESULT:
Image



AGAIN !!! CREDIT TO ORIGINAL CREATOR (Y) (Y) (Y) (Y) (Y) (Y) (Y)

Re: Hey, Headshape Modding 3D Tool (3DS MAX)Released!

Mon Mar 23, 2009 11:28 pm

Thanks nba2k9inch, i reached up to the point where the edit_n2km appears. Didn't know you had to drag it. Hehehe. Thanks a lot. Another question, what tool do I have to press to edit headshapes? I can select vertices but I can't stretch/shrink it. Any tips?
Hey double LC, mind telling us how you put the skin over the 3d models as you did with Sakuragi?
P.S. The headshape your doing is cool. Reminds me of Agon from eyeshield 21.

Re: Hey, Headshape Modding 3D Tool (3DS MAX)Released!

Tue Mar 24, 2009 4:12 pm

Hey, I figured out how to edit vertices. So I experimented, I did use part 1 like pdub said, then did what nba2k9inch said but nothing's changing in game.

Re: Hey, Headshape Modding 3D Tool (3DS MAX)Released!

Tue Mar 24, 2009 6:32 pm

This is what I do.

Decompress IFF with Showfom's decompress.exe from IFF Editor Beta 9. I'm not sure if the IFF tool included with the headshape editing tool decompresses them or not.
Once decompressed I open the IFF file with the included IFF tool and select file 1 and click the export modding button and save a .n2km file.
In 3DS Max 9 I click the EDit_n2km button on the toolbar which I created by dragging the Edit_n2km text from the list on the "Customize->Customize User Interface" to the toolbar.
I select the top option from the pop up box and find my n2km file and it is loaded in the program.
I right click on a viewport and click vertex, then right click again and choose select.
I click on the model and all the vertices and polygons appear for selection.
I move/scale/rotate vertices only because choosing faces or polygons caused problems when I tried it.
Do not modify any points below the neck or the shoulders will not align with the torso correctly.
I save the file as a max file frequently(CTRL+S or Save from the file menu).
When ready to test, I click the EDIT_N2KM button again and choose the bottom option.
Double click the "01" and click on the N2KM file (you may have to find it first) to save the changes.

Open the IFF file with the tool again.
Select File 1 and click import modding.
I find my N2KM file.
I get a confirmation(OK) dialog.
I go back to 2K9 and load up practice mode and check out the changes to my model.

Re: Hey, Headshape Modding 3D Tool (3DS MAX)Released!

Wed Mar 25, 2009 12:35 am

Oh pdub! What I'd do without you... :bowdown:

Re: Hey, Headshape Modding 3D Tool (3DS MAX)Released!

Wed Mar 25, 2009 1:28 pm

CAN IT EDIT THE COURT 3D FORMAT, MAN I HOPE SO.....HAVE ANYBODY TRIED IT???

Re: Hey, Headshape Modding 3D Tool (3DS MAX)Released!

Wed Mar 25, 2009 9:04 pm

I am pretty sure that courts, jerseys, and other stuff is in a different 3D format than the CFs/Live files

Re: Hey, Headshape Modding 3D Tool (3DS MAX)Released!

Fri Apr 03, 2009 9:16 pm

please STICK it.... because it is very helpful in editing headshapes... i manage to edit BIRDMAN and Adam Morrison with their new hairstyle...
Please.........

Re: Hey, Headshape Modding 3D Tool (3DS MAX)Released!

Sat Apr 04, 2009 4:54 pm

Yes this topic should be stickied and i really prefer editing headshapes using 3dmax. Anyone tested this method using gmax. GMAX is a free to use software very similar to 3dmax.

Re: Hey, Headshape Modding 3D Tool (3DS MAX)Released!

Sun Apr 05, 2009 2:34 am

STICKIED :!: :bowdown: :bowdown: :bowdown:

Re: Hey, Headshape Modding 3D Tool (3DS MAX)Released!

Tue Apr 07, 2009 9:30 pm

thanks for the tuto!!! (Y)
Last edited by soul13 on Thu Apr 30, 2009 9:40 pm, edited 1 time in total.

Re: Hey, Headshape Modding 3D Tool (3DS MAX)Released!

Mon Apr 13, 2009 3:59 am

maybe it's a stupid question but now maybe it's possible to make big ben with afro ?? :bowdown: :bowdown: :bowdown:

Re: Hey, Headshape Modding 3D Tool (3DS MAX)Released!

Tue Apr 14, 2009 10:51 am

hi everyone, i was wondering if anyone knows how to attach or add hair to a players headshape in 3ds max, it has given me a headache trying to export the headshape i used to add cornrows and a afro (2 seperate projects), it all looks correct but when i export it gives me 2 options (layers) face and hair but both into one project, can someone plzzzz help me, ill show screenshots if needed, this can help everyone who doesnt no how to add hair but want to

thanks

Re: Hey, Headshape Modding 3D Tool (3DS MAX)Released!

Sun Apr 26, 2009 9:08 pm

Thx werry much

Re: Hey, Headshape Modding 3D Tool (3DS MAX)Released!

Sun May 10, 2009 7:06 am

I have been using GMAX for years to bad this doesn't work with it... They are pretty much the same though. GMAX (free) is just a scaled down version of 3ds but It would do everything you need it to.

Re: Hey, Headshape Modding 3D Tool (3DS MAX)Released!

Sun May 10, 2009 1:55 pm

how do you put in hairstyles from other players say i want cornrows for jermaine o'neal?

Re: Hey, Headshape Modding 3D Tool (3DS MAX)Released!

Wed May 13, 2009 10:46 am

Does this work with create-a-player? I created a person and Hades' Mini Editior says it has a face of 3031, but there is no png3031.iff in the 2k9 folder.

Also, thanks for all your hard work.

EDIT: Just tested out an edit on DJ Mbenga, I messed up his ears to see if the edits worked...his head was missing when I fired up 2k9...

Re: Hey, Headshape Modding 3D Tool (3DS MAX)Released!

Wed May 13, 2009 4:59 pm

[Double LC] wrote:I'll try to modify the Chinese character into to English... CREDIT to ORIGINAL CREATOR !!!

Code:
fn ReadFileStr fp=(
   string=ReadString fp
   --print string
   if (string=="2KM") then return "2KM"
    else ( MessageBox ("Please Select the Correct File!") title:"Error" beep:false;return false)
)

struct MYORC(
numV2,vert2=#(),
face2=#(),numF2,newobj,n,

   fn ImpWEP fp i=(
      numV2=ReadLong fp
      for n=1 to numV2 do(
         vert2[n]=[readfloat fp,readfloat fp,readfloat fp]
      )
      numF2=ReadLong fp
      for n=1 to numF2 do (
         a=(ReadShort fp)+1;b=(ReadShort fp)+1;c=(ReadShort fp)+1
         face2[n]=[a,b,c]
         if a>numV2 or a<0 then (print("a="+a as string+"fp="+(ftell fp) as string) )
      )
      --create object
      newobj=mesh name:"01" vertices:vert2 faces:face2
         defaultVCFaces newobj
         newobj.Material=getMeditMaterial 1
         select $01;
         modPanel.addModToSelection (Normalmodifier ()) ui:on
         $.modifiers[#Normal].flip = off
         $.modifiers[#Normal].unify = on
         maxOps.CollapseNode $ off
   ),--End Weapon impobj
   fn wrPoint3 fp outP3=(--write point3 data
      WriteFloat fp outP3.x
      WriteFloat fp outP3.y
      WriteFloat fp outp3.z
   ),
   fn wrshort3 fp in3=(
      WriteShort fp (in3.x-1)
      WriteShort fp (in3.y-1)
      WriteShort fp (in3.z-1)
   ),
   fn ExpWEP fp out i numobj type=(
         numV=GetnumVerts out[i]
         writelong fp numV
         --write verts data
         for n=1 to numV do
         (
            wrpoint3 fp (GetVert out[i] n)
         )
         --write faces data
         numF=GetnumFaces out[i]
         WriteLong fp numF
         for n=1 to numF do (
            wrshort3 fp (GetFace out[i] n)
         )
   MessageBox("100% Complete") title:"Saving File" beep:false
   )--End Weapon Export
)

fn objfilt obj=(
isKindof obj Editable_mesh
)

global typestr            
macroscript IFF_N2KM category:"NBA2K-Model"
(
try (destroyDialog IFF-N2KM) catch() -- this is up here since it doesn't always work at the end
rollout IFF_N2KM "IFF-N2KM"
(
   button impwep "Open N2KM File"
   button expwep "Save N2KM File"
   group "English Version:"
   (
      label titleLabel "NBA2K9 IFF TOOL Editing"
      HyperLink add0 "Made By Zsword" align:#center address:"mailto:jemizhuu@hotmail.com" color:blue hoverColor:red
      label txtdata "2009-03-14"
   )
   on impwep pressed do
   (
      local impzsw fname = getOpenFileName types:"*.n2km (*.n2km)|*.n2km|" caption:"Select File"
         if fname == undefined then return NULL
         fp =  fopen fname "rb"
         typestr=ReadFileStr fp
         if typestr==false then return false
         else (
            if typestr!="2KM" then ( messagebox("100% Complete") title:"Saving File" beep:false;return false)
         )
         max reset file
         setMeditMaterial 1 (standardMaterial selfIllumAmount:0)
         global numobj
         numobj=1;
         global mesh1=#()
         for i=1 to numobj  do (
            mesh1[i]=MYORC i
            mesh1[i].ImpWEP fp i
         )
         actionMan.executeAction 0 "369"
         fclose fp
   )--End Import Wep
   on expwep pressed do
   (
      out=#()
      out=selectByName title:"Select File" ButtonText:"Save" filter:objfilt obj
      if out==undefined then return false
      numsel=out.count
      if numsel!=1 then (messagebox("File Incomplete") title:"´Error" beep:false;return false)
      local export fname = getSaveFileName types:"*.n2km (*.n2km)|*.n2km|" caption:"Complete"
         if fname == undefined then return NULL
         fp = fopen fname "wb"
         WriteString fp "2KM"
         type=0
         for i=1 to numsel do (
            mesh2=MYORC i
            mesh2.ExpWEP fp out i numobj type
         )
         fclose fp
   )--End Export   Wep
)--End Rollout
createDialog IFF_N2KM width:240 height:240 pos:[905,407] style:#(#style_titlebar, #style_sysmenu, #style_minimizebox)
)--End Script


open the file using Notepad... Copy the code and paste... (Y) (Y) (Y) (Y) (Y) (Y) (Y)

RESULT:
Image



AGAIN !!! CREDIT TO ORIGINAL CREATOR (Y) (Y) (Y) (Y) (Y) (Y) (Y)
+

Bro Double LC here you are saying that i should paste this code into a file using the notepad which file you are talking about. PLEASE

Re: Hey, Headshape Modding 3D Tool (3DS MAX)Released!

Wed May 13, 2009 6:50 pm

the 3ds max 9 SCRIPT for IFF.

Re: Hey, Headshape Modding 3D Tool (3DS MAX)Released!

Wed May 13, 2009 8:48 pm

Thanks for the answer bro but can you please tell me where i can find that file. THANKS IN ADVANCE.

Re: Hey, Headshape Modding 3D Tool (3DS MAX)Released!

Thu May 14, 2009 3:04 pm

Za man wrote:Thanks for the answer bro but can you please tell me where i can find that file. THANKS IN ADVANCE.

Open Autodesk folder, where you installed 3ds max 9. Then scripts.

-------

HOW TO TRANSFER HAIR FROM ONE PLAYER TO ANOTHER

*READ PDUB'S TUTORIAL FIRST

1) Get player iff with the HEADSHAPE you want. Let's call him #1. (Ex. BEASLEY)
2) Get player iff with the HAIR you want. Let's call him #2. (Ex. Carmelo's cornrows.)
3) Open player #1 with hex and locate his vertex data. Copy the first 70F8 ONLY of his headshape.
4) Open player #2 with hex and locate his vertex data. Overwrite the first 70F8 ONLY of his headshape with the vertex data of player #1. Save.
5) Import all textures of player #1 to player #2.
6) Rename player #2's iff to that of player #1.
7) Edit the headshape using 3DS Max 9 as some of player #2's facial features will remain after combining.

Tips on locating vertex data.
*For most bald players, the vertex data will start on address 1B480.
*For players with hair, it's a little further back. In my experience, most of them start on address 1F###.

Use the format 8 rows with 4 digits each string. It has to look like this for this to work.

#### #### #### #### #### #### #### ####
...

Re: Hey, Headshape Modding 3D Tool (3DS MAX)Released!

Thu May 14, 2009 8:37 pm

how can I put an image/picture on the background of the wires as my guide in editing the headshape???

Re: Hey, Headshape Modding 3D Tool (3DS MAX)Released!

Thu May 14, 2009 11:39 pm

has anybody tired to use this on the arena files?
Post a reply