Oblivion: Creating a VWD Mesh

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.

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:



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:



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:



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:



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:



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!
.........................
"It is pointless to resist, my son." -- Darth Vader
"Resistance is futile." -- The Borg
"Mother's coming for me in the dragon ships. I don't like these itchy clothes, but I have to wear them or it frightens the fish." -- Thurindil

Well. I guess that's that then.

       
« Skyline
Harry Potter and the Deathly Hallows: Part 1 »

Posted on Nov 14, 2010 12:02 am by Samson in: | 49 comment(s) [Closed]
Comments
Does that mesh you use as an example have anything to do with the next stage of open cities reborn?

Otherwise, another useful tutorial.

       
Edited by prettyfly on Nov 14, 2010 1:03 am
Yes, it's one of the new city wall segments Hanaisse made for me.

       
Cool. I look forward to seeing what you've done with the city in the next release of OCR.

       
Yay, another brain-download from Arthmoor.

Milkshape 3D is the secret, eh? That looks like a pretty cool tool.
I assume it's possible, and tedious, to cut down poly's in Blender too though?

Small question. Why are we copying the texture path of the original, if the new has a different texture path anyway?

       
I think Blender has a script for this too, it's a process called "mesh decimation" but I've never been able to find the menu for it. Someone must know. It would simplify things for people who can get around Blender obviously. Especially since one could do some manual adjustments if needed, and correct any flawed UV that comes out of the process.

I copy the texture path from the old one to save keystrokes, and because when I do this I only need to add "lowres" to the path in most cases. Where the lowres texture comes from isn't all that important, and you can certainly use hires textures if you want, but that takes up more VRAM.

       
It's a nice looking wall segment.. and, looking at it in the Milkshape 3D DirextX Mesh Tools shot, you can easily see how it could be ever so slightly modified to make an awesome train trestle as well... ;)

       
It can be done in Blender, although the Milkshape way sounds slightly easier. I did some decimation stuff for Kerrach, and it had some hazards associated with it.

Brief process:

1. Select an object in Blender. Go into Edit mode.

2. Go to Mesh/Scripts/Poly Reducer. I have another script called PyRedux that worked a bit better, but you'll need to Google it.

3. Play with the options. Probably need to Google because I don't remember enough to say how to do it.

4. Repeat as necessary for other parts of the mesh, then export as normal, obviously not over top of your other mesh.

       
The Milkshape way is easier, at least for the reduction part. You seriously have to do this piece by piece in Blender? Screw that, Blender is hard enough to navigate without having to be stupid about the workflow.

       
I love these tutorials you two produce, they so handily reinforce many of my reasons for not wanting to be anything resembling a graphic artist... :whistle:

       
@Samson

Yeah, there are times when the Blender approach is probably better - you get lots of control over the process. It doesn't sound like this is one of those times, however.

@Conner

Heh. You know, I said that for years too. And then at some point you hit a wall where you go "Well, if I want to do more things, I need to get more skills." And then here we are and I can't really quit. Addiction and all that. Probably a lot like drugs, if Rube Goldberg was designing heroin needles. Or something.

       
:lol: You may be right about that, but thankfully I've haven't hit that wall that requires me to go learn to hit my head against the wall trying to figure out all these graphics programs yet. :P ;)

       
Thanks Dwip, that'll come in handy for future reference.
I only asked because I'll probably never "buy" Milkshape 3D because I'll probably never need to make these. But it's good to know. Plus, options.

       
Nice work on the new edition of Open Cities Reborn Samson. You've almost convinced me to switch over from Better Cities.

       
Edited by prettyfly on Nov 14, 2010 7:34 pm
Only almost, eh? What's better about Better Cities? Or, what's still wrong with Open Cities Reborn?

       
I just prefer the extra content of Better Cities, though when faced with the new layouts of OCR, its only wining by a little bit now.

Aside from that, there's nothing wrong Open Cities Reborn, though I do find the thought of all the reinstalling of other mods I'd have to do slightly intimidating if I was to make the switch.

       
Well, perhaps the Cheydinhal revamp (whenever it comes) will be the last nudge that converts you :)

You shouldn't have to reinstall all your other mods - it ought to be a simple matter of uninstalling the BC stuff, then installing the OCR stuff. Which does obviously include any needed patches, but hey, you probably already have a few for BC anyway.

       
Actually, its not the patches (though I'll probably need more than I did before, it doesn't really bother me), its mods like crowded cities and the like that I'll have to get new versions of to use. Doing that for some reason really annoys/concerns me. I'm really just being over dramatic about it though, since the work is so minimal. I figure that if I've managed to install FCOM without any issues then it's not really going to be any problem.

Alternatively, maybe I just feel a bit unnerved about using Open Cities due to my experiences in the old days (well, last year) when I tried to install Open Cities Classic with OBMM (I think I really deserved all the frustration I got out of that; would you believe I spent six months with a 100+ load order but no Wrye Bash or Boss?)

And yeah, maybe Cheydinhal will win me over... :smile:

       
Edited by prettyfly on Nov 14, 2010 11:49 pm
So it's not really any specifics that make BC better than OCR in your mind, just that it'd mean a hassle to swap from one to the other.
I'm a big supporter of most of Samson's mods, but I've debated back and forth for sometime now about Open Cities. On the one hand, I'd like to try it because Samson raves about it and has clearly put so much work into it. On the other hand, I'm not convinced I want the Open Cities aspects themselves, I kind of like the transition to/from cities. What I don't like is the transition between parts of town in the IC but OCR doesn't address that. :shrug:

       
I have no real problem with people who don't want OC for whatever reason - provided they're not making stuff up about it being a performance hog or something. And people do that, a lot, and it's entirely untrue that it bogs the game down. That's an issue for another time.

If you like the transitions to the closed spaces, then there you go. That's a perfectly valid thing to me and I've got no issue with it.

I don't like the transitions in the IC either, but unfortunately that WOULD become a performance issue because that much stuff crammed into that small an area is a recipe for disaster. Most likely because transferring that many NPCs into the main worldspace packed that closed together overwhelms the system, but who knows.

I can only tell you that when I did a dry run test by crudely copying all of the external clutter - sans NPCs - the game took a noticeable hit to performance. That could just be because at the time all the meshes were still the unoptimized variants. Advances in modding since then may make the whole thing moot.

Unfortunately there's one other problem with doing the IC. Nothing lines up right between the districts. Bethesda's hackjob meshes make the entire thing impossible without someone offering to do Blender work - and in all the times I've had people ask for the IC, nobody wants to step up and do what must be done to make it happen.

       
I understand what you're saying (wouldn't have a clue how to help fix it in blender if I wanted to). In fact, it sounds a bit like mapping New Darkhaven, for a mud parallel, to me. Beyond that, the things I've seen in your screen shots and what we've discussed previously about OC actually looks/sounds great which is why I've been tempted to try it just to see how it feels and even downloaded your latest OCR over at AFK Mods, but as odd as liking the transition and it's accompanying game pause sounds, it is what's kept me from OC thus far. (We've discussed OC enough in the past here that I'm not the least worried about performance and such, I know you've optimized it all as much as possible and my computer, with my light mod list, shouldn't even notice it, let alone me seeing it.)

       
Edited by Samson on Jan 17, 2012 5:24 pm
Prettyflyonholidsys [Anon] said:
Comment #21 Nov 17, 2010 6:20 pm
my choice in city mods is to do with content, not loading screens.

anyway, while the idea of open imperial city sounds great to me, i can certainly understand the numerous problems with doing it. And i suspect my system couldnt handle it.

       
Yeah, and can you imagine the mountain of compatibility issues? The IC is home to tons of mods.

       
Sadly, that's a VERY good point about the vast quantity of mods based on IC that would have to have compatibility patches, even if just opening it up didn't kill your system on it's own.

       
Actually, would a mod that put all the different districts of the imperial city, aside form the arcane uni and prison district together in the same world space, henceforth avoiding the need for loading screens when moving through the distracts, be anymore practical (aside from the fact that it wouldn't help incompatibility issues)?

       
Good question. I'd think it'd probably run into the same issues but on a smaller scale since it's not also including the rest of the world. IC is still almost as bad by itself, no?

       
<< prev 1, 2 next >>
Comments Closed
Comments for this entry have been closed.
Anonymous
Register

Forgot Password?

SuMoTuWeThFrSa
 1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30