Jump to content

Add eye data manually in NiSkinPartition for custom eye meshes of SSE


dldrzz000

Recommended Posts

Introduction: We may meet transparency issue when porting LE eye meshes directly to SSE or custom eye mesh with Eye Envmap and Eye_Environment_Mapping checked to SSE nif since lack of eye data blocks in NiSkinPartition. This method is very inefficient but at least better than nothing. Hopefully Nifskope and other converters will update corresponding functions.

And sorry for my poor English.

 

1. Requirements: 1) Nifskope

2) File editor supporting Hex format. (I personally use HxD)

3) Text editor with multi-line editing function. (I personally use Notepad++)

4) Eye meshes to deal with

 

2. Open your eye nif in nifskope, navigate to NiSkinPartition, right click and select "File Offset" on both "Vertex Data" and "Partition", and we can get data address of vertex data. Please note down these two addresses. Then we will get needed data area in Hex editor. Change in NiSkinPartition "Data Size" to (28*vertex number) and "Vertex Size" to 28 (in my case, 8688=24*362 to 28*362=10136 and 24 to 28) and save your eye mesh. DO NOT PRESS REFRESHING VERTEX DATA BUTTON BEFORE SAVING.

0xNC17R.png

 

In my case, I got addresses of 0x49CB and 0x6BBB, and my vertex data area is 0x49CB to 0x6BBA. We may check the size of our needed area with 24*vertex number: my eye mesh vertice number is 362, and vertex data size is 6BBB-49CB = 21F0 = 8688 in decimal = 24*362 in decimal.

 

3. Three "Vertex Desc" addresses are needed in BSDynamicTriShape, NiskinPartion and "Partition" of NiskinPartion. Please Notedown these three addresses seperately with those in Step.2.

5vOl3MJ.png

In my case, I got addresses of 0x258, 0x49C3 and 0x9AD9.

 

4. Open eye mesh in Hex Editor, navigate to addresses of Step.3. We will find a 8-block data area of flags. Change the three areas to "47 00 21 30 60 A0 55 00" if they are not.

c0uKlkW.png

In my case, I've changed areas beginning 0x49C3 and 0x9AD9 to "47 00 21 30 60 A0 55 00".

 

5. Navigate to address of Step.2 and copy targeted area to your text editor(in my case 0x49CB to 0x6BBA). Auto wrap your text per 24 blocks. Then add 4 block data of "00 00 00 00" to the end of left-eyeball vertex data, and "00 00 80 3F" to the end of right-eyeball vertex data, forming data structure of 28 blocks per line. Auto unwrap your modified text and replace selected data area in HxD. Save your modified nif.

xoIGvB6.png

 

Regular expression in Notepad++ is useful when auto wrapping and unwrapping lines.

If you missed renumbering vertex order before exporting eye mesh like me, you have to manually check and match vertice to distinguish their sides by selecting and highlighting them in nifskope. Vertex order is the same and it just takes time.

If your eyeball meshes is in seperated shapes (e.x. left eyeball and right eye ball), you have to do Step 1 to 5 for every shape.

 

 

Feel free to post any better method, below or in new post.

  • Like 1
Link to comment
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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...