Jump to content
Sign in to follow this  
Arthmoor

[Oblivion] Creating a VWD Mesh

Recommended Posts

So you've spent some time creating custom resources. You've placed them about in the CS, and have gone in to admire your efforts. A little snip here, a small adjustment there, everything is just right now. So off you go to climb up to a nice high point to see your handiwork from afar. Unfortunately it isn't visible!

In the following tutorial, I will illustrate one possible process to correcting this situation. [more]

Generating a _far.nif for a custom mesh can be a very involved process. Without the right set of tools in fact, it could be a very long drawn out tedious slog through your modeling software all over again. Why would you need to do this? Oblivion's game engine cannot handle the use of a full scale model for distant viewing purposes. Attempting to do so usually results in massive FPS loss along with a boat load of visual anomalies. There is a streamlined method to the madness though.

For this tutorial, you will need the following software:

Nifskope

Milkshape 3D

Paint.NET

TES4LodGen

You may be tempted to start with the mesh, but that would actually be backward in this case. You'll want textures for the VWD model available prior to that work. So the best bet is to start by making low resolution versions of the textures you're using for your custom model. If you're not using any custom textures, you can skip this entire section, though chances are you'll want to make lowres versions of select vanilla textures anyway.

This part is very straightforward, though tedious. Start with the color maps, the visible texture files in normal color. For best compromise between visual and memory usage, you'll want to reduce the image size to 256x256. If your texture files are already that low or lower, all the better. You'll want to save them as DXT1, with mipmaps, once you've resized them. If any of the textures have alpha channels, you'll almost certainly need to strip those out first unless the texture has actual transparent parts to it. Failing to do so when the texture doesn't need it can result in sparkly anomalies while playing. You can use Paint.NET to save the file in X8R8G8B8 format. This will remove the alpha channel without any image quality loss.

Next you'll need to downsize your normal maps. Check all of them in this case. Normal maps for VWD purposes should only ever be saved in DXT1 format. Alpha channels on normal maps only get used by the game for specular data, which is not visible at the distances VWD meshes operate at. Failing to make the conversion can result in sparkly visual anomalies, along with texture flickering. Once you've converted the files, they should be resized the same as the color maps they belong to. With the textures out of the way, the hard part begins.

Make sure your lowres files are saved somewhere easy to find, and preferably in a logical place as it relates to the mod you're making them for. It'll be easier to work with later.

You should have downloaded and installed Nifskope and Milkshape 3D by now. Nifskope is free, requiring no registration or payment for use. Milkshape 3D has a 30 day evaluation period but is well worth spending the small amount of money to register the program.

Make a copy of the mesh you need to modify. Rename it with _far in the name, so if you have House.nif, rename it House_far.nif. Open it in Nifskope, usually just by double clicking on the file. In order to get to where it needs to go, you'll need to export the file out. Before you do that though, you need to remove any collision blocks the mesh may have. This can vary widely depending on the mesh, but most only have one block, as in this example:

vwd_tutorial1.jpg

With the branch expanded, and the collision block selected, right click on it and select Block->Remove Branch. Your visual of the mesh display should update and the red outlines for the collision disappear. It's ready to be exported. The reason for this step is because Milkshape 3D is not capable of handling havok collision, and forgetting it means you'll be stumbling over extra data in the mesh that will interfere in your work.

To export, make sure you have either no nodes highlighted, or specifically highlight the top node, usually the 0 node that everything else expands underneath. Go to File->Export->Export .OBJ. You'll probably get a pop-up window that says this:

vwd_tutorial2.jpg

Click OK, and you'll be asked for a filename to export to. Pick a location you can easily find to save it, and give it a name you'll recognize.

Open Milkshape 3D. You may need to deal with a few initial configuration screens, but once you're past that, go to File->Import->Wavefront OBJ. Find the file you just exported from Nifskope. If all goes well, you should see a screen with several skeletal views of your mesh, and one in the lower right in all white. The one in the lower right will be handy for quick checking, you should be able to rotate the image around by holding the left mouse button down and then moving the mouse around.

In order to get the low poly model for distant viewing, go to Tools->DirectX Mesh Tools. You'll get a small window that looks like this:

vwd_tutorial3.jpg

On this window, you can click and hold your center mouse button to zoom in and out on the wireframe. You can click and hold the left mouse button to rotate the wireframe. It can be a bit jittery but you should be able to get yourself a decent view. There is a slider on the window, grab that and pull to the left. See how it starts removing parts of the wireframe? If you drag it all the way to the left, you'd end up with a severely deformed mesh. The numerical readout it gives you as you're sliding it is the number of triangles you're reducing to. You want to strike a balance, because if you pull off too many, your VWD mesh will have a lot of holed in it and look awful. Too many, and you aren't going to get an optimized result that is easy on frame rates. Once you get something that looks acceptable in the wireframe, click the disk icon to update the mesh.

This is where you want to do a quick check on things. If the displayed mesh in the lower right looks ok, no visible gaps, no huge missing chunks, you're ready to export. If not, you can go to the Edit->Undo DirectX Mesh Tools and then try again.

Export the results by going to File->Export->Wavefront OBJ. Save it somewhere you can find, then switch back to Nifskope.

Once back in Nifskope your full size model is still displayed. You'll need to clear that data out now so you can import the new data. This is why you should be working from a copy, just in case. Right click on the top node, select Block->Remove Branch. If all goes well, you should have a blank display in the left pane of Nifskope. If not, there will be leftover nodes. Use the same method to get rid of them too. If there are a lot, right click on one, go to Block->Crop to Branch, and it should remove all but the one you were highlighting. You should remove it now.

With the blank slate, go to File->Import->Import .OBJ. You may see the same odd "OBJImport" pop-up again, just click OK and then find the file you exported out of Milkshape 3D. Your nif display will update again, with an all-white image. This is where some more tedium comes in, and why you made the lowres textures ahead of time. You'll need to assign them now.

The easiest way to go about this is to switch to Windows Explorer, navigate to your real mesh, and open it in Nifskope. You should see it in a second window. Expand its branches until you can find the first texture node, which should look something like this:

vwd_tutorial4.jpg

Double click on the file path listed there. In my example, the path is:

textures\arthmoor\opencities\architecture\chorrol\chwalltrimd01.dds

Copy the path it shows you, then switch back to your low poly mesh in the other window. Expand its nodes until you find the first place to put a texture path. The number of nodes in the thing will be different, but all of the texture paths should be in the same order as they are in your real mesh. It'll look something like this:

vwd_tutorial5.jpg

It's generally best practice to have a lowres subfolder in your mod that corresponds to the same path structure as your real folders. So for my example, the new texture path in the low poly model becomes this:

textures\arthmoor\opencities\lowres\architecture\chorrol\chwalltrimd01.dds

If you have assigned the correct path, you should see a visible update in your model on the right. If it remains white, you either picked the wrong path or you haven't made your lowres files yet.

Continue doing this for all of the nodes in the two windows. As you go, visually check to be sure what you placed matches the same location you copied from. It should go relatively smooth from here to the end. Once done, save the finished file. That should be it. DO NOT perform a recalculation on tangent space or add any other properties to the nodes except for what's needed to support a transparent texture. Extra data nodes on a _far.nif lead to visual anomalies.

After all of your _far.nif files are created, it's generally a good idea to use the latest version of PyFFI on the model. This should be (as of this writing) version 2.1.6. This will trim out any excess verticies in the model and optimize its vertex caching. This helps performance. However this step is also optional since it requires some other Python libraries first.

You should then be sure all of the new files are in their proper places, and fire up TES4LodGen to update your game's DistantLOD folder. Go admire your work!

Share this post


Link to post
Share on other sites

I'm becoming a Grumpy Borg... :swear:

 

The object export in Nifskope is busted. Have you tried it recently Arthmoor? Could you tell me which version it still works in? I just tried 1.1.2 and it's broken in that too (they say that it's broken in 1.1.3).

Share this post


Link to post
Share on other sites

That worked - thank you! Milkshape doesn't render the object properly, but I can manage with the DirectX Mesh Tools window, which was fine. The main windows are zoomed in too far and I couldn't see anything.

Share this post


Link to post
Share on other sites

Well that was easy then :P

 

Yeah, large meshes are a pain with that program but all you're really concerned with is the DX Mesh Tools box. It'll be obvious if the reduction is useful after importing into Nifskope.

Share this post


Link to post
Share on other sites

This is also a real challenge if you're trying to do VWD on an extremely large tree. :P Removing the alpha from the leaves doesn't work too well. Koniption had done custom VWD meshes for her trees and one of the things I notice is she did custom textures as well that she calls billboards. No alpha but a light green background instead. I'm playing around with other textures to see if I can find something that will look better for the leaves.

Share this post


Link to post
Share on other sites

Tree LOD isn't something you can do with this process, Koniption has it right. Billboards must be made, but I don't know how to do those.

Share this post


Link to post
Share on other sites

Yeah, as I've discovered. I would have to make a custom mesh that encompasses the entire tree canopy and I'm not sure that's feasible in this case. This is that weird tree you noticed on your run through, Arthmoor. I think we're now discovering why KP went with a custom cloud mesh to encompass the tree canopy. *sigh*

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
Sign in to follow this  

Support us on Patreon!

×