Jump to content

Recommended Posts

Nintendo64 Mapping Tool

 

In the other guides, I talked about a tool I was making to make some process of ripping N64 models faster.

It is finally done and will do most of the texturing work for you.

 

___________________________________________________________________________________________________

So what can it do ?

 

1) Convert the .wrl file you get from the emulator into an .obj

That means, you no longer need to import the wrl in Blender and then export as .obj

Even better, the conversion will be perfectly useable no matter the game you ripped.

Saddong encountered an issue with the Blender Import-Export method for the game Castlevania64.

Once converted into .obj, the groups names didnt have the texture name in them, which made it impossible to know which texture to apply on which group.

He tested with my tool and the .obj he got was useable.

 

2) Delete all materials from an existing .obj

That means, you no longer need to use the AutoClicker to click thousand of time on the Delete button in Milkshape.

It will be done in less than a second.

 

3) Apply all correct materials on an .obj

So, you dont need to manually do it and search for each texture in the folder.

Even better, you can texture completly a ripped area (again in less than a second), which make it easier to know which texture to apply on which wall in Hammer.

Doing that manually usually took me +1 hour if the area had a lot of different texture.

 

4) Scale the .obj by a given value

You can directly scale the model in the tool. The value needs to be bigger than 0.

 

5) Reverse the vertex order

You can do it directly instead of doing it in Milkshape. Depending of the game, reversing the vertex order is needed.

 

6) Merge together groups that use the same texture

Instead of having dozens of groups using the same texture, you can merge them into one.

I don't recommend doing it on the .obj you use to extract specific models.

 

7) Sort groups alphabetically

Obviously, it sort the groups by their name, and put them in an alphabetical order.

Unless you merge the .obj, this won't have any effect because of the way I name the groups initially:

  • 0_XXXXXXXX_c.bmp
  • 1_XXXXXXXX_c.bmp
  • etc...

It would just sort by the number.

That also sort materials in alphabetical order.

 

8. Copy used textures

It copy every textures used by the obj

 

9) Mirror picture

It can mirror picture horizontally and vertically

 

10) Bmp to Png

It creates a .png by using the _a.bmp and _c.bmp (instead of doing it manually in Gimp (you can ofc use Rice to directly get the png files)


___________________________________________________________________________________________________

The Backstory :lenny:

 

I first programmed it in Python3, it was a Command Prompt tool only.

It was working fine but not really efficient because you had to manually write the path to the file to convert.

Another problem was Python itself; to execute the tool, the user needed to have Python installed on his computer, which wouldnt allow people to easily use it.

 

I looked for a way to implement Python script into another language and I found the C# with the plugin IronPython.

IronPython only works with Python2, so I edited my scripts to adapt few things that were different between the 2 versions.

Then I made a WPF application in Visual Studio, with a basic GUI and few buttons.

 

dvD4U85.jpg

 

It was working fine and has helped Saddong a lot with his Castlevania64 map, but the Python code was just too dirty and too complex to add new options to it.

It was also slow to convert some file because the tool had to compile the python code each time.

 

So I recently started rewritting the whole tool in C# only.

It is now way faster to convert file (2 seconds with the old version to 50 milliseconds (0.050ms) with the new version).

It is also faster to launch, has only a .exe file and no more dependencies.

 

___________________________________________________________________________________________________

How to use it

 

It's pretty straight-forward to use the tool, simply browse to your files/folder and press the buttons.

 

Wrl Converter

 

To convert a .wrl to .obj, click Browse, it will open a directory, you can then load the .wrl file you want.

 

pG7cKyc.jpg

 

Once loaded, you can click on Convert to .obj.

It will convert the file to .obj and a text box appears saying Done.

 

Obj Editor

 

Click on Browse to load the .obj file you want.

 

Ggr2FYI.jpg

 

Delete all materials from the .obj and Apply all materials on the .obj literally do what is in their title.

 

As for Modify the .obj, you first need to select one or more checkbox.

 

Once the modification of the .obj is done, a text box appears saying Done.

 

 

Copy Used Textures

 

NXaZjyQ.jpg

 

Load your obj file.

Select the folder where the textures are located.

Select the folder where the textures should be copied.

 

Mirror Picture

 

2xsxq8O.jpg

 

Load the picture you want to mirror.

Check Mirror Horizontally and/or Mirror Vertically

Then you can click on the button.

 

Old Picture pSzTXkw.png 

Mirrored Picture dlZeWJ3.png

 

Bmp to Png

 

IOO4bUR.jpg

 

Load the alpha picture KtT3Wso.png

Load the texture picture DrqW4rL.png

 

Then you can click on the button and it create the transparent .png EFUoNU8.png

 

___________________________________________________________________________________________________

Advice

 

Make an untextured .obj, import it in Milkshape and use that file to extract specific models you need (always have backup so you dont override).

When you rip a specific model, export it untextured as an .obj, using Milkshape.

And then use that .obj in my tool, to fully texture it.

 

I often got issue with Milkshape crashing when exporting a completly textured model.

It never crashes if the model is untextured.

 

___________________________________________________________________________________________________

Error Messages

 

If you enter a path to a file that doesn't exist, there will be an error message.

If you put a .obj file in the .wrl path (and vice versa), there will be an error message.

If you put a negative scale or 0, there will be an error message.

There are some other obvious stuff that will show an error.

 

___________________________________________________________________________________________________

Download Link

 

Here is the Tool: https://www.dropbox.com/s/cnsbmsa5ycdnrtf/N64MappingTool_v2.rar?dl=0

 

There is only the .exe file in it.

 

______

Old Versions:

https://www.dropbox.com/s/1y59rywc8kcx67w/N64MappingTool.rar?dl=0 (IronPython version)

 

Original python scripts:

https://www.dropbox.com/s/cpa4g4ze018g6cx/N64 Converter Python2.rar?dl=0

https://www.dropbox.com/s/yntubhymxqn2tjq/N64 Converter Python3.rar?dl=0

 

 

___________________________________________________________________________________________________

Credits

 

Thanks to Saddong for testing the tool when it was only Python and help me find bugs.

Thanks to 44 Colt for testing the .exe tool and helping me figure the problems.

 

___________________________________________________________________________________________________

Adding New Features

 

I might add more option to the tool

  • Maybe generate a .qc for the 'reference models' used for building (see the guide Building a N64 map in Source Engine)
  • Maybe a obj -> smd converter (which might not work with any .obj as I only handle specific parameters)

 

 

Edited by Moltard
  • Like 1

Share this post


Link to post
Share on other sites

Updated the tool to be only programmed in C#

Also now it calculates the 'normals' of triangles in a model when you Apply all materials or Modify the obj.

 

Also updated pictures and text in the post.

Edited by Moltard

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...