Adding functional particle systems to armor/clothing

From Nexus Mods Wiki
Jump to: navigation, search


Updated 04/02/10 Add additional notes.

Supporting files can be downloaded here: Adding_particle_systems_to_armor by addk1k vipcxj

Firstly I have to apologize that, this article is NOT written for beginners. Before reading further, you must at least know what "particle system" is, and have experience of modifying nif files (most likely by using Nifskope).

For beginner, there are more useful classic tutorials about particle systems. (I think) The most valuable one of them is "Oblivion 401 - Particles" (I'll call it "401" for short): Link

After getting through it, you'll be able to customize your own particle systems on most nif files like those for weapons and rings. But for armor/clothing or any other skinned objects, special treatments are required.

Then let's come to :

The topic

Particle systems are widely used in Oblivion. For example, snow, rain, fire spark and various magic effects...Unfortunately, till today, no armor/clothing has functional particle systems built in, since inside such kind of nif files, only skinned objects will be rendered during the game.

Some experienced modders put particle system in a separate nif and tie it to specified bone, in order to imitate the effects of particle system. Good approach, but it will take you one extra equipment slot, and no actual piece (mesh) of your armor can be used as emitter.

In fact, particle systems can be directly built in the same nif file of your armor. and actual parts of the armor can be used as emitters. You just need to add Skin Instance information to the particle system.

Since this article is not for beginners, we assume you have your armor nif file ready and have constructed particle systems in the same file (or copied some particle systems from other nif files).

To add Skin Instance information to a particle system, open your nif file using Nifskope, find particle system block, then under the block details find "Skin Instance". Value of this block should be "none". Now copy a "NiSkinInstance" block from any other part of your armor, and paste it here as the skin instance information for this particle system. Notice that "NiSkinInstance" must have child blocks "NiSkinData" and "NiSkinPartition", targets to Scene Root block, and have one or a few bone nodes in the bone list. Namely the skin instance information must be complete. By the way, you can adjust those bone nodes to any other nodes. Those nodes have little effects on the performance of particle system.

For nif newbies who don't understand last a few sentences of above paragraph, forget them and just do following: In the block list of your nif, choose the "NiSkinInstance" block of one part of your armor, right click and "Copy Branch", find "Skin Instance" under block details of the particle system, right click and "Paste Branch". For advanced modders, you may want to explore the relationship between such a transplanted skin instance block and the in-game performance of particle system. Personally I think this block acts as a flag only, and has no effect on particles. As long as you put complete skin instance there (ctd if incomplete!!!), particle system will be functional in the game.

However, This is :

Not the end of story

Proper emitters must be assigned to the particle system. Experiments show that no Ninode in the armor nif will be brought to the game (except the Scene Root). In the game, these bone nodes are in fact replaced by corresponding nodes in skeleton.nif. If you have assigned any of bone nodes in your armor nif file as emitter, your particles will never show up in the game (unless using Scene Root node). Solution to this problem is obvious -- change the emitter to something that will be brought to the game, for example parts of your armor.

In your particle system, find any "NiPSysBoxEmitter", "NiPSysSphereEmitter", "NiPSysCylinderEmitter", and replace them by "NiPSysMeshEmitter". If you are not familiar with mesh emitter, I made one example for you. Download attached file "lianyue", which is a modified nif file of Myjimson's "Moon Love" armor. The modified nif has a skinned particle system with mesh emitters built in, and also demonstrates the use of moving emitter. By referring to "401" and exploring the structure of this nif, Setting up your own mesh emitters may become easier.

Grab "Moon Love" full mod here if you wish to view in-game effects: MOON LOVE by Myjimson

Other skills like shifting and moving, rotation around specific position, won't be covered by this article, since they are not difficult to achieve. A few animated .gif are attached to prove that these effects are achievable.

Hopefully this article can be helpful to some experienced modders. Possibly many "high-tech" armor/clothing with gorgeous particles effects will appear in the mod list soon, and we all will enjoy the benefits...

Additional notes (by request)

Shifting/rotation of skinned object

Find the "NiTriStrips" or "NiTriShape" you wish to shift/rotate. Add a "NiTransformController" to the "Controller" section in its block details. If you are not familiar with the structure of this controller, look for a "NiTriStrips" named "Sphere01" in my sample nif. It has a child "NiTransformController" block with typical settings.

Author: addk1k, vipcxj