Jump to content
 Share

Recommended Posts

Posted  Edited by Moltard - Edit Reason: edit

Ignore this guide and look at the updated version:

 

 

___________________________________________________________________________________________________
___________________________________________________________________________________________________

 

Ripping N64 models to Source - V2

This guide is an updated version of the guide I made 2 years ago.
Since then, I learned more tricks on how to rip the models.
This part of the guide will explain the steps to rip models from Nintendo 64 games.
I will do another guide to explain how to build an exact replica of a N64 area.

 

Here is a google sheet where I listed games that can be ripped or not:

https://docs.google.com/spreadsheets/d/1ijRktBuMKTKaxeZiHErsZLJe59a9MEr1hOtKd19SGTo/edit?usp=sharing

 

Some games can't be ripped, either the game doesn't start with the plugin enabled or the outputed rip is unusable.

 

If you are interested in Rayman2 model ripping, it's a mess with N64, but way better on PC. 

All areas were already ripped there: https://raymanpc.com/forum/viewtopic.php?f=89&t=25072

 

I also uploaded the files on my google drive in case the website is down:
PlayerModels https://drive.google.com/open?id=1O9TOZQT-v_IQ5DKsS-3l_1WXtxrQXJNG
Areas: https://drive.google.com/open?id=1W_MtpOlXzO48OPsM80_nzySz5PF8PksH

 

Once you are done with this guide, read the next one, which explain how you can build correctly a nintendo64 map.

 

Update

I was making a tool to help in n64 mapping and here it is now:

Every informations about it in that post.

Note that some of the software used in this guide are no longer needed thanks to the tool:

  • Blender 2.63
  • Free Mouse Auto Clicker

And some steps will be way faster now:

  • Converting the .wrl to .obj
  • Deleting all materials from a model
  • Texturing completly a model

 

Update 2

I made this tool which replace Pretador's VMT Generator.

 

___________________________________________________________________________________________________
___________________________________________________________________________________________________

 

Software needed

  • Project64 2.2: An N64 emulator. It was provided by FrozenState and has all the needed plugins installed
  • Project64 2.1: Alternative link. This the version I use and it has never crashed.
  • Blender 2.63: This version can convert wrl to obj [No Longer Needed. My tool does it better]
  • Milkshape 1.8.4: Get the "Full 30 days trial version". Dont take 1.8.5
  • Crowbar: A compiler/decompiler of models (.smd/.mdl)

 

If you know how to use Blender, go ahead and use it instead of Milkshape, you will work faster with it, although this guide will only explain how to do some stuff with Milkshape and not with Blender

https://www.blender.org/

 

 

Software you may need

  • Gimp: Or Paint3D, or Photoshop if you have it/can use it. It will be needed for transparency parts
  • VTFEdit: The usual .vtf creator
  • VIDE: It has a Mass VTF Creator
  • My Mass VMT Generator: Mass VMT Creator 
  • Free Mouse Auto Clicker: Or another auto clicker software you know [No Longer Needed. My tool does it better]


___________________________________________________________________________________________________

 

Step0: Installing softwares

 

Install Milkshape 1.8.4.
Make sure to get the 30 days trial version (not the free version), so you can register it with the following key:

  • Name = Model
  • Registration Code = oZMl2-J5BdK2-3Ed21dd
  • Open Milkshape
  • Click on Help -> About...
  • Then Register
  • Enter the Name and the Registration Code
  • Click OK

YyczdkK.jpg

A box will appear, and will tell you thanks for purchasing Milkshape.
But you will notice on the top of Milkshape window that it's still not registered.
And it won't be if you close Milkshape right away.

What you need to do is open a .ms3d file in Milkshape.
You will find some in Milkshape root folder. For example: valve_skeleton.ms3d

Now you got full Milkshape, with no limitation.

If for some reason, the key I provided above doesn't work, download this keygen:

Open the .rar, and inside go to f4ms01.zip -> f4cg.r00.rar.

The tool is in that .rar

Write a name and get the Registration Code

 

________________________________________

Install Project64, you can put it into any folder.
All the plugins used for ripping models are installed.

  • Nemu64 is the main plugin you will use. It will rip the models and dump textures of the area
  • Rice Video is a plugin that can rip all the textures that you render in the game
  • TR64 OpenGL is another plugin that can rip the models, it can be used if you have issue getting some areas with Nemu64. Although only few games can launch with it. And it might be able to preserve the vertex lighting of the original models, but that is out of the scope of this guide.

To select the plugin to use, go to Options > Settings (Ctrl+T).

Click on Plugins in the Tree, then select the Video (graphics) plugin you want.


uYGiupp.jpg

You can then select the settings of the Graphic Plugin with Options > Configure Graphic Plugin.
Don't change anything yet for Nemu64.

Go to C:\ . In there, create a folder called VRML.
It is where the rips of games will be dumped by the plugin (Textures + Model).

If you encounter crashes of games with Project64 2.2, install an older version (2.1), and copy the plugins to its folder:

  • LemD3D8.dll in Plugin/GFX
  • tr64_ogl.dll and .ini in Plugin/GFX
  • RiceVideo files (cfg,ini,dll) in Plugin/GFX or just directly in Plugin (it doesn't matter as you can load it from any folder)

I had that problem when I was ripping the big room in Shadow temple.
The emulator would directly crash when the room was loaded.
Switching to my normal Project64 2.1 (that I simply used to play N64 games) fixed the problem.
It might be a setting in FrozenState's Project64 but I didn't find the problem.

 

________________________________________

If you download my tool, this information below is no longer relevant, as you don't use Blender to convert .wrl file

Make sure you installed Blender 2.63, it is needed to import .wrl files obtained with Nemu64 and export them to .obj
The newest versions of Blender can import .wrl too, but the problem is that the names of 'groups' no longer match their associated texture.
Which make it impossible to know which texture to apply on which face. And the latest version of Blender might not even be able to load wrl

 

________________________________________

As for Crowbar, make sure to set it up for the game you want (CS:S, CS:GO,...).
You can find guides on the Steam group of the software.

 

________________________________________

If you download my tool, this information below is no longer relevant

For the auto-clicker, get the one I linked or any other you know:
nMDkI05.jpg

 

________________________________________

As for the N64 ROMS, I won't provide any.
Emuparadise no longer host any ROMS.
FreeRoms has probably all the ROMS you are looking for.

They can be installed anywhere you want on your computer, you simply need to select the folder:


ABjuv13.jpg


 

___________________________________________________________________________________________________

 

Step1: Dump the game

 

Launch Project64, select Nemu64 as the Graphic Plugin like shown above and start a ROM.
Go to the area you want to rip and pause the game (F2).

Now go in Configure Graphic Plugin.
You will see this window:

Ann9zKU.jpg

Check Export VRML and press OK.
Now unpause and pause the game quickly (press F2 two times).

Go back in Configure Graphic Plugin and uncheck Export VRML.
Don't forget it, otherwise when you will unpause the emulator, the game will lag as it will dump textures every frames.

The dumped textures and model will appear in C:\VRML.
You will find +100 textures .bmp (depends of the complexicity of the area) and a .wrl model file.
I suggest you to select all the files created and move them in a new folder.
I use many subfolder for my different projects:

dxOri9s.jpg
2W1v2TE.jpg
njMMseS.jpg

So you can see I sort the different ripped areas.
Always make sure to move the dumped textures and model before doing another rip as the model file is overwritten and you would get tons of duplicated texture.

 

___
If the ROM doesn't start or if the screen is black, it might be because the game doesn't support the plugin and it is probably impossible to rip.
You can try launching the game with the default Graphic Plugin Jabo's Direct3D8 (if you don't have it, use RiceVideo), reach the area you want and do a Save State.
Then launch the game with Nemu64 and load the Save State.
Most of the time it will work. You can refer to the google sheet I linked at the top.
___

 

One thing you will notice is that since all textures are .bmp, there is no transparent texture (.png).
All textures come with 2 files:

  • XXXXXXXX_c.bmp = Texture
  • XXXXXXXX_a.bmp = Define the alpha of the texture

The _a is the alpha of the texture, which mean you can transform the _c into a png using it. I will explain the process later.
If the _a is just a black texture, then the _c is not a translucent texture.
If the _a and the _c are the exact same texture, then _c is not a translucent texture either.

CllDWei.jpg

You can see many textures that don't really seem useful, they either come from the player hud or the skybox.

In the above screenshot, you can see a ladder texture which has its alpha .bmp (6DF61CAE_a.bmp) .

So we will be able to transform it into a png.


But you can also see that only one side of the ladder is there.

To save memory on the Nintendo 64, many of the textures were only half and were mirrored once (or twice) when applied in the games.
I will explain later how to mirror the textures (really easy with Paint / Paint 3D) and how to apply them correctly on models.

You can also notice that all the textures are upside-down, but once applied on models, it will be good.
So, while for model you shouldn't modify the texture, if you want to use them in hammer, I recommend you to rotate them.
You can do it by opening the picture in the default Photos app of windows and click on the rotating button 2 times.

 

Using RiceVideo plugin, you can dump all textures that you see in the game.
These textures will be more complete than the VRML textures and they will have transparency.
I will explain how to use RiceVideo later.

 

___________________________________________________________________________________________________

 

Step2: Load the wrl

 

If you use my tool, you can directly convert the .wrl file to .obj, so skip to Step3

I also recommend that you use it as it is way faster and doesn't lose any data from the wrl.

 

At the bottom, you can find output.wrl. It is the model of the area.

Open Blender 2.63.


Make sure to use this 2.63 version and not a newer, otherwise you will get problems like I mentionned in the Step0.
The groups name will be called "Shape.XXX" (where XXX is a number) preventing you from knowing which texture to apply.

When you start Blender, you will see a box and a camera.
Press A two times to select everything, press your Delete key and then Enter.

The 3D view is now empty, so we can import the .wrl inside Blender.
Click on File -> Import -> X3D Extensible 3D (.x3d/.wrl)

 

8gp8at6.jpg

 

The model should now be loaded. But we wont modify it with Blender.

If you know how to use Blender, feel free to use it instead of Milkshape.
This guide is adapted to people who have no experience with 3d modelling software as Milkshape is really easy to use.
The interface is a lot like Hammer with a 3D view and three 2D grids.

We will now export the model as a .obj

Click on File -> Export -> Wavefront (.obj)
And export it into the same folder as the .wrl

 

50zNBdm.jpg

 

___________________________________________________________________________________________________

 

Step3: Import in Milkshape

 

Launch Milkshape, if you followed the Step0, you should have the full version.

Click on File -> Import -> Wavefront OBJ and select the .obj file you just exported.

J28HkbE.jpg

The model is now imported, but depending of the game, the visible faces might be reversed and you would only see black textures on the 3D view.

bcSIoNt.jpg

 

You need to reverse the Vertex order.
Do Ctrl + A to select every vertices.
Click on Face -> Reverse Vertex Order (Ctrl Shift F).

If after this step, the model has still black parts, click on Face -> Smooth All (Ctrl M).

 

jrfZQAu.jpg

 

Under Groups, check Auto Smooth, so you will no longer need to do the Smooth All in the future

 

The model is now correctly visible in the 3D view, but the textures are not correctly applied on most faces.
So we will need to delete all current Materials.

 

If you use my tool, you can directly delete all the materials from the .obj

You can also do the Revert Vertex Order and the scaling.

So you can skip to Step4, if you have done everything needed

 

Go to the Materials tab and launch the AutoClicker.


If you use the one I linked, set everything to 0 except the 1/100 S.

Put 2 to make it click every 0.02 second.

NcNyBVh.jpg

Then put your mouse on the Delete button in Milkshape and press the Start Hotkey of the Autoclicker (Ctrl F2 per default).

DWPOCI6.jpg

 

Wait until it's done, and press Ctrl F3 to stop it.
There might be a slight delay before it actually stop.

I recommend you to save that scaled model without any texture under a new name.
It will be easier for you to extract the different models of the area.

 

02QN4xB.jpg

 

Depending of the game, the model might be too small for you to easily edit it, so I recommend you to scale it up.
For the Zelda games and Mario64, scaling the model by 80 is good.
For the final export of the model, you will need to scale it again (with a different value).

Do Ctrl + A to select everything, and click on the Model tab, then the Scale button.
In the Scale Options, click on Origin and set a value of 80 (or whatever you want) in the three text boxes.
You can now press the button Scale.

 

g584ocm.jpg

Again make a save of that model (or just overwrite the previous one).


___________________________________________________________________________________________________

 

Step4: Get the model you want

 

So now let's say you want a specific model of the room.

You simply need to delete the stuff you don't need.

 

If you use Blender (2.80 or less), delete the parts of the model you dont need and skip to Step5.


Save your current file in a subfolder to keep things clean.
I have a different folder for each model I rip.
If some models are related, I put them in the same folder.
For example, in the Totem folder, I have a model of a Small Totem and a Big Totem from the Fire Temple first room.

dhGgybk.jpg

Click on the Model tab, then the Select button.
In the Select Options, click on Face.

5E0Hr5c.jpg

To move around in the 2D grids and 3D view, hold Ctrl, use the Left Click and move your mouse.
To unselect everything, click on Edit > Select None (Ctrl Shift A).

Make selection boxes in the 2D views to select the model you want.
You will probably select others objects around it, so it will take few steps to get the model you want.
Once stuff is selected, click on Edit > Select Invert (Ctrl I), and press you Delete key.
Repeat that until you only have the model you want.

If you are having trouble selecting only a specific part of the model, try on the different 2D views.
If you are having issue deleting small vertices of another object, you can also click on Vertex in the Select Options.

Once you have your model, you need to center it at the origin of Milkshape, that will be easier to rotate the prop in Hammer.

Click on the Model tab, then the Move button.
In the Move Options, make sure each textbox is at 0.0 and change Relative to Absolute.
You can now press the button Move.

wtgyo1G.jpg

 

___________________________________________________________________________________________________

 

Step5: Texturing the model

 

If you use my tool, texturing the model can be done in one second.

Export an untextured .obj with Milkshape/Blender and load it in my tool.

Press the Apply all materials on the .obj button and save the new .obj

(That requires the objects name to contain the texture name)

You can now skip to Step6.

 

If you see black faces on your model, that mean the backface of the model is enabled.
You can disable it by right clicking on the 3D view, and unchecking Draw Backfaces.

V3KrGAD.jpg

Also make sure you are in the Textured mode of the 3D view and not Smooth Shaded otherwise you won't see textures once you apply them.

3dQAG2Z.jpg

So now you only have the model you want to rip. Go in Groups tab.

qhoaMQo.jpg

You can see different groups with <No Material> applied, 4 in my case.
Their name is what will tell you which texture to apply.


That's where people who didn't use Blender 2.63 to import the .wrl will get problems as the name will be replaced with Shape.### (### being a number).

So you can see that in the 4 groups, 2 use the same texture: 548308A0_c.bmp and 7F05D05B_c.bmp.
So for ease, we can regroup them, to only have 2 groups in total.
Make sure nothing is selected in the 2D views (Ctrl Shift A).

Either Double-Click on a group name or click once on a group, then click on Select.
Do the same for the other group.


Copy the name of the texture somewhere so you don't lose it (i.e. a temporary txt file) and then click on Regroup.
That will merge the selected groups into a new one called Regroup01 (the next merge will be called Regroup02, etc...)

You can now select that new group, then paste the texture name in the small textbox and click on Rename.

9FfHNpI.jpg

Unselect everything (Ctrl Shift A) and do the same for the next groups.
Once you have done that for all the groups, you should have a much cleaner list.

rnUn3pW.jpg

So now you have the list of used textures, you can find and copy them to your model folder.

Subus3d.jpg

Back to Milkshape, in the Groups tab, select one of the group and copy its name.
Then go in the Materials tab.

Click on New, it will create a new material called Material01 (next time it will be Material02, etc...).
Paste the name of the group in the textbox and click Rename.
Then click on the first <none> to browse to the texture (should be fast if you already added them in your model folder).

74WcfOB.jpg

Then you need to Assign that material to the selected group, you can either double click on the material name or click on the Assign button.

Once it's done, unselect everything with Ctrl+Shift+A.
If you are in the Selection mode, you can also click in an empty area of the 2D view to unselect all.

Do that for each group until your model is fully textured.

lMYLO3o.jpg

It's possible that the name of a group doesn't have the texture name in it.

Usually it's because its an useless element that you can delete.

But I got that issue on the Eye Switch model from Zelda which had its sides without any known texture.

In that case, I simply applied the Eye texture on the sides and it gave the correct result.

So if that happens, look at what that group is used for and if you can delete it.

 

___________________________________________________________________________________________________

 

Step6: VTF Conversion and .qc Creation

 

So if you followed what I said previously, in the folder of your current model you have the used textures.
We will convert them to the .vtf format using VIDE.

So launch VIDE and press the 8th button of the tool bar for the Mass VTF Editor.

Copy the path of your model folder:

rhYjtTF.jpg

And paste it in the Source Directory and Target Directory in VIDE.
Set the picture format to BMP so it will convert every .bmp of the folder.
Then press Apply.

He9rIDn.jpg

 

If your model use .png and .bmp, first set the format to BMP, click Apply, then click Return, change the format to PNG and click Apply again.


The next step is to create a vmt for each vtf, which would be long to do manually.
To do it faster, we will use My Mass VMT Generator.


Download it (link at the top), extract the .zip where you want and launch the .exe.

 

rCvUNbT.png

 

So at the top you have the Texture Shader.
Models only support 2 shaders: UnlitGeneric and VertexLitGeneric.
The shader we are going to use is VertexLitGeneric.
But if you want one of your material to be fullbright, you can use UnlitGeneric.

Select the Surfaceprop you want, although it's not needed for a model.

As for the Parameters, you will need $model.
If your texture has transparency, you will need $translucent or $alphatest  too.

At the bottom left, there is the browse button. Use it to navigate to the folder with your .vtf files.

 

2WRr95l.jpg

So now you have the vtf files loaded, select them all by holding left click and dragging down.

You need to add the Basetexture path.


The syntax is the following:
MyFolder/AnotherSubFolder/ (the ending will be added if you forget it)


You can add as many subfolder as you want.
Once you are done, select atleast one .vtf file and click on Preview to see what the vmt will look like.
If multiple vtf are selected, it will show for only one of them.

 

ABQiay9.jpg

 

If the vmt looks good for you, make sure the vtf files you want are selected and click on Generate.
It will create the vmt files next to the vtfs.

Wrly6gN.jpg

If you have one picture that needs transparency but not the others, select that vtf only and generate the vmt with its own parameter.


Save the path you used for the vmt somwhere as you will need it for the .qc


For my model, I used models/moltard/OOT_FT/Detail/Totem/, which mean my vmt will load a vtf in

  • materials/models/moltard/OOT_FT/Detail/Totem/

Remember that a model doesn't load a .vtf file. It only loads a .vmt in the folder it is compiled for.
The .vmt then has the path that lead to the .vtf, which means you could have the .vmt and .vtf in completly different folders.
But for ease, usually you have the vmt and the vtf in the same folder.


So now you need a .smd file, it is the Source format you will compile into a .mdl thanks to a .qc file and Crowbar.

 

You will need to scale the model depending of the game.

 

How to figure out the best scale possible

  • What you can do is import a Counter-strike model in milkshape/blender and compare it with the scale
  • Counter Strike Player Model Click to download it
  • I included a .smd and a .obj, so you can import either

Once you have scaled your model, you can export it as a .smd
Click on File -> Export -> Half-Life SMD and name it like your Milkshape file.

idWqVYB.jpg

In a .qc file, you can change the $scale of the model compiled.

_________
Zelda related, while the 80 then 14 scale is perfect for an exact reproduction (Link being the size of a CT model), it is not adapted for ze gameplay.
As you need to think about zombies, if the hallways are too small in your map, it won't be fun for zombies who will get bullied.

I have used $scale 1.6 in the qc for my lastest Zelda projects (Shadow Temple, Fire Temple, Ikana)
Here you can see the Stone Tower Temple (Majora's Mask), I built 2 years ago for my Ikana project with a $scale 1

9q6eaD1.jpg

And here is the Ikana project, that I restarted 1,5 month ago, with a $scale 1.6

z77aonT.jpg

It was faster to build cause I could use bigger units (since the areas were larger) and probably because I had more experience building.

_________

Create a new text file and change the extension to .qc
Paste this into it:

$scale 1 // scale up the model after compile
$modelname    "moltard/OOT_FT/Detail/Totem/TotemBig.mdl" // path of the model once compiled, relative to models/
$staticprop // allow the prop to be static/dynamic
$surfaceprop "rock" // the surface property
$body FT_Models "TotemBig.smd" // the smd you exported
$cdmaterials "models/moltard/OOT_FT/Detail/Totem" // where the model load the vmts, relative to materials/
$sequence idle "TotemBig" activity ACT_IDLE -1 fps 1 // the smd for the 'idle' animation (you are not forced to put .smd)
$collisionmodel    "TotemBig.smd"{ // the collisions of the model
	$concave
	$automass
}

If you followed the Step0, your Crowbar is setup for the game you want (CS:S / CS:GO).
So now you need to compile the model.

 

___________________________________________________________________________________________________

Step7: Compilation

 

Check if you have the needed files:

  • .smd
  • .qc
  • .vtf and .vmt in their folder

blU4hZY.jpg

OOvcN6z.jpg

Open Crowbar and drag the .qc file on it.
You can then press the Compile button.

MvYyTii.jpg

Once the model is compiled, you can have 3 choices:
- Click on Goto and Crowbar will open the directory where the .mdl file is.
- Click on Recompile will obviously recompile the model, so if you need to edit a parameter of the .qc, you can then compile again
- Click on Use in View will open the View tab

64BdugG.jpg

From there, you can click on the button View to open the model in the Model Viewer of your game

WPaL8Vi.jpg

 

_________

Problems that can happen on the model

 

  • Error in the compile log:

 

Probably an invalid parameter of the .qc, you should see in the log the exact problem.

 

  • There is no Model appearing on the Model Viewer:


Either you put LightMappedGeneric in the model vmts or you did something wrong to the model in Milshape.
In the first case, simply replace the shader of the vmt with VertexLitGeneric.
For the second case, retart from the untextured .obj

 

  • Black/Purple textures (= missing texture):


On CS:GO, the missing texture result in a totally black model (which is really dumb imo).
On CS:S, the missing texture is the black purple texture

In the model viewer, look at the Model tab, if there is no VMTs Loaded, the following error appear:


*** ERROR *** Model attemped to load one or more VMTs it can't find


That means the VMTs are not in the folder you specified in the .qc file or they are not named correctly.

tJcOS64.jpg

 

In the Model tab, you can also see at the bottom a select list called Materials used.
This is the list of VMTs the model tries to load.

The name of the VMTs loaded by the model are the same as the textures file name you used Milkshape.
So make sure the VMTs are named accordingly.


That's one of the difference with exporting .smd in Blender (Blender Source Tool).
With Blender, the VMTs name needs to be named like the Material name and not like the file name.

If the VMTs are loaded but the textures are still missing, that means the VMTs target non existant VTFs.
So verify if the VTFs are there or if they are correctly named.

 

___________________________________________________________________________________________________
___________________________________________________________________________________________________

 

Tips and Trick

 

RiceVideo

 

At the Step0, I talked about the plugin RiceVideo that was included with Project64.
One if its feature is to dump textures.

While VRML does it too when you rip a model, you noticed there was no .png (transparent textures), only _c.bmp and _a.bmp
RiceVideo can dump every single texture you see in the game with their transparency.

So go in Project64 settings, change the Graphic plugin to RiceVideo 0.4.4 RELEASE.
Then go in Configure Graphic Plugin, under Texture Enhancement & Filters, check Dump textures to files.

a4jrmCM.jpg

Press OK and launch your game. Go in the area where you want to dump textures and the plugin will do its job.

A folder called texture_dump will be located in the same folder as RiceVideo.dll (Plugin/GFX per default).

HBDa0Fi.jpg

In there, you will find folders for the different game you used the plugin on.
And for each there will be 2 (or more) folders:

  • ci_by_png
  • png_all

Dependings of the games, you will find the textures you want in either of those folder.

4N8wO0K.jpg

I mentionned earlier that all textures obtained from VRML are upside-down.
That is not the case with RiceVideo textures which have directly the good rotation.
So if you need to use one of these texture on a model, you will need to rotate it and mirror it.

Here is an example of a flower:

hhwf3Nt.png From VRML, .bmp so no transparency.
FqzF9eK.png From RiceVideo, .png transparency but upside down.
Z5WR3NG.png Previous flower after rotation.
2nRoppj.png Previous flower after I mirrored it.

While Paint can rotate and mirror pictures, it will remove any transparency when you save the picture.
So it's obviously more adapted for the .bmp pictures you get with VRML.


I have used Paint 3D which come with Windows 10 and it's pretty fast to mirror pictures and preserve the .png transparency.

To rotate a picture, you can either rotate it in the Photos application of Windows (like I mentionned at the beginning).
Or you can do it in Paint 3D (if you don't have it, use Gimp or something else).

Right click on the picture, click on Edit with Paint 3D to open the software.


Zoom in with your mousewheel if it's too small to see.
Do Ctrl A to select the picture.
Tools will appear on the sidebar (if they dont, press M😞

  • If you haven't rotated the picture earlier, click on the Rotating button 2 times
  • Click on the Mirror button (Horizontal)

bl6zXeZ.jpg

Once you are done, click away to disable the Tools and do Ctrl S to save the picture.

 

_________
Mirroring Pictures

 

At the beginning, I talked about the N64 using Half textures to save memory.
The flower of the previous trick is one of them.
Applying it on the model in Milkshape will not give us the result we want.

8baHHD9.jpg

So we will need to Mirror the flower to get its symmetry.

 

If you download my tool, you can directly mirror pictures in it.


Again, I will use Paint 3D, so open the picture like earlier.
Do Ctrl A to select the picture, then do Ctrl C to copy it.

Then click on Canvas on the top bar.


On the sidebar:

  • Make sure that When resizing the canvas, adjust my image as well is unchecked
  • Make sure the Aspect ratio is locked is checked
  • Make sure Pixels is selected and not Percentage

FJskeSt.jpg

You can now grab the square on the right on the picture to double its length.
On the sidebar you can see the length, so if it was 16px, increase it to 32px.

uE4dpPk.jpg

Since you copied the picture earlier, you can now paste it, move it to the empty space you just created and mirror it.

P2Xc15Z.jpg

You can now save the picture.

Of course, depending of the texture, you will either need to Mirror it horizontally, vertically or both.

Go back in Milkshape.
If you load that new picture in your Materials, you will now notice a new problem:
- The texture is duplicated on the model, which is pretty logic since we doubled its size.

I3w1Snq.jpg

We now need to use the Texture Coordinate Editor of Milkshape.
Click on Window > Texture Coordinate Editor (Ctrl T).

kg5uvvy.jpg

So in this small window, you can see few tools, few options you can check and a select bar where you choose the Group you want to modify.
In Milkshape, in the Group tab, double click on the group you want to select.
Select that group too in the Texture Coordinate Editor.

The group you selected in Milkshape will have a white rectangle in the Texture Coordinate Editor so you know when you selected the correct one.

d2Khd8h.jpg

Click on the Scale option, in Factor you can see 2 textboxes.
The first one is for the X axis and the second for the Y axis.
In our case, we only mirrored horizontally (X axis), so we put 0.5 in the first textbox.
To be safe, you can also check Lock Y, so the Y scaling will not get modified if you mess with the other value.

0KQbaSw.jpg

Once you are ready, click on the S button next to the textboxes.
You will see the change on the Texture Coordinate Editor.
To see what changed on the 3D view, simply click anywhere on it.

zcbqM8y.jpg

Do the same for the others groups that need it.

Depending how you mirrored your picture, you might also need to Scale by 0.5 on the Y axis.

One problem you can encounter is after you re-scaled the texture, it is not aligned anymore.

5zjEWxu.jpg

The fix is simple, click on the Move Tool of the Texture Coordinate Editor.

Again there is two textboxes.
Put 0.5 in the textbox you need and press the M button next to the textboxes.
In my case since it's not aligned on the X axis, I put 0.5 in the first textbox.

gHmnKlS.jpg

Click on the 3D view, and it should be fixed.


While 0.5 is the solution and will fix the texture alignment, if, in the Texture Coordinate Editor, the "box" is not on the texture and if you are accurate like me, you might want to fix it.

e24auhK.jpg

You can use negative numbers in the textboxes, so just put -1 in the textbox you need and press the M button.

_________
Draw the backfaces of models

To stay on the topic of the flower model, one issue you will encounter is that, once compiled, the backfaces of the model will not be rendered.
On the 3D view, you can enable and disable Draw Backfaces to see the difference:


KHMPMdt.jpg With the backfaces enabled
t03lJrL.jpg With the backfaces disabled

To fix it, you need to add the parameter $nocull 1 to your vmts.

Here is one of the .vmt of the model:

"VertexLitGeneric"
{
	    "$surfaceprop" "grass"
	    "$basetexture" "models/moltard/OOT_KG/Flower/16D12D0D_c"
	    "$model" "1"
	    "$nocull" "1"
	    "$alphatest" "1"
}

You can also see that I use $alphatest 1 instead of $translucent 1.
In the case of this model, because multiple translucent texture were crossing each other (flower + leaf), it wasn't rendering correctly.
$alphatest fix that issue, you can read more on valve wiki about $translucent.

 

_________
Get a .png texture from the _a.bmp and _c.bmp

 

As you have seen previously, you can easily get translucent texture using RiceVideo.
But in case you are not able, your only alternative is to use the _a.bmp with the _c.bmp to get the .png.

Depending what the _a.bmp look like, you can see if the texture need or doesn't need transparency:

  • Totally black texture, the texture doesn't need transparency
  • The _a.bmp and _c.bmp are the same, the texture doesn't need transparency
  • The _a.bmp is made only of black and white, the texture need transparency

 

If you download my tool, you can create the .png by loading both bmp.

 

For the example, I will use the leaf of the flower model of earlier.

StYHx4A.jpg

Here you can see the _a.bmp, the _c.bmp and the .png we should get as result.

Download Gimp if you haven't done it already, the link is at the top.
Feel free to use Photoshop if you are more experienced with it.

Open both textures in Gimp (in 2 separate windows), by clicking on File > Open, 2 times.

VyQkaBY.jpg

In the _c texture, click on Layer > Transparency > Add Alpha Channel.

6TI518X.jpg

In the _a texture, do Ctrl A to select it, then Ctrl C to copy it.
Go back in the _c texture and paste it.
You now have the _a texture on top of the _c texture.

We will now use the 2 tools windows which might be disabled on Gimp Launch.
To enable them click on Windows -> Recently Closed Docks.

eNlx6jU.jpg

Go in the Layers Window.
Right click on Floating Selection (Pasted Layer) and click on To New Layer.

E2QSJy0.jpg

It will then become Pasted Layer.
Go in the Toolbox, and select the Magic Wand.

bltWrrb.jpg

Click on the white areas of the alpha texture.
To select multiple areas, hold Shift while clicking.
Once you have selected everything that needs to be removed, click on the Eye of the Pasted Layer in the Layers Window.

XldgYwA.jpg

The alpha texture won't be visible, so you can now select the _c texture by clicking on it in the Layers Window.
Press the Delete key on your keyboard and it will remove every parts of the _c texture that need to be transparent.

hmZMr8V.jpg

You can now save it as a .png
Click on File -> Export As (Ctrl Shift E).
Give it the same name as the _c texture (1249F6AB_c.png in my example).


Obviously, when using a transparent texture, don't forget to use either $translucent or $alphatest in the .vmt

 

_________
Texture with wrong color

 

In some case, a texture ingame has a specific color.
But the texture obtained through VRML / RiceVideo is kinda grey-white, or another color.


The best you can do is check ingame the color and take a screenshot of the texture.
Then use the Eyedropper tool of any software (even Paint can do it) to get the RGB code of the color.

Use VTFEdit, import the picture and the usual window appear.

 

l94rDf8.jpg

 

You can turn the texture grey by setting the Normal Format to I8 and the Alpha Format to IA88.
Press OK and save the vtf.

 

rGkvAXp.jpg

 

In the .vmt, you will add a $color parameter

"$color" "{255 255 255}"

Replace it by your RGB code.

$color only work with brushes.
If you want to use color on a model, you need to use $color2.
The syntax stays the same.

 

___________________________________________________________________________________________________
___________________________________________________________________________________________________

 

Thanks for reading this guide, it should be more complete now and more clear.

Check the Nintendo64 Mapping Guide and my N64 Mapping Tool, the links are at the top.

Edited by Moltard
edit

IiWfJa9.gif

Share this post


Link to post
Share on other sites


  • 4 months later...
On 9/6/2020 at 7:24 PM, ok said:

The VRML folder does not appear in my  (C:) Drive.Help.

Hi,

 

you need to create it yourself first.

 

By the way, look at the guide on gamebanana https://gamebanana.com/tuts/13280 (i also linked it at the top of the post).

 

the guide there is updated and use Blender and is way more complete and easier to follow (it's a pdf you download)


IiWfJa9.gif

Share this post


Link to post
Share on other sites


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...