Page 1 of 2

Knowledgebase - Skyrim particles & ENB

Posted: 22 Jan 2019, 15:18
by 4109
I would like to put together a list of known works/doesn't work Skyrim particle light related items. Feel free to post more and I'll add them, or correct any errors I've made.
Last update: 2019/02/15
Change log:
2019/02/15 - added note on alpha blending flags and on effect shader flags which I tested for interference with particle lights
2019/02/02 - corrected note about greyscale textures
2019/01/27 - added note about greyscale textures
2019/01/26 - THIS IS WRONG: "particles from MeshEmitters are not recognized by ENB (emit no light)"

WORKS
- particles from NiParticleSystem are recognized by ENB but particles from BSStripParticleSystem are not

- to have a particle emit Particle light you need the following settings:
-- BSEffectShaderProperty
--- "Soft Effect" flag enabled
--- no greyscale texture and Greyscale_To_PaletteColor / Alpha flags disabled
--- several other flags will also interfere so for my particles I only enable Soft Effect, ZBuffer Test and Vertex Colors
-- NiAlphaProperty
--- flags set to *drumroll* 4109 8-)
--- Threshold 128 or less
-- NiPSysData
--- "Has Texture Indices" set to no and subtexture offset zeroed
--- "Aspect Ratio" is best set to 1 and all other aspect settings zeroed or the light may look weird from different angles.

- to have a particle emit Fire light you need the following settings:
-- BSEffectShaderProperty
--- "Soft Effect" flag enabled
--- greyscale texture and greyscale texture flags are OK but not required
--- several other flags will also interfere so for my particles I only enable Soft Effect, ZBuffer Test and Vertex Colors
-- NiAlphaProperty
--- flags set to 4109
--- Threshold 128 or less
-- NiPSysData
--- "Has Texture Indices" set to yes - this is how ENB recognizes the particle as Fire particle. It doesn't matter if the rest of the subtexture data is there or not.
--- "Aspect Ratio" is best set to 1 and all other aspect settings zeroed or the light may look weird from different angles.

- these flags are safe (when enabled the particle still emits light): External_Emittance, Own_Emit, Use_Falloff, Vertex_Alpha | Double_Sided; flags related to "real" meshes (e.g. Specular, Skinned etc) I haven't tested since we assume they are never enabled for particles.
- light color is affected by Emissive color in EffectShaderProperty and by the colors in SimpleColorModifier
- light intensity is affected by the alphas of the colors in the abovementioned blocks and also by Emissive Multiplier in EffectShaderProperty, but most of all - BY INITIAL SIZE in the emitter object. This causes some particle effects which by default use large setting for initial size to emit much more light than they should - the best example is Frost Wall.
- color information in Source Texture in EffectShaderProperty is discarded
- overlapping particles result in more light intensity (I assume it's added up since the blending mode is additive).

DOESN'T WORK
- particles with these flags enabled do not emit light: Decal, Dynamic_Decal | Effect_Lighting
- many meshes which use bilboards with animated textures (rather than particle systems) do not emit light when it looks like they should. I haven't really looked into this yet so I may be wrong. I've been entirely focused on partile systems so far.

ITEMS not directly related to ENB lights
- addonnodes do not work when bone attachment nodes are present in the mesh
- addonnodes do not work in an actor nif
- particle systems can't be inserted directly in actor nif (?) instead they can be added as separate nif - see how the Spriggan is built, an "effects" nif with the particle systems, and a constantly cast ability calling this effect, like an aura.
- saving an actor nif (even with no changes) in NifSkope causes CTD. Maybe caused by auto-sanitization.

Re: Knowledgebase - Skyrim particles & ENB

Posted: 03 Feb 2019, 02:16
by 4109
I was having serious performance issues with the Flames spell. At first I thought I had added too many of my lights but eventually I figured out that it emitted enough light on its own with no help, and also found out that removing the lights I added did almost nothing to fix performance. So I found its light emittance is driven by Complex Fire Lights.
Well I found out that by switching Complex Fire Lights off and adding my own particle systems with invisible particles, which use Complex Particle Lights, I get basically the same visual result at FAR lower performance cost.

Stress test case scenario (basically the spell effects take the whole screen in a tight interior space; 1080Ti 3440x1440) for Flames: 19fps with Fire lights (and particle lights off) vs 35fps without Fire lights and with my lights. There is "some" visual difference right now since I haven't really fine tuned it but I'm sure I can get almost 100% the same result with the fake lights.

Fireball by default generates very little light so I added a particle system to it tuned to basically explode the screen with light. So in the stress test I get 29fps with Fire lights enabled even though they barely do anything, and I get 35fps with Fire lights disabled, and the visual difference there is zero.

For my mod I will add my lights to all fire fx and recommend that Fire lights option is disabled. It is too inconsistent in any case without help by fake light.

Re: Knowledgebase - Skyrim particles & ENB

Posted: 04 Feb 2019, 00:51
by cruelflames
I've managed to get enb particle lights to change colour via animation, by attaching a colorcontroller to the mesh. Looks quite nice, but it requires vertex colors to be on (doesn't matter which colour it is on)

Re: Knowledgebase - Skyrim particles & ENB

Posted: 04 Feb 2019, 01:16
by 4109
All my lights have animated colors. Coupled with scale and fade settings I adjust them so that one "ball of light" has a bright center and fades out to a darker color when 5-6 particles at different stages of life are overlayed.

This is a good example

Image

If you have a single color and rely on the linear fade out you get a much flatter effect.

Or if you mean color controllers in the controller manager, I haven't found a use for them so far. The simple color modifier does everything I need for now, though most of the lights I make are the constant continuous effect type.

If you dig into meshes\magic there are many examples of how to use the various mesh animation controllers.

Re: Knowledgebase - Skyrim particles & ENB

Posted: 04 Feb 2019, 01:29
by cruelflames
Yup I meant the colour controllers in the nicontrollermanager. I'm powerofthree on nexus and I've been adding particle lights to my strange runes mod via the mesh method, and a couple of runes change colour so I synced both colour controllers together.

I fade out the lights by scaling down the mesh, but even then it ends abruptly which I can probably fix by setting the emissive to a darker colour at the end.

Re: Knowledgebase - Skyrim particles & ENB

Posted: 04 Feb 2019, 01:49
by 4109
Oh I remember we talked about it. I suppose you used my hand effects as base? Lately I've been adding animation controllers to vary the intensity of the light to match the idle-charge-cast states so they change basically with every wip and release, so we might have compatibility issues if you don't have a separate light for your runes. Or users will have to choose between my hand fx and yours if they want both mods together.

To fade out gracefully it should be enough to set fade in / fade out in simple color modifier, unless the particles have very short life, then you'll have to use the controller manager. To control light intensity the emissive controller and the color controller are basically interchangeable so you can use either to fade out.

Re: Knowledgebase - Skyrim particles & ENB

Posted: 04 Feb 2019, 02:03
by cruelflames
I'll be providing enb light supported runes and the normal kind, so users can pick and choose, but yeah there might be too much light if one were to use the hand fx and runes together. I don't suppose you have an option for that in your fmod?

Also, what are your enb settings? I've been adjusting the intensity of my lights with enb particle intensity all set to 1.0, with distance to 0.3.

Re: Knowledgebase - Skyrim particles & ENB

Posted: 04 Feb 2019, 02:15
by 4109
My intensities are 0.25-0.45, I believe this is what my ENB preset came with, I never touched it. Guzio(Rudy) said he uses similar settings.

I do actually have an option for hand fx in the installer.

Re: Knowledgebase - Skyrim particles & ENB

Posted: 05 Feb 2019, 01:48
by 4109
Hey since it doesn't look like I'll have time to do FEC lights any time soon, I can just tell you the secret how to add them to your shaders:

Image

The nif is literally the torch nif with the visible meshes deleted. Works perfectly fine. I never took the time to optimize it, but it needs to be optimized since this works like the ice shout which creates several chunks of ice on the target = several ENB light sources = low fps.

For unknown reason this method does not work if the target body is moving, so it doesn't work if you want to add light to a living npc on fire. Which is the holy grail for me. I suppose the only way is to create a targetfx nif and add it to all fire spells.

Re: Knowledgebase - Skyrim particles & ENB

Posted: 05 Feb 2019, 02:12
by cruelflames
Oh cool, thanks.

Odd that it doesn't work in movement, I see no reason why it shouldn't. And yeah attaching it via hit effect seems like the way to go, but instead of directly modifiying base spells we can check for whenever the target is hit by a fire spell (Event OnMagicEffectApply) and add a custom effect. Should work out of the box for mod added fire spells too. In that note, a refraction effect could be added as well.