DarkSpyda04 Posted June 11, 2014 Share Posted June 11, 2014 I learned from Saidenstorm's site but experimented a little bit and really refined my knowledge on what to and not to do when working with the NiVisController. Here's an example of my handiwork: http://i897.photobucket.com/albums/ac172/DarkSpydaIV/ScreenShot210_zpse3b2e5fb.gif What I did was start with a disappearing object that worked in-game and then I went back and did some tests to see what gave me what effect. For example, maybe I wanted to see what would happen if all "Cycle" flags were instead set to "Clamped" and recorded results in a text document. Two days later I knew more than I ever did about the NiVisController and was capable of doing some pretty cool stuff. With a bit of experimentation of your own you can do some pretty interesting things as well. Anyway, let's get to the tutorial. This tutorial requires 3Ds Max 8 with the DDS plugin and the CivilizationIV Exporter for Max 7+ Let's begin: First we will create a looping appearing/disappearing effect, then we will create an object that appears/disappears once. -In Max, create your object (keep it close to the 0,0,0 point). Create a bone (delete the extra bone and set the bone to 0,0,0 and do the same with its rotation) then link the object to the bone. -Now we'll do the appearing/disappearing animation with autokey. Select the object only, activate autokey, move to frame 50/100, right click on the object, select "properties", and set the visibility from "1.0" to 0. Now move to frame 100/100 and set the visibility back to "1.0". You can turn off autokey now. If you play the animation, you will see the object fade out and then fade back in. This doesn't mean the object will gradually fade out like this in gameplay, though. Unlike the NiAlphaController, the NiVisController has the object instantaneously disappear when you bring it into Oblivion. The amount of frames simply determines how long it is before the object appears/disappears. You can thus have a minimum of three frames for this to work but I wouldn't recommend it because a second in Oblivion lasts 30 frames and a three second animation that loops might give you a seizure XD -And that's all you have to do here. If you have the CivIV exporter toolbar set up, you can simply click the button to export, set the Save as Type to "CivilizationIV NIF Files (nif)", and then export with default settings. To set up the CivIV toolbar, go to Customize > Customize User Interface and open the "Toolbars" tab. In said "Toolbars" tab, go to the dropdown list above "New", "Delete", and "Rename", and select "Civilization IV Toolbar" from the dropdown. Click "New" and name the new toolbar something like "Civilization IV Toolbar". The toolbar will pop up but it's empty. To add tools to it, select "CivilizationIV Tools" from the "Category" dropdown list. Drag & drop "CivilizationIV Animation Manager (Will need it later)" and CivilizationIV Export into the new toolbar. Now place the toolbar somewhere nice like drag it to the left side of the screen so it becomes a side panel. If you want to get rid of a toolbar, scroll over it so the name appears, right click, and click "float" so it detaches from the side and then simply "X" it out. -Now that the NIF is exported, open it up with nifskope, add BSX flags to the "0" node with "Enable Havok" checked (right click the 0 node, Node > Attach Extra Data > BSX Flags and in 'Block Details' click on the flag and check 'Enable Havok'), Next, find the NiVisController and change the flag from "Clamp" to "Cycle". Although unecessary, if you want to clean up data blocks you can remove the 0 node (the bone will replace it), and remove "NiVertexColorProperty", the "NiZBufferProperty", and the two lights. If you do decide to clean up the data blocks however, you should also delete the BSX Flags and create a new one childed under the new scene root. Now you can save and test out the NIF in Oblivion. When you preview the animation in the CS, enable Havok, or otherwise play the game you'll see the object disappearing and reappearing. Now we celebrate. Maybe turn off the computer monitor and eat a bowl of cereal, go outside and talk to the neighbor, walk your dog, or go outside and talk to your dog. Celebrate because you just did something cool! Next we get to creating an object that disappears once and doesn't reappear, something very awesome and useful when making a mod. Are you ready? Alright, let's get started. This is where the Animation Manager comes into play. -Open a new max scene, create an object, and link it to the bone which should again be set to the origin (0,0,0). -Select the object only, enable autokey, scroll to frame 50/100 and set the visibility to "0.0". You're done with autokey. Now if you play the animation the object will fade away at frame 50 and stay faded even at frame 100. -Open the CivIV Animation Manager, expand "Actors", and add the bone. Expand "Active Sequence", name the sequence "Forward", and do not check "Loop Sequence". -Click on CivilizationIV Export, export as a CivIV NIF, and this time we will select "Single KF Export with NIF" from the "File Export Script" dropdown. -Three files were created - a "KF", a "KFM", and an "NIF". Open up the NIF, go to Spells > Animation > Attach KF and select the KF of the same file name. Now the animation has been attached. -Now once again add the BSX Flags to the scene root with "Enable Havok" checked but do NOT set the NiVisController flag to "Cycle" this time since "Cycle" means the animation will loop and "Clamp" means it will play once. Besides, the animation won't play at all if you set it to "Cycle". -Save and you're ready to test it out in Oblivion. Unlike Idle animations such as the last one we did, Forward animations only play when PlayGroup is called so you have to know a bit about scripting to get it to work in-game. Otherwise right click the imported object in the CS object window, hit "Preview", and click on "Forward" to preview the animation. If all goes smoothly, the object will disappear as we wanted it to. If you want, now's the time to experiment. And if you screwed up somewhere along the line, take a step back and follow the tutorial all over again. Most of the time you won't even have to post and ask a question. Now here's a picture of a dog wearing a sombrero Link to comment Share on other sites More sharing options...
Recommended Posts