[Alpha] NifSE v1.0 α:4

Post » Thu Jul 15, 2010 5:41 am

That's... bizarre. That matrix matches exactly what mine had. And it's being set correctly. You sure the mesh was reloaded?


Yup - it's a new weapon, so when it gets added and equipped that should force a reload. Even a manual unequip/equip changes nothing :(
User avatar
bonita mathews
 
Posts: 3405
Joined: Sun Aug 06, 2006 5:04 am

Post » Thu Jul 15, 2010 7:08 am

Does the console say it's creating (and then deleting, that should happen pretty much instantly) the new weapon?
User avatar
Shelby McDonald
 
Posts: 3497
Joined: Sat Jan 13, 2007 2:29 pm

Post » Wed Jul 14, 2010 8:35 pm

Does the console say it's creating (and then deleting, that should happen pretty much instantly) the new weapon?


I'm a little confused. Are you referring to the output of your esp?

contents of console log from there (up to the crash) here:

Spoiler

DW\NifScript\BearPelt.NIF
NifSE::NifOpen - "DW\NifScript\BearPelt.NIF" opened for editing.
NifSE::NifFile c'tor - NifFile created for editing.
NifSE::NifFile.setRoot - Setting root to root of "DW\NifScript\BearPelt.NIF"!
NifSE::CheckFileLocation - File "DW\NifScript\BearPelt.NIF" not found!
NifSE::NifFile.setRoot - Nif cannot be read. Exception "Nif "DW\NifScript\BearPelt.NIF" not found." thrown.
NifSE::NifOpen - "DW\NifScript\BearPelt.NIF" registered as #4-0.

0
NifSE::NifGetOriginalPath - Getting the original path to nif #4-0
NifSE::getRegNif - Finding nif registered as #4-0.
NifSE::getRegNif - Mod #4 not found.
NifSE::NifGetOriginalPath - Nif not found.

NifSE::NifGetPath - Getting the path to nif #4-0
NifSE::getRegNif - Finding nif registered as #4-0.
NifSE::getRegNif - Mod #4 not found.
NifSE::NifGetPath - Nif not found.

Weapons\Steel\dagger.nif
NifSE::NifOpen - "Weapons\Steel\dagger.nif" opened for editing.
NifSE::NifFile c'tor - NifFile created for editing.
NifSE::NifFile.setRoot - Setting root to root of "Weapons\Steel\dagger.nif"!
NifSE::CheckFileLocation - File "Weapons\Steel\dagger.nif" found in BSA!
NifSE::GetNifStream - Successfully read nif data in BSA "C:\Games\Oblivion\Data\Oblivion - Meshes.bsa". Buffer length is 74753.
NifSE::NifFile.setRoot - Nif read from stream of file "Weapons\Steel\dagger.nif".
NifSE::NifFile.setRoot - Nif is good; "INVALID VERSION" (4294967294). Loaded 2 ExtraData nodes, collision, 2 Children nodes, and 0 Effects nodes.
NifSE::NifFile.reg - Registering "Weapons\Steel\dagger.nif" on RegList.
NifSE::NifFile.reg - Registered as #4-0.
NifSE::NifOpen - "Weapons\Steel\dagger.nif" registered as #4-0.

0
NifSE::NifGetOriginalPath - Getting the original path to nif #4-0
NifSE::getRegNif - Finding nif registered as #4-0.
NifSE::getRegNif - Nif #4-0 found.
NifSE::getRegNif - Nif root is good.
NifSE::NifGetOriginalPath - Returning "Weapons\Steel\dagger.nif".

Weapons\Steel\dagger.nif
NifSE::NifGetPath - Getting the path to nif #4-0
NifSE::getRegNif - Finding nif registered as #4-0.
NifSE::getRegNif - Nif #4-0 found.
NifSE::getRegNif - Nif root is good.
NifSE::NifGetPath - Returning "ni\DWnifSEexRotations_0.nif".

ni\DWnifSEexRotations_0.nif
NifSE::NifClose - Closing nif #4-0
NifSE::getRegNif - Finding nif registered as #4-0.
NifSE::getRegNif - Nif #4-0 found.
NifSE::getRegNif - Nif root is good.
NifSE::NifFile d'tor - Nif 4-0 deleted.

NifSE::NifGetOriginalPath - Getting the original path to nif #4-0
NifSE::getRegNif - Finding nif registered as #4-0.
NifSE::getRegNif - Mod #4 not found.
NifSE::NifGetOriginalPath - Nif not found.

NifSE::NifGetOriginalPath - Getting the original path to nif #4-0
NifSE::getRegNif - Finding nif registered as #4-0.
NifSE::getRegNif - Mod #4 not found.
NifSE::NifGetOriginalPath - Nif not found.

NifSE::NifGetPath - Getting the path to nif #4-0
NifSE::getRegNif - Finding nif registered as #4-0.
NifSE::getRegNif - Mod #4 not found.
NifSE::NifGetPath - Nif not found.

NifSE::NifGetNumChildren - Getting number of Children nodes in nif #4-0
NifSE::getRegNif - Finding nif registered as #4-0.
NifSE::getRegNif - Mod #4 not found.


If you're talking about my script, then it doesn't delete the new weapon.

Sorry if i'm not following you well. I'm fairly knackered today.
User avatar
Nick Tyler
 
Posts: 3437
Joined: Thu Aug 30, 2007 8:57 am

Post » Thu Jul 15, 2010 6:57 am

Oooh, I see what's going on, at least in that last one - you don't have DW\NifScript\BearPelt.nif, so the first nif isn't getting created, which means it's deleting the second one incorrectly. Try deleting the bits in the script that relate to nifIDfolder, and you should be fine. I should have commented those out.
User avatar
cassy
 
Posts: 3368
Joined: Mon Mar 05, 2007 12:57 am

Post » Wed Jul 14, 2010 7:59 pm

I'll do that and get back to you shortly.
User avatar
Becky Palmer
 
Posts: 3387
Joined: Wed Oct 04, 2006 4:43 am

Post » Wed Jul 14, 2010 8:22 pm

Yes, it can, though there's some more I could do with that. What do you want to use it for?

I created a plugin that adds several types of horse armors to the game. Each armor uses a copy of the mesh from the DLCHorseArmor.bsa. The mesh is modified for a different texture.
Since I can't distribute those modified meshes, I was wondering if NifSE could help me set different armors based on one mesh.
One item could have the mesh display one type of texture, say ebony horse armor, etc. It would be great if it allowed the changes for each item to be saved.

As it is right now, I only have the meshes with the textures changed. I could use OBMM to extract the meshes and use a binary hack to change the texture path in the nif but it isn't giving me good results.
All else failing, I could use an application to apply a binary diff patch to correct texture paths on the meshes. I guess there would not be anything illegal.
User avatar
jessica robson
 
Posts: 3436
Joined: Mon Oct 09, 2006 11:54 am

Post » Wed Jul 14, 2010 11:22 pm

That... yes, I think you could do that pretty trivially.

On the other hand, you can distribute those models, I'm fairly sure, as long as the plugin they're associated with is dependent on the horse armor DLC (see Wrye Bash for how to set up such a dependency).
User avatar
Marilú
 
Posts: 3449
Joined: Sat Oct 07, 2006 7:17 am

Post » Thu Jul 15, 2010 4:24 am

Right that's got your test esp working so I can see the effects working. Now I just need to figure out why my own isn't doing the same... I'm going out to walk the dog for a couple of hours now, so I'll let you know how I get on later.

HeX
User avatar
Liv Brown
 
Posts: 3358
Joined: Wed Jan 31, 2007 11:44 pm

Post » Thu Jul 15, 2010 2:42 am

Sounds good. Oh, what I meant by the "create/delete" thing, when you first load a NifSE'd mesh, your console will get reports from a "CreateNifFile" and "DeleteNifFile" in rapid succession - that is NifSE writing the Nif to disk so Oblivion can read it, and then deleting it again once Oblivion's read it. If you don't see those, then Oblivion doesn't have NifSE's version of the mesh, because it never asked for it; "CreateNifFile" is called any time Oblivion starts looking for any mesh in the "Meshes\ni\" folder.

Also, I've fixed the issue where NifOpen would return 0 on a failed nif - it should return -1, and now it does. This prevents the issue that you had earlier, where the nifIDfolder variable was set to 0 by the failed NifOpen, matching the correct index of nifIDarchive that opened after it.
User avatar
Leilene Nessel
 
Posts: 3428
Joined: Sun Apr 15, 2007 2:11 am

Post » Thu Jul 15, 2010 10:09 am

I'll get to the code then.

I'm just not so sure it's legal to distribute the meshes. I mean, there is a modders resource with the actual mesh on TESNexus. It would certainly save me a lot of hassle if I could do it that way..
User avatar
Rusty Billiot
 
Posts: 3431
Joined: Sat Sep 22, 2007 10:22 pm

Post » Thu Jul 15, 2010 1:32 am

Well... it's kind of awkward. Bethesda certainly is well within their rights to tell you that you cannot distribute the mesh at all, and doing so without their permission would be illegal. However, the precedent has been that mods which set up a dependency on the product that the mesh comes from and are used to modify that product are allowed. Using the mesh for Oblivion but without a dependency on the DLC would be disallowed, and using the mesh for Fallout 3 even if you somehow made it dependent on the user owning the DLC for Oblivion would also be disallowed. This is only legal because Bethesda allows it, though; legally they could send you a cease and desist letter and sue you if you failed to comply, but they don't in this case.

They have in some cases (sent the letter; I know of no situation where anyone refused to honor the letter and got sued, though), though the mention of any of them would probably get this thread locked so I won't go there. The foremost example involved the use of files from Morrowind for Oblivion.
User avatar
Elizabeth Falvey
 
Posts: 3347
Joined: Fri Oct 26, 2007 1:37 am

Post » Thu Jul 15, 2010 9:33 am

Right - got rotation working for all weapons/off handers.

I'm still not quite sure what was wrong before, but as it's now working, that'll do for me.

Thanks for all your help DW. :foodndrink:
User avatar
sally coker
 
Posts: 3349
Joined: Wed Jul 26, 2006 7:51 pm

Post » Thu Jul 15, 2010 8:39 am

No problem. Seemed pretty weird that it wasn't working, but I'm glad it's working now.

Hmm... what else needs working on?
User avatar
Allison Sizemore
 
Posts: 3492
Joined: Wed Jul 19, 2006 6:09 am

Post » Wed Jul 14, 2010 10:16 pm

Hmm... what else needs working on?


Things seem fairly solid right now - with the exception of the reload issue, which I know isn't something you can do anything about yourself...

I'm working on the shield on back feature at the moment. I'm modifying the mesh to have a quiver prn, but it needs rotated - though thanks to you that should be a quick enough fix.

I'll get back to you about how well that works.
User avatar
Emily Jones
 
Posts: 3425
Joined: Mon Jul 17, 2006 3:33 pm

Post » Thu Jul 15, 2010 2:57 am

Excellent work you're doing here DragoonWraith and all others assisting. I just wanted to say I've been watching this for awhile and as a team member at MERP, we've had a lot of interest in your work. In MiddleEarth there are small races that needed some modifications done to change their proper sitting z-coordinates on normal sized furniture (chairs, sofas, beds) and after correcting this issue we realized that they were drowning while swimming. :D So, the ability to modify .nif rotation, scaling and dimension coordinates is seen as a great solution for many ideas we have, including modifying normal sized races to fit within smaller homes. While working these ideas out with the scripters on the team, we thought you might like to provide some insight on some things. If you'd like to visit our Dev Forums and examine some of our solutions on the issues we have, we're offering you a VIP access to our http://www.createforum.com/middleearthrole/index.php?mforum=middleearthrole, just ask for an Admin. Additionally, I've downloaded your latest links (hope you don't mind) and would like to start testing NifSE for MERP on the issues we are fixing.

Aoikani
User avatar
Oscar Vazquez
 
Posts: 3418
Joined: Sun Sep 30, 2007 12:08 pm

Post » Thu Jul 15, 2010 5:31 am

Good news: Scruggsy has sent me a version of OBSE that has the preload callback, which means the loading issues should be fixed. The bad news is that it is dependent on this version of OBSE, which means it may not be publicly available until v0019. Don't know what Scruggsy's plans are on that one.

Still haven't tried it yet; that should happen tomorrow.

Excellent work you're doing here DragoonWraith and all others assisting. I just wanted to say I've been watching this for awhile and as a team member at MERP, we've had a lot of interest in your work.

Cool, thanks! Glad it's interesting to people!

In MiddleEarth there are small races that needed some modifications done to change their proper sitting z-coordinates on normal sized furniture (chairs, sofas, beds) and after correcting this issue we realized that they were drowning while swimming. :D So, the ability to modify .nif rotation, scaling and dimension coordinates is seen as a great solution for many ideas we have, including modifying normal sized races to fit within smaller homes.

That sounds... like a ton of work to get right. You sure you want to use NifSE for this?

While working these ideas out with the scripters on the team, we thought you might like to provide some insight on some things. If you'd like to visit our Dev Forums and examine some of our solutions on the issues we have, we're offering you a VIP access to our http://www.createforum.com/middleearthrole/index.php?mforum=middleearthrole, just ask for an Admin.

I may check out the forums, but I'm afraid I can't offer to really go through anything. If I see anything, I'll obviously try to point it out, but I really don't see myself getting involved in the project at all; even just checking the forums regularly is probably more than I can be counted on to do.

That said, you are more than welcome to ask questions/make requests here. Much easier for me to help if you come to me, honestly. PMs/e-mail works fine too (e-mail's preferred as it doesn't have a limit to how many messages I can store; I've got like 94% of my PM inbox full).

Additionally, I've downloaded your latest links (hope you don't mind) and would like to start testing NifSE for MERP on the issues we are fixing.

Totally all right, that's what it's there for. The alpha is intended for any developer who can make use of it, but obviously you shouldn't be releasing anything (as far as I understand things, MERP doesn't really release anyway for legal reasons, yeah?).

Aoikani

~ DW!
User avatar
marina
 
Posts: 3401
Joined: Tue Mar 13, 2007 10:02 pm

Post » Wed Jul 14, 2010 9:07 pm

I'm not sure if this was asked/elaborated on already, but is it possible to edit models that are currently loaded into the games rendering engine? Example: imagine a standard iron longsword that has a mesh copy of itself pushed outward with a normally 100% transparent texture at 100% health. Depending on the health of the sword a script attached would change the texture to more and more damaged looking textures/over 100% health textures or simply changing the textures transparency. I want to make absolute sure if this can change models loaded into the rendering engine or if it simply edits files in the meshes folder. If it can't I think that would be a great thing to add since I'm counting on this for something.
User avatar
Aaron Clark
 
Posts: 3439
Joined: Fri Oct 26, 2007 2:23 pm

Post » Thu Jul 15, 2010 10:32 am

No, I don't have access to files in-memory. It's... effectively the same as editing the meshes on the folder. They're not actually in the folder, excepting when Oblivion goes looking for them - at that point, I write them to the folder, so Oblivion can read them. If Oblivion doesn't look for them, then all the changes in the world won't do anything.

That said... OBSE v0018 has an update3d function, which can force the changes to be apparent by making Oblivion reload the mesh. I think it currently does not work on the player or on held weapons or something like that, which prevents what you want to do, but I believe those are also bugs and should hopefully be fixed?

The problem with the meshes in-memory is that Oblivion doesn't store them in a format identical to the Nif, which means Niflib doesn't work. I'd have to code everything from scratch, and my understanding of Nif files, much less the in-memory representation of meshes, is not nearly good enough to do that.
User avatar
Emily Jones
 
Posts: 3425
Joined: Mon Jul 17, 2006 3:33 pm

Post » Thu Jul 15, 2010 3:40 am

Hey, I was wondering if this ever made it in. I haven't touched the oblivion CS in a long, long time, but I know that I wanted to do something that I couldn't do because havoc was enabled on an item (you'll have to forgive me my terminology is wrong, it's been a while). What I had was a "display case" that was a container, I had a static floating above it with a script on it to be a copy of whatever was in the container. I had a script on the static to make the static rotate. But the problem was after I put something in the container and I copied the ground mesh from the item in the container to the static floating above the container it would stop rotating and the player would be able to interact with it (not pick it up, but run into it and fling it about the room). Because the havoc flag on the ground mesh was enabled (I think that was it, like I said it's been a while) and I didn't have any way via OBSE to disable it. I mentioned this to you a long while ago, so I was just wondering if you'd ever put any more thought to it.

Also, this is me "not mentioning" that I came back to the TES forums to look for updates about ARES ~_^.
User avatar
Valerie Marie
 
Posts: 3451
Joined: Wed Aug 15, 2007 10:29 am

Post » Thu Jul 15, 2010 9:18 am

Heh, currently that's not a feature but I could probably add it easily enough; if it can be done before OBSE v0019 comes out, it will be. I also am currently updating the deprecated functions to use the new system (so even they won't cause clutter, hopefully), and I want to implement a way to access sub-sub-nodes.
User avatar
Brian LeHury
 
Posts: 3416
Joined: Tue May 22, 2007 6:54 am

Post » Thu Jul 15, 2010 1:50 am

What I'd like to do is the following:

Given an armour model that is exposing some skin of a character (NPC or player) and whose vertices using the skin material map onto the whole skin texture, I would like to do the following:
  • locate all parts of the model that use the skin material
  • for each vertex in each of these parts, remap the UV co-ords onto a specific quadrant of the texture... or alternately replace texture with another one... although this probably won't work for skin textures seeing as how this is overwritten by the race textures.
  • have the character equip this armour


This would allow for the following types of effects:
  • change skin textures based on state (healthy, wounded, diseased, etc.)
  • have different default skin textures (smooth, hairy, tattooed, etc.), i.e. same race, same gender, different textures...


Planning on using this for my Seducer mod, but want to know if it's feasible or not 1st. Can see from the API that you can obtain a specific node in the nif file etc, but not sure about obtaining the UV co-ords... Advice?
User avatar
Austin Suggs
 
Posts: 3358
Joined: Sun Oct 07, 2007 5:35 pm

Post » Thu Jul 15, 2010 2:07 pm

Hey DragoonWraith,

I am a teammember of MERP, and I am trying to read animation coordinates for specific nodes ingame through NifSE. I am mainly a scripter and don't know much about modeling, but I noticed you can copy blocks from KF (animation) files to NIF files. If I do that, is it possible to read the X-Y-Z coordinates ingame with NifSE of the line I have selected in http://img828.imageshack.us/img828/1457/nifskopekf.jpg?

Sorry if that's a stupid question, I'm kinda new to this.
User avatar
Carlitos Avila
 
Posts: 3438
Joined: Fri Sep 21, 2007 3:05 pm

Post » Thu Jul 15, 2010 3:59 am

I asked this ages back (page two in the thread), for adding a nialphaproperty to a nitristrip/nitrishape. But you never commented, so i dont know whether you read it or not.

I really want to be able to 'hide' parts of a mesh with it by giving it a nialphaproperty and setting it's alpha to 0. A way to add a nistencilproperty would aslo be good (to double side the mesh bits that may be uncovered, but it s not essential for making the mod work).



I hope its eventually possible, as this is pretty much all that is stopping my custom mesh races.
User avatar
Sophie Louise Edge
 
Posts: 3461
Joined: Sat Oct 21, 2006 7:09 pm

Post » Thu Jul 15, 2010 4:15 am

What I'd like to do is the following:

Given an armour model that is exposing some skin of a character (NPC or player) and whose vertices using the skin material map onto the whole skin texture, I would like to do the following:
  • locate all parts of the model that use the skin material
  • for each vertex in each of these parts, remap the UV co-ords onto a specific quadrant of the texture... or alternately replace texture with another one... although this probably won't work for skin textures seeing as how this is overwritten by the race textures.
  • have the character equip this armour


This would allow for the following types of effects:
  • change skin textures based on state (healthy, wounded, diseased, etc.)
  • have different default skin textures (smooth, hairy, tattooed, etc.), i.e. same race, same gender, different textures...


Planning on using this for my Seducer mod, but want to know if it's feasible or not 1st. Can see from the API that you can obtain a specific node in the nif file etc, but not sure about obtaining the UV co-ords... Advice?

This is... brutal. Re-UV-mapping? That seems astonishingly difficult to do programmatically, for you I mean. That said... I can get an array of the vertex coordinates and an array of uv coordinates; I don't really know how they work, but would those arrays be meaningful to you? See http://niftools.sourceforge.net/doc/niflib/classNiflib_1_1NiGeometryData.html#ac085b93a72e89eb9740e424ce5f29826 and http://niftools.sourceforge.net/doc/niflib/classNiflib_1_1NiGeometryData.html#aa99ed78273bfbe3994e1562ae66fa857 for information on what I mean. I don't really know anything about the format of these (it does say it follows the OpenGL standard in NifSkope?), but if getting and setting those arrays would be useful to you, I can probably throw those at you.

Hey DragoonWraith,

I am a teammember of MERP, and I am trying to read animation coordinates for specific nodes ingame through NifSE. I am mainly a scripter and don't know much about modeling, but I noticed you can copy blocks from KF (animation) files to NIF files. If I do that, is it possible to read the X-Y-Z coordinates ingame with NifSE of the line I have selected in http://img828.imageshack.us/img828/1457/nifskopekf.jpg?

Sorry if that's a stupid question, I'm kinda new to this.

OK, the answer, strictly speaking, is yes, NifSE could someday do this. Unlike Breeze's request, though, which I can just throw at him and let him figure out how to use it, to be able to get you that information I'd have to write up an entire framework for handling animations and getting to that information. The power's there; Niflib has access to that data, I just don't have any easy way of handling it so I can get it to you. At some point, I'd love to see the opportunity to make that happen, but it is definitely not happening in v1.0.

I asked this ages back (page two in the thread), for adding a nialphaproperty to a nitristrip/nitrishape. But you never commented, so i dont know whether you read it or not.

I really want to be able to 'hide' parts of a mesh with it by giving it a nialphaproperty and setting it's alpha to 0. A way to add a nistencilproperty would aslo be good (to double side the mesh bits that may be uncovered, but it s not essential for making the mod work).

I hope its eventually possible, as this is pretty much all that is stopping my custom mesh races.

I do remember - and as I recall, I mentioned that some messing with the NiAlphaProperty in my own testing didn't seem to work correctly - meshes kept going opaque, even though they'd start transparent. I didn't try any with alpha 0, though, and all of mine were equipped weapons, which might have screwed things up. The long and short of it is, I don't know - have you tested the meshes without NifSE, just changing them manually in NifSkope? If you've done that testing, yeah, I can add in the ability to Get/Set the alpha property.
User avatar
Kortknee Bell
 
Posts: 3345
Joined: Tue Jan 30, 2007 5:05 pm

Post » Thu Jul 15, 2010 6:05 am

I do remember - and as I recall, I mentioned that some messing with the NiAlphaProperty in my own testing didn't seem to work correctly - meshes kept going opaque, even though they'd start transparent. I didn't try any with alpha 0, though, and all of mine were equipped weapons, which might have screwed things up. The long and short of it is, I don't know - have you tested the meshes without NifSE, just changing them manually in NifSkope? If you've done that testing, yeah, I can add in the ability to Get/Set the alpha property.


I just realised you have a NifDeleteNthChild command, could that be used to remove nitristrips from a nif? if so that will work just fine.

but yes, I have tested the alpha stuff just with nifskope, adding it, seeting material alhpa to 0. What may have happened to you is having a texture that has dark area and the game decided to read it in as transparent....its another feature of using NiAlphaProperty. NiStencilProperty is the same, you can just go 'attach property' -> 'NiStencilProperty' to a part of the mesh and it automatcially becomes double sided, no other fiddling required.

here a pic of what happened when i added an alpha property to the skin and set the alpha to 0, i also added NiStencilProperty to the armor to make it cover over where you couldnt see before.
http://www.invision.tesalliance.org/forums/uploads/1281781368/gallery_108_44_163420.jpg

If that delete command works how i think it does, then I dont need the alhpa stuff, but the NiStencilProperty would still be good. :)

EDIT: Seems that NifDeleteNthChild will not work for biped meshes.....it completely ruins the rigging, though it does still remove the skin nodes that it finds. Is there any way to look at a mesh that nifse makes in nifskope? i want to see what it is doing when i delete a node, im suspecting it is screwing up some of the links between nodes on the irgging.
User avatar
xemmybx
 
Posts: 3372
Joined: Thu Jun 22, 2006 2:01 pm

PreviousNext

Return to IV - Oblivion