Hexediting Transparency
Here's a way to make a model transparent with hexediting. I use Freeware Hex Editor XVI32 I learned how to do this from Pmmgarak and Taharez at the NIFLA message board.
|
|
For this tutorial, I picked one of the Extended Primitives that are available in MilkShape3D under Tools, and I chose a texture from the CD. I slide the transparency slider underneath the "Emissive" button down a bit, and check the SphereMap box. Then I exported it to .nif format.
|
|
I need to copy the NiAlphaProperty block from a model that I know has transparency. The AncestorGhost on the CD is a good candidate. I open it in my hexeditor and use the Search->Find function to find "NiAlphaProperty".
|
|
Next I open my model in the hexeditor, and I search for "NiTriShapeData". Just in front of this block I insert the NiAlphaProperty block. Remember the real beginning of the block is 4 bytes before the "N", so select the first byte of this beginning then go to File->Insert and pick out the file with the "NiAlphaProperty" block.
|
|
Now I move up until I find "NiTriShape". I have to increment a counter and add some bytes in this block. The byte I have to increment is located 74 bytes from the end of the name of the "NiTriShape" (Editable Mesh in this case). I have my hexeditor set for 20 columns, so I can easily count down to 80 with the down arrow, then count back to 74 with the left arrow. I should land on a byte with a value, 02 in hex in this case. I click on the byte in the hex window and type 03.
|
|
This 03 is the first byte in a 4 byte group, so I count to the 3rd byte left of it. There are 1 or more 4-byte groups that represent property groups. In this case there are two property IDs: 05 00 00 00 and 07 00 00 00. The one I insert just has to be higher than the last. With the byte just after the last property id selected (the 00 after 07 00 00 00 in this case) I go to Edit->insert string and click the Hex String button and type "08 00 00 00 " in the field beneath it, and click OK.
|
|
After another four bytes that should be all zeroes, there's a number. In this case it is 08. I increment that by one by typing "09" here.
|
|
Then there is one more byte to increment by one. It is near the top of the file, the 45th byte in fact. In this case it is nine, I change it to "0A" (that's hex for ten)
|
|
That's it, if everything been done correctly the model will be transparent.
|
|
|