Tiling methods. (Wrapping/Mirroring/Clamping) 


Мы поможем в написании ваших работ!



ЗНАЕТЕ ЛИ ВЫ?

Tiling methods. (Wrapping/Mirroring/Clamping)



 

While it sometimes can be handy to set this in the texture itself, proper use of some simple material math can do this in the material editor, allowing for more flexibility to the artist.
(Clamping a texture-coordinate node between 0 and 0.9999 will clamp the texture its applied to)


Manipulating UVs in the material editor is equivalent to changing the method only when using the nearest texture filter. In all other cases, behaviour at borders will be slightly different because of filtering and mip-mapping.

 

Emitters

 

Bounds

Especially when using GPU particles, be sure to set up a proper “bounds” so the particles do not pop out of view when the player is not looking at the source location of the emitter, nor have the emitter active when the player is not looking at the source location due to massive bounds.

Less things rendered = always better.

 

Lod

While setting up particle LOD’s is a pain in the butt when it comes to cascade, setting them up can significantly reduce the load as you can cull secondary or tertiary effects depending on distance.

As you can also adjust spawn count (and basically any module) depending on its LOD, one could spawn less particles when an emitter is further away, yet make them slightly bigger so they are still noticed.

Setting this up is painful, but can really help improve overall performance.

If you are using lights, be sure to disable them in the LOD’s!

 

Detail Mode Bitmask (Click on emitter name module to access this)

At what detail modes do you want a certain emitter to spawn its content?

Let's say you have a secondary effect which looks great on Ultra quality settings, but would be overkill for medium spec users, in that case you might want to disable “Low”, and “Medium” so it does not get spawned when the Quality settings are “Medium” or lower.

3.4 Significance level (Click on emitter name module to access this)

How significant is a specific emitter? Is it just tiny sparks?

If you have to spawn your particle system many times, what aspects of the emitter should be disabled first to improve performance? In other words, what is the least significant to the effect?

Critical: Always needs to be emitted

High: emitted when significance level is low, medium, and high. The last to go.

Medium: emitter when significance level is medium, and high.

Low: The first not to be emitted when things on screen get hectic.

Particle cutout (click on the required module)

If you use a flipbook or sprite texture that does not fill most of the texture space, enabling this allows usage of a properly aligned rectangle or octagon to cut off any unneeded surface of the sprite, which can reduce overdraw of transparent particles quite a bit.
Generally you’ll need to assign a texture, what channel of this texture to use, and set its alpha threshold. (I found that 0.01 - 0.05 range works better than 0.1)
I personally have a collection of very small 16x16 to 64x64 black/white mask textures I can use to cut out parts of the particle I don't need.

 

Draw Calls

If you have two emitters that do the exact same thing, but are timed differently, why not combine them? Let's make a quick example:

2 emitters, Identical sprites, one bursts one emitter at birth, the other after 0.1 second.

In that case you can just add a second burst in the spawn module.

But what if this second sprite needs to be slightly bigger than the first one?
You could set up the initial size module like this:

 

 

Now any particle spawned at birth will have size 30/30/30, and any particle spawned after 0.06 will have 80/80/80 for its size.

This can be done for basically all “initial” modules, and when done with care allows for quite some flexibility and saving draw calls and amount of emitters in the long run.

While it takes some work, when applied to a finalized effect, it can save some additional performance, so keep that in mind!

Lights

Lights are expensive, I'd suggest to use a separate emitter for them.
Be sure to set up the significance level and lod’s to cull the light as optimal as possible!

You can set a particle light its color directly in the light-module, and set the “emitter render mode” to “Lights only” so it does not need to use any materials at all.

 

 

3.8 Disabled emitters.
The gist of it is this: Since any emitter can be activated/deactivated at runtime, having unused/disabled emitters in cascade do get loaded and therefore have a cost.
So once you are done with your effect, be sure to remove any emitters that wont be used in the final result. The same goes for disabled modules that are never used. Remove them.
Here is some additional documentation about this: https://fouramgames.com/blog/ue4-cascade-disabled-emitters-overhead
With special thanks to twitter user @4_AM_Games

Additionals


4.1 Material analyzer (Window > Developer Tools > Material analyzer)

This tool is great when you have many master materials, each with static switches, as it will tell you which instances of these masters could be merged to reduce identical permutations and lowering resource sizes.
Keep in mind that the analyzer takes variables in disabled branches into consideration, so go over your instances first and reset any variable in these branches to their original state.

If done well, this can save you hundreds of mb’s in various ways.

 



Поделиться:


Последнее изменение этой страницы: 2020-12-19; просмотров: 59; Нарушение авторского права страницы; Мы поможем в написании вашей работы!

infopedia.su Все материалы представленные на сайте исключительно с целью ознакомления читателями и не преследуют коммерческих целей или нарушение авторских прав. Обратная связь - 3.144.107.191 (0.01 с.)