What's new

BMD plugin for 3D studio max. Imports bones, skinning, animations and vertex colors.

Mariowario130

New member
"This plugin imports bones, skined meshes, vertex colors, creates a character assembly and exports the animations."


wow! finally
 

thakis

New member
Wow, that looks like great work :)

I only browsed through the source, though; I don't have 3d studio. Would anyone care to post a few screenshots?
 
OP
C

Coder

New member
Thanks, I haven't done much testing on this yet so theres probably still a few errors. I just noticed that animations with zero length create an error.
I also extract the animations from the ../bck/FILENAME*.bck path but it looks like this isn't always correct. The bone length might also be incorrect in some cases but it shouldn't affect the skinning or animations.

screenshots
http://rapidshare.com/files/117467059/bmdImage.zip.html
 
OP
C

Coder

New member
Hi

I've just added some bug fixes.
  • Animations can now use scaling.
  • Start position should be ok.
  • Added yaz1 decryption.
  • Fixed skinning (issue with root bone)
  • Changed install method.

I still need to add btp file support and Mat support (Minda's animated hair color).

I also tried merging some characters and animations. In the images below the mask and large hand (scale animation is from the hair bones) are added to Minda by aligning them to the matching bones and then setting the parent link.

MaxBMD_Beta_03.zip





 

nmn

Mupen64Plus Dev.
Wow, that looks pretty damn good. I have to go check this out in Windows sometime.
 

Fluesopp

New member
You are... Incredible, just incredible!
*tries out*
Oh, and isn't Midna's hair vertex colored?

edit: I tried it out with the TWW models, but I get dissapointing results... Firstly, the model is imported as one figure, the bones are imported as polygons, atleast after exporting to 3ds and importing to maya... Am I doing something wrong?
 
Last edited:
OP
C

Coder

New member
I originally created a separate mesh for each texture like BmdView2 and then applied skinning to each mesh. It looks like some of the vertexes are shared (face and eyes) and it's really one mesh with multiple textures. It ended up being easier to create one mesh and use one material with multiple textures.

To select each element group go to "Editable Mesh / Element" modifier and select each item.
To select face groups by the texture used go to "Editable Mesh / Polygon". Open the "Surface Properties" rollout and use the "Select ID" button.
You could use the "Detach" button to create new meshes but it will affect the skinning. I might add a checkbox in the UI to extract each material as a separate mesh but it might take a few weeks (low priority).

I haven't used Maya before but it sounds like the exporter doesn't support bones / skins. If you export it as a Maya file and import it back into 3ds max does it still have bones? Maybe another Maya exporter is required.

I currently save the animations as *.anm files for use in the character assembly. This makes it easier for me to manager the animations and also allows them to be applied to other characters e.g. Sword fighting Minda. I'm not sure how Maya uses animations and what the best format would be. Would it help if I just load all animations one after another (might be useful for panda *.x exporter)?

Thanks for the tip about the hair, I'll check that out first.
 
Last edited:

Fluesopp

New member
Ok... I will check on it some more. I haven't used 3DS, so I don't exactly know how it operates, and it might very well be that it's operating in a quite different way than maya.
But one question, do I have to rename the bdl files to bmd to be able to use them, or will they not work properly then?
Also, are the bones rigged to the models? So if I move a bone, will the model follow?
 
OP
C

Coder

New member
I've never noticed the bdl files before. It looks like they can also be imported. The uploaded version now allows for bdl files to be opened.
The bones are rigged to the model. After importing I freeze the mesh and hide the bones. To view the bones select the character icon and a rollout on the right hand side should display the character panel. Under the "Character assembly" section change the "Display" type from "Low Res Objects" to "All objects". Moving the bones will now move the mesh. To view the skin modifier first unfreeze all objects (right click in view port and select "Unfreeze all"). Then select the mesh and in the top right hand of the screen you should see the skin modifier. Expand it and you can view the envelope weights.
I'm only testing this in 3ds Max 2008 now so it might run differently in older versions.

MaxBMD_Beta_04
 

Fluesopp

New member
That is so cool! in theory...
I will try it when I can download it. (Stupid rapidshare... I can't see which numbers have a cat attached)
edit:
It works! Thank's a bunch!
*tries a Tingle render*

edit2: Ok, so I tried it some more and on Ganondorf's model (TWW) I get this:
error: Unable to convert: undefined to type: Point3
 
Last edited:
OP
C

Coder

New member
I just checked out Ganondorf from Demo32_04.arc 0.rarc_dir\archive\bmdv\demo32_ganon_cut00_gp_1.bmd and it looks ok. I'm not sure where the original character is. Could you post the path to the bmd file?
I forgot about rapidshares validation codes. I'll upload new releases to megaupload from now on.
I was thinking about writing some code in XNA Game Studio and was wondering if there's anymore game info that can be extracted like AI, animation sequences, model linking (e.g. link model, hat, sword), sounds, height maps etc. I'm amazed that some people are actually able to decipher the binary files.

MaxBMD_Beta_04.zip same as the last file but hosted on megaupload
 

Fluesopp

New member
If you want to get a challenge, try to find and desipher the file that contains data about the objects that is placed in a level. Objects such as trees, flowers, stones and other interactive things.
Ganondorf from The Wind Waker is in file Gnd.arc.
Will try to find the other Ganondorf's as you mentioned.

edit: PM'ed you with something and tried on Link. Same problem. It freezes on this line:

setNormal modelMesh i normals

I edited the whole part about normals out, and then it worked.

Also, can you explain the "missing textures" command line thing that's in the readme? I can't understand.
 
Last edited:
OP
C

Coder

New member
It would be great to be able to get the object placements in the level. Unfortunately I've never had much luck desiphering any files. I've updated the code to ignore the undefined normals. I didn't know that bmd files are used by Wind Walker. Does anyone have a list of games that use the bmd format?

To extract the tga files I use an old version of bmdView.exe (source code included). This doesn't extract all the images. If you get a popup that says "Error generating dds / tga image file(s)" then you need to use BmdView2 to extract the rest of the images. For gnd.bmd it's unable to extract three images and creates temporary files in the "Textures" folder (ganon_all.ERROR, ganon_ken_all.ERROR and toonGN.ERROR). Open gnd.bmd using bmdView2.exe and from the main menu select "File/Export Textures...". Set the save type as "tga files" and set the filename to anything (I use "_" as the filename e.g. "_ganon_all.tga"). You then need to rename tga files to exclude the prefix e.g. "_ganon_all.tga" -> "ganon_all.tga". In the "Textures" folder replace the *.ERROR files with the *.tga files with the same name, then delete the *.ERROR files. Run the MaxScript importer again and it should work. It looks like I'm missing the shader settings to get the toon effect (Not sure how to reproduce this in 3DS Max).

If the bmdview2 code was modified to run as a command line application that used the same arguments as the bmdView.c code in my source folder then the previous procedure wouldn't be necessary. I was unable to compile the code using Visual Studio Express and I hardly ever get the missing textures issue when extracting the TWW models so I don't plan on updating it.

MaxBmd_Beta_05.zip

BmdView2.exe (installer from somewhere in this thread http://www.emutalk.net/showthread.php?t=26919. It might not be the latest version)
 
Last edited:

Fluesopp

New member
Hm, to me, it never works to extract the textures. I wonder why... I don't even get the .error files. Could it be a problem with my BMDView and it's location?

List over all knowns games that use BMD: Zelda TWW, Zelda TP, Super Mario Sunshine, Super Mario Galaxy and I guess Mario Kart DD. (Do we have a Mario Kart Wii confirmation?)
 
OP
C

Coder

New member
Thanks, I'll have to check out those other games sometime. The BMDView.exe file should go into 3ds max's root folder e.g. C:\Program Files\Autodesk\3ds Max 2008\BmdView.exe. I think I had some problems with the paths on 3DS max versions earlier than 2008 (path can't contain spaces). You could try placing BMDView.exe into the C:\ path then search the MaxBMD.ms script for "UPDATE BMDVIEW.EXE PATH" and uncomment the '-- bmd.SetBmdViewExePath "C:\\"' line.
If that fails you could manually extract the images using BmdView2 and then search MaxBMD.ms for the following

if (ExtractImages()) then
(
DrawScene()
)

and change it to just

DrawScene()
 

Fluesopp

New member
Ok, I just found out that 3ds 9 is lower than 2008... That explains why I get the start path spaces error.
But I still don't get extracted any textures when I export anything. No error files either.

I will get back to you when I get 3ds 2009 and try it there.

edit: Ok, with 3ds 2009, it still won't extract the images. It does not even make .error files.
edit2: In some files it assign the wrong files to the textures. In Tetra's case (Zl.arc) it uses the eye texture for the body, resulting in a strange result...
 
Last edited:
OP
C

Coder

New member
It sounds like BmdView.exe is in the correct path for the script because you should get an error message if it's not found. I've only tried this on windows, what operating system are you using? If you create a folder in C:\ called MaxBMD and add the BmdView.exe and gnd.bdl files and then run the command below from command prompt does it generate the images?

C:\MaxBMD\BmdView.exe "C:\MaxBMD\gnd.bdl" "C:\MaxBMD\\"

When the maxscript runs does it generate the following structure?
  • gnd.max
  • Textures/*.tga (is the folder also missing or just the images?)
  • Animations/*.anm

I think BmdView.exe probably doesn't support most of the Wind Walker textures so it might be easier to run the script once and ignore the errors. Then use BmdView2.exe to extract the tga images to the Textures folder (using "_" as the filename). To prevent having to rename the texture names all the time you could also update the following in the MaxBMD.ms file.
_texturePrefix = ""
Replace with
_texturePrefix = "_"
It should work when the script is run again.
 

Fluesopp

New member
I'm using Vista.

When I tried to use it now, I got a message saying
"The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log for more details."
I believe it have something to do with Visual Basic.

Also, that happens when I try to start the program. Are you sure you have compiled it properly, that is, not in a debug mode or something that requires me to install a sdk or something of C# or C++? Or do I simply have to update C++? (Which I believe is the cause of it).
 
Last edited:

Top