I think I need mass adjustment of texture paths and names in

Post » Tue Dec 06, 2011 3:14 pm

I'm making LOD for a copy of the Wasteland worldspace that Elminster made. I'm trying to do it by copying Beth's existing meshes and textures instead of making the GECK generate them.

First thing, I believe that for this to work, the file names all have to match my worldspace copy's name, which by necessity cannot be what the old one was, which was "Wasteland". If they don't have to match, it's the way bethesda did it so I have been assuming that this has to be the case (had looked at how the DLCs were packed).

I was able to do a mass rename on the files. With the files simply renamed to match my worldspace, and those paths correct in my .bsa (which I feel sure they are), they do not display in game. I think I see why...

See here:

http://www.finhosting.fi/~fallout/screenshots/NifskopeImage.gif

This is an example.nif file opened up in Nifskope. See at the bottom of the window where the texture paths are pointing to 'wasteland' instead of the correct worldspace name, which is 'hummerwasteland'.

It looks like to do this, in this way, I have to cause several thousand .nif files to carry this new, correct path to their hummerwasteland textures.

I get the sense that I must at least have that directory path in the .nif correct. If anything, maybe it would work to fudge on the texture name if I had to, naming that back to plain old wasteland instead of hummerwasteland. But I know that path with Wasteland in the directory name must be changed.

I know exactly how to do it by hand. I have had to fix the paths in Lord Inquisitor's Hummer mesh itself enough times. But um ... Yeah, this one ain't happening by hand. I'll guess its over 3000 nifs.

Does anyone know if there's any automated means to do this mass path adjustment in all these .nifs? or, maybe there's some shortcut to where I don't have to?

* kinda doesn't wanna try that LOD mesh generation thing in GECK*
User avatar
tegan fiamengo
 
Posts: 3455
Joined: Mon Jan 29, 2007 9:53 am

Post » Wed Dec 07, 2011 12:02 am

I think there's a script bundled with http://www.python.org/ / http://pyffi.sourceforge.net/ called NifToaster that might be able to do that. I don't know anything about it, I just remember seeing it when I installed Blender (PyFFI required for nifs).

Edit:
Looks like you need the http://pyffi.sourceforge.net/apidocs/pyffi.spells.nif.modify-module.html which has http://pyffi.sourceforge.net/apidocs/pyffi.spells.nif.modify.SpellTexturePath-class.html and http://pyffi.sourceforge.net/apidocs/pyffi.spells.nif.modify.SpellSubstituteTexturePath-class.html in it. Looks like that would do it.
User avatar
Amanda savory
 
Posts: 3332
Joined: Mon Nov 27, 2006 10:37 am

Post » Tue Dec 06, 2011 2:44 pm

While I'm intrigued by the idea, your going to run into problems because of the level of detail in the primary meshes. Right now the LOD meshes are all extremely light-weight meshes with no collision (making them even lighter weight), and as such it takes Very little memory to load them in en-mass around the player to present the appearance of LOD. However if you instead replace all of those textures with primary/full textures that contain collision, your now asking the engine to render that level of detail but in a 9 or 12 square-cell area outdoors. My GECKulation is that this can't work smoothly in the GECK, and even if you load it in-game, I think that the lag will make it unplayable.

Not trying to rain on your parade here, just offering some perspective Good luck! Your never one to shy away from a challenge, and I'm quite sure no one has tried this before. I look forward to see how this comes out! :)

Cheers,

Miax
User avatar
Jynx Anthropic
 
Posts: 3352
Joined: Fri Sep 08, 2006 9:36 pm

Post » Wed Dec 07, 2011 12:04 am

I think there's a script bundled with http://www.python.org/ / http://pyffi.sourceforge.net/ called NifToaster that might be able to do that. I don't know anything about it, I just remember seeing it when I installed Blender (PyFFI required for nifs).

Edit:
Looks like you need the http://pyffi.sourceforge.net/apidocs/pyffi.spells.nif.modify-module.html which has http://pyffi.sourceforge.net/apidocs/pyffi.spells.nif.modify.SpellTexturePath-class.html and http://pyffi.sourceforge.net/apidocs/pyffi.spells.nif.modify.SpellSubstituteTexturePath-class.html in it. Looks like that would do it.


wow I shall grab that and give it a try... thanks a ton!!!


While I'm intrigued by the idea, your going to run into problems because of the level of detail in the primary meshes. Right now the LOD meshes are all extremely light-weight meshes with no collision (making them even lighter weight), and as such it takes Very little memory to load them in en-mass around the player to present the appearance of LOD. However if you instead replace all of those textures with primary/full textures that contain collision, your now asking the engine to render that level of detail but in a 9 or 12 square-cell area outdoors. My GECKulation is that this can't work smoothly in the GECK, and even if you load it in-game, I think that the lag will make it unplayable.

Not trying to rain on your parade here, just offering some perspective Good luck! Your never one to shy away from a challenge, and I'm quite sure no one has tried this before. I look forward to see how this comes out! :)

Cheers,

Miax


Thing is though - - I'm using the .nifs and textures straight out of the fallout 3 bsas which the wasteland worldspace uses. I am certainly not adding collision (not that I would know how to.. although I succesfully deleted collision from a .nif once, isn't that cool?!?!) Whatever they did for Wasteland this should be the same.
User avatar
Anthony Rand
 
Posts: 3439
Joined: Wed May 09, 2007 5:02 am

Post » Tue Dec 06, 2011 6:09 pm

I am so confused right now with this python script. I have Python 3.1 installed and, a bunch of other stuff, and... I had thought maybe qskope is the app this thing would use to run but... I don't know where to go at the moment. Qskope doesn't seem to run.
User avatar
~Amy~
 
Posts: 3478
Joined: Sat Aug 12, 2006 5:38 am

Post » Tue Dec 06, 2011 9:25 pm

Not sure if that was intended for FO3, all the references seem to be for older games.

http://www.silgrad.com/wbb2/thread.php?postid=177779
http://cs.elderscrolls.com/constwiki/index.php/Nif_Optimization#Running_the_Script_2

In the first link, he has a batch script like:
c:cd c:\python26python  Scripts\niftoaster.py -a /old\\texture\\name.dds/prefix\\new\\texture\\name.dds modify_substitutetexturepath "path\\with\\nifs\\"pause

I couldn't get it working. Probably 'cause I don't know what I'm doing, but the script might need updating :shrug:

Although:
python Scripts\niftoaster.py dump_tex "path\\with\\nifs\\"

Did display the correct values for the NiMaterials in the nifs, so it's definitely able to open them.

Edit:
I think it recommends http://www.python.org/download/releases/2.6.6/ and the newest PyFFI (both 32bit) .
User avatar
Chloe :)
 
Posts: 3386
Joined: Tue Jun 13, 2006 10:00 am

Post » Wed Dec 07, 2011 2:46 am

Note sure if that was intended for FO3, all the references seem to be for older games.

http://www.silgrad.com/wbb2/thread.php?postid=177779
http://cs.elderscrolls.com/constwiki/index.php/Nif_Optimization#Running_the_Script_2

In the first link, he has a batch script like:
c:cd c:\python26python  Scripts\niftoaster.py -a /old\\texture\\name.dds/prefix\\new\\texture\\name.dds modify_substitutetexturepath "path\\with\\nifs\\"pause

I couldn't get it working. Probably 'cause I don't know what I'm doing, but the script might need updating :shrug:

Although:
python Scripts\niftoaster.py dump_tex "path\\with\\nifs\\"

Did display the correct values for the NiMaterials in the nifs, so it's definitely able to open them.


You are getting much, much farther than me with this in any case.

I opened up a .nif file in notepad. I am noticing that it's just text in the .nif which provides that path and filename. It seems like any editor which can do batch operations while not corrupting the binary contents of the files could do this job. hmm.
User avatar
Céline Rémy
 
Posts: 3443
Joined: Sat Apr 07, 2007 12:45 am

Post » Tue Dec 06, 2011 2:55 pm

I found an editor which seems able to do this, I'll write back soon and let you know how it goes.

Edit: I did that operation and Nifskope says that string is too long (and the LOD isn't working in game). I'll try redoing it all with the worldspace name, filenames, and paths being named something the same length as wasteland.

http://www.brinesoft.com/BatchTextReplacer.asp is the program I used to edit the files (its a different one for mass rename).
User avatar
Julie Serebrekoff
 
Posts: 3359
Joined: Sun Dec 24, 2006 4:41 am

Post » Tue Dec 06, 2011 6:35 pm

Well,

I've achieved what I wanted to in terms of the .nif paths and the filenames, but I'm still not getting LOD to display in the wasteland copy worldspace. I'm guessing that lack of LOD is what I am seeing, anyway - - landscape objects have to be close up in order to be seen, and the sky is sorta purple-ish looking. When you pan the camera, the distant objects in front of you tend to drop out of sight, and the ones along the sides of your vision are maybe likely to become visible.

I believe everything below is done right:

My file is named HummerWorld.esm. The worldspace name is wastehumm.

My .bsa files are named HummerWorld - Meshes.bsa and HummerWorld - Textures.bsa. My meshes .bsa is here: http://www.finhosting.fi/~fallout/screenshots/lod/wastehumm1.gif , and my textures .bsa is here: http://www.finhosting.fi/~fallout/screenshots/lod/wastehumm2.gif . Compare those with Anchorage's meshes .bsa structure: http://www.finhosting.fi/~fallout/screenshots/lod/anchorage.gif . I've got some familiarity with how .bsas should go and this seems straight-up to me.

My .nifs have paths to their textures like this: http://www.finhosting.fi/~fallout/screenshots/lod/wastehumm3.gif , compare with Anchorage's landscape nif paths: http://www.finhosting.fi/~fallout/screenshots/lod/anchorage2.gif note how these texture paths have Data\ prepended but that's not shown within the .bsa directory structure, it assumes Data\ .

There is nothing weird in the way the GECK shows my worldspace (such as : http://www.finhosting.fi/~fallout/screenshots/lod/hummergeck.gif ).

I think that there must be something that's sorta missing? Like, maybe the game somehow doesn't know to use the LOD even though I've got it loaded into the .bsas properly? Not sure?

I note that anchorage has a directory with 'lodsettings', not positive on the significance.

I've tested this with only fallout3.esm and hummerworld.esm loaded, to be sure my separate hummer-car .esp is not doing something to break the worldspace.
User avatar
cosmo valerga
 
Posts: 3477
Joined: Sat Oct 13, 2007 10:21 am

Post » Wed Dec 07, 2011 3:12 am

Darn it, I almost thought I had something good, for a sec.

I found that if I set the parent worldspace on this wasteland copy to be the real wasteland, it can use that LOD and everything looks great.

But, when configured that way, its sharing the map markers between the worldspaces and I don't see how to make it stop. When set like that, when you are in WasteHumm world, you can see all of the real Wasteland's markers, in addition to the ones that are in the copy. When I turned off a bunch of the flags, I couldn't see the copy's, seeing just the real Wasteland's. What I want is the map markers being completely independent.

gah!
User avatar
Susan Elizabeth
 
Posts: 3420
Joined: Sat Oct 21, 2006 4:35 pm

Post » Wed Dec 07, 2011 6:02 am

I have this working now - - there was a wasteland.dlodsettings file that seems to have worked as a direct plugin in place of a wastehumm.dlodsettings file. Its in the misc.bsa ofor fallout3.esm. It's not working quite right when it's in my .bsa but while right in the directories, things are working, I probably need 3 .bsas to do it. Will post back sometime later.
User avatar
Craig Martin
 
Posts: 3395
Joined: Wed Jun 06, 2007 4:25 pm

Post » Tue Dec 06, 2011 7:31 pm

k it seems to be working, but that one file cannot be loaded into the .bsa is all.

This thing is hard to test sometimes because it is as though maybe the savegame can look one way but, then in a fresh save where that part of the world has not been looked at recently, it would look different, but all with the same files in place. If you can see what I mean.
User avatar
Krystal Wilson
 
Posts: 3450
Joined: Wed Jan 17, 2007 9:40 am

Post » Tue Dec 06, 2011 11:30 pm

Like I said, you do not give up easily. :)

Some notes I captured on LOD over the years:

LODs are generated int data\meshes\Landscape\LOD\"name of worldspace" having the names "worldspace name".Level16.X-16.Y-16.NIF

There is a XXXX.DLODSettings where XXXX is the name of your landscape inside DATA\LODSettings. Rename it and regenerate LODs again. You might need to delete (backup first) all object / texture LODs and do it again also.

There are many things you'll need to do before even attempting it or it will fail. For example, you'll need to dig through all of the meshes, extracting all of them that end in LOD to there proper directory inside of your mesh folder. Also, you need to do the same for the textures but placing them outside the data folder, in a folder named Source\Textures TGA, again, in there proper file path as they would show in the textures folder. They'll all need to be converted to the TGA format. Once the process has finished you'll have to go into the source folder and move the landscape folder it has created to the textures folder.

"Warning!" Depending on the system you have this process could take up to and, beyond 10 hours, once everything is in its proper place. When you get an error it means you missed a file that ether needs to be in the meshes folder or the source\textures TGA folder.

With a little patience and, time on your hands it works like a charm, once you get your head around it it's much simpler that it, at first seamed. Unfortunately, it will always take time.

The real trick is to take the time to sort out all of the meshes and, textures, placing them in the file path that the GECK needs them to be in. Once that is done the process runs smoothly, yes it takes time but, you don't, error out.

One possible process:

1. Unpack meshes.bsa.
2. Deleted all nif files in meshes\landscape\lod\wasteland.
3. Generate terrain meshes.
4. Packed meshes and trees folder back into meshes.bsa.
5. Generated terrain textures.
6. Unpacked textures.bsa.
6. Copied the wasteland folder out of source\textures tga\landscape\lod.
7. Pasted it over the wasteland folder in the unpacked textures\landscape\lod.

Not sure if any of that will be helpful. TheMagician had a great http://www.gamesas.com/?showtopic=1050826 a while back that may also provide some insights.

Luck!!

Miax
User avatar
Elizabeth Lysons
 
Posts: 3474
Joined: Fri Feb 02, 2007 7:16 am

Post » Tue Dec 06, 2011 5:11 pm

I think what he's trying to do is bypass the generation completely - copy 'n paste from one world to another. Although, more clarification on LOD generation is always welcome! ;)

k it seems to be working, but that one file cannot be loaded into the .bsa is all.

This thing is hard to test sometimes because it is as though maybe the savegame can look one way but, then in a fresh save where that part of the world has not been looked at recently, it would look different, but all with the same files in place. If you can see what I mean.


Shot in the dark - perhaps it has to do with the regions? Did they make it over as well? It looks different LOD wise, or something else? Would be cool to have a bunch of different wastelands available by GTS or something. :)
User avatar
anna ley
 
Posts: 3382
Joined: Fri Jul 07, 2006 2:04 am

Post » Tue Dec 06, 2011 8:13 pm

Well, so far, the thing is working passably-well for the application. At lease one person has downloaded it (hummer wipz release, I linked it in the mods forum) and is reporting basically normal looking stuff.

Information about what the LOD generation process outputs (like Miax has posted) is important in getting this thing to like... work.

But for sure, hell yeah .. this is definitely all about taking the LOD that Bethesda uses for the Wasteland and re-using it in an independent-sort-of way for an additional wasteland. I read on the wiki that it takes like, 2 weeks of nonstop LOD generation to make the Wasteland's LOD. I don't know about you but, my XP workstation could not be expected maintain that sort of uptime... maybe it would go better if this was Windows popped onto a server with ECC ram and such... yeah maybe then.. but not my stuff!

(yeah see, even if that process somehow completed on my PC.... I've got a 2 core CPU and I think when this single-threaded GECK was done LOD processing the Wasteland, I'd have about 1 and a half left. the one core being, that which the GECK didn't use. Sounds like core abuse to me! Yeah, let some server burn out a core of its own instead of my core kthx! hehe).

This worldspace copy shows up in the GECK as having no regions associated with it. I know like, so little about regions. I don't know if they are important for this thing, or, if maybe they relate to the odd sky colors I think I see now and then.

I don't feel good about the lodsettings file I'm using (it being just a renamed regular Wasteland one). I think that maybe, it is not the same as what doing this via a real LOD generation would have created. What creeps me out that it's forcing me to load it into a directory. It shouldn't be like that. Bethesda's DLCs all load their lodsettings files into the .bsas and they are fine. One characteristic of loading a resource into a .bsa is that, you can't use it to overwrite what's in another bsa. And this lodsettings file shouldn't be applying to the real Wasteland worldspace and the need to put it into a directory is a hint that it's maybe doing something like that.

I don't know if I need to do any more work with this, ie: if what I have set now in the hummer wasteland is good enough. Need to see if anyone else sees weird blackish clouds now and then I guess, or if anything in the real Wasteland is affected. My saves are not necessarily as clean as theirs, and this thing is being a little tricky in that, I think.

I think what he's trying to do is bypass the generation completely - copy 'n paste from one world to another. Although, more clarification on LOD generation is always welcome! ;)



Shot in the dark - perhaps it has to do with the regions? Did they make it over as well? It looks different LOD wise, or something else? Would be cool to have a bunch of different wastelands available by GTS or something. :)

User avatar
Miss K
 
Posts: 3458
Joined: Sat Jan 20, 2007 2:33 pm

Post » Tue Dec 06, 2011 8:21 pm

I might be doing something wrong but, I haven't gotten to the new wasteland yet to walk around and stuff. I'm only in the new one while I'm in the hummer. When I select a map marker like "Rural", it loads once to a quick black screen and then quickly loads again placing me next to the hummer in the location I picked, but - I'm still in the original Wasteland.

I confirmed this by renaming the new world to "Wasteland (2)" in both the esm and esp. When I enter the hummer, it says "Wasteland (2)" above my health. Once I pick a location and it places me next to the hummer, it says "Wasteland" above my health. I tried to TCL out of the hummer, but it detected my button presses and loaded me back into the original (ie: exited hummer).

The sky only looks strange when I'm in the hummer (in the new worldspace). It's hard to really tell what going on unless I could get out of the hummer in the new world.

For kicks I made a new empty plugin and made a new world with the same name (wastehumm). Loaded it up and per Miaximus instructions, did the generation with nothing in it (only takes a min or two). It made a new "wastehumm.DLODSettings", but I don't think it works. Looking out of the hummer with the new DLODSettings in place seemed to break the LOD.

The regions have their own climates and images spaces normally, so that may be why - but it's hard to tell. Some change the name of the world while you're in them, like Canterbury Commons. If you're in an interior cell inside the CC region, when you exit it will say "Door to Canterbury Commons" rather than "Door to Wasteland" like places without regions or where the region name is undefined.
User avatar
Ray
 
Posts: 3472
Joined: Tue Aug 07, 2007 10:17 am

Post » Wed Dec 07, 2011 6:01 am

My system doesn't allow you to walk around in that worldspace, it's only supposed to be visible while you are sitting in the hummer. When you travel to "rural" and such, it's putting you in the real wasteland on purpose. It's trying to act like, when you get in your hummer, you have to 'drive' it around, and you get to drive to locations you haven't necessarily been (all those map markers) which is unlike regular fast travel.

Best way to see more of it is to use "tfc" (toggleflycam) and then you can move around outside of the vehicle a bit. See what you think - - -
User avatar
Mandi Norton
 
Posts: 3451
Joined: Tue Jan 30, 2007 2:43 pm

Post » Tue Dec 06, 2011 8:16 pm

Oh, I see. I thought you were making a separate world to drive around in.

When I tfc out of the hummer, everything looks fine. It's just the sky seems a bit "brighter" while I'm in it. But it's hard for me to tell since I have http://www.youtube.com/watch?v=QZDbZQZcEo0 due to sli. :mad: @ beth/nvidia
Gotta kinda wiggle around a bit to find a frame where the hdr isn't not washed out and try to keep it there while I move in and out of the hummer.

Nice hummer mesh btw! Got my coffee and I'm ready to go.
User avatar
Fiori Pra
 
Posts: 3446
Joined: Thu Mar 15, 2007 12:30 pm

Post » Tue Dec 06, 2011 7:17 pm

Oh, I see. I thought you were making a separate world to drive around in.

When I tfc out of the hummer, everything looks fine. It's just the sky seems a bit "brighter" while I'm in it. But it's hard for me to tell since I have http://www.youtube.com/watch?v=QZDbZQZcEo0 due to sli. :mad: @ beth/nvidia
Gotta kinda wiggle around a bit to find a frame where the hdr isn't not washed out and try to keep it there while I move in and out of the hummer.

Nice hummer mesh btw! Got my coffee and I'm ready to go.


That slightly brighter is something I see, too.

If in none of the locations you end up seeing anything like... black clouds... that will be good. I saw black clouds. But it might have been something weird with a savegame? Don't quite know, but I did take a screenshot for good measure.

You had some interesting points about the region data. If others end up seeing black clouds, maybe duplicating that into the worldspace should be looked into (I say that not knowing a thing about how difficult or easy it might be).

Yes that hummer mesh and texture is just so great. When I saw screenshots of it, I knew I needed to go ahead with this car mod (I knew how to make it work for some time - - although I hadn't expected Elminster would pull his white horse out of the stable and make the perfect alternate worldspace for it! :D Or, expected a super great Hummer to come along ).
User avatar
Tikarma Vodicka-McPherson
 
Posts: 3426
Joined: Fri Feb 02, 2007 9:15 am

Post » Wed Dec 07, 2011 12:25 am

No black clouds, there was nothing that stood out that seemed out of place.
User avatar
X(S.a.R.a.H)X
 
Posts: 3413
Joined: Tue Feb 20, 2007 2:38 pm


Return to Fallout 3