📜 ⬆️ ⬇️

Visual effects for Skyforge. Art and technology

image
All illustrations given in the article are given for example on test objects and do not reflect the final quality of the game. I would like to boast, but, sorry, we cannot yet.

My name is Dmitry Nikiforov, I am an effects artist in the studio Allods Team. The work on the Skyforge project began for me in May 2011, before that I was doing effects for the MMORPG Allods Online.

Effects in games have long been given a large role. They maintain the overall atmosphere and style of the game, more colorful and spectacularly reveal the gameplay. Can you imagine, for example, a fireball without a flame and a spectacular explosion at the end?
')
Today, visual effects are no longer just information markers for in-game events. Effects turned from animation graphics into an independent artistic discipline with its own rules, technical requirements and approach.

Technologically, the effects move the entire gaming industry forward. To achieve this or that visual effect, large-scale studies and a huge number of tests are conducted.


How do we make effects? It depends on what you need to get, what type of effect is required. If we work with a waterfall or a fire-breathing dragon, then artists draw concept art and pass it on to FX artists. If the effect must accompany a certain character's ability, like the aforementioned fireball, the process is somewhat more complicated. It does not work out just like that and draw. To implement the artist's idea, the whole team will have to get together and brainstorm. Visual design is designed to most effectively and spectacularly show certain events of game mechanics. Next you need to pick up samples of "materials", which will consist of the desired effect. Frames from films, photos are being selected, even rough sketches are made on pieces of paper. If necessary, the concept art of the future effect in the storyboard is compiled. Then the design of game mechanics is tested with muffled effects - does it look good? And only then the effect is transferred to production.

Technology

Any successful MMO-project should be continuously developed, including in terms of technology. A vivid example is Blizzard's WoW. It is enough to compare the set of gaming and graphic features at the time of launching the game and today.

In Skyforge, we said no to middleware for effects that Maya had been for a long time, and we wrote our own editor from scratch, as in all advanced game engines. There were several reasons for this. Firstly, already in “Allods” there is a tradition to make only small “parts” of future effects in Maya, and to collect the finished effect already in the game editor. Secondly, the visualization of effects in the Maya viewport and in the game editor is different. Thirdly, Maya's particle engine for the new project was not enough.

Own effects editor saves a lot of time for export and subsequent setting of the visualization in the game engine, allowing you to immediately see the result. The capabilities of the editor are constantly expanding in accordance with the requirements of modern technology. Any artist can “order” the tools he needs. The editor has no name yet. (Any ideas? Suggestions are accepted! :)

And what comes to your mind when you hear about effects in games? Surely these are dynamic simulations like smoke, fire or explosions. However, in most cases, there are no dynamic effects calculated in real time in games.


An example of the effect of using PhysX technology and without it.

It turned out that the effects are easier and more convenient to calculate in advance and store the result of the simulation in small binary files.
First, we always get a predictable result. Given the miscalculation of the effect of the real-time physics engine, one cannot be sure that the output will be exactly what the artist intended. If we take the combined effects, where the main part is pre-calculated, and the remainder is simulated in real time, then we can see that, despite the general increase in detail and the number of particles, the real-time part is knocked out of the overall picture. The biggest problem is collision handling.

Secondly, in this situation, an additional load is created on the dynamic engine, which is still not able to provide all the variety of effects in real time.

In the Skyforge project, all effects are pre-calculated (for the moment). We see full-fledged dynamic simulation only in the editor. This result is recorded, and then played at a new moment, like a normal animation. As I already said, the capabilities of our editor are much wider than those of Maya (in terms of game effects). In addition to the usual Billboarded Sprite particles (a rectangular plane always facing the camera), there is also a Directed Sprites (a plane with one of its axes pointing in the direction, usually in the direction of motion).


“Billboarded sprites” particles



Particles such as “directed sprites” and an example of the effect where they are used .

Instead of "sprites" in place of particles, you can draw software "trails". These are geometric ribbons that are procedurally constructed in each frame during the life of the particle.




Particles such as “trails” and an example of the effect where they are used.

We can also replace the rendered particles with a full-fledged geometry, pre-modeled in Maya, the so-called instances.



Particles of the “instanced geometry” type and an example of the effect where they are used.

In addition, we can render light sources instead of particles.



Particles like “lights” and an example of the effect where they are used.

The game engine uses for rendering technology deferred shading, where the final image is built by composing a set of pre-counted layers from the G-Buffer. Since with this approach it is impossible to correctly display semi-transparent objects (to which, first of all, effects belong), they are rendered separately. Usually, a lightweight shader is used for the effects, which is independent of the lighting, and so that the effects are not knocked out of the surrounding world, color grading is applied to them, which takes into account the lighting of the local zone.

Blending options depend on the type of particles and material settings, which can have several shader code options. For sprite particles, this is both additive and alpha blending. In addition, there is a special shader for liquids that picks up color depending on the “thickness” of the layer and changes the refraction parameters, changing the intensity of the glare and reflections on the surface depending on the angle of view



Particles with the “water shader” material and an example of the effect where they are used.

Geometry, born by the particle emitter, can have any shader code used in the game. But most often the effects use a lightweight shader with additive or alpha blending. For trails, a separate shader is used, which has four blending options: alpha, additive, multiply and even inverse.

The effect editor allows you to control some of the shading parameters — color, transparency, self-highlighting — and do it separately for each particle. That is why most of our textures are discolored. The textures themselves are assembled into textural atlases, which represent one or several images in one area of ​​the textural space (sequences of explosions, fire, smoke, etc.).
Textures can have multiple channel masks to simulate various material properties. The main texture contains the color and transparency mask. Depending on the material, the texture atlas may contain another normal map, a mask of self-glow, gloss, glare intensity, and light transmission.


An example of texture atlas.

Particles can be illuminated by global light sources, as well as respond to IBL (Image based lighting). The figure shows how the smoke is illuminated depending on the position of the "sun", and also shows the work of the self-glow mask.


Particles and lighting.

Particle control

The effect editor allows you to generate particles in several ways.
You can specify a specific number of particles and set the position and time of appearance for each, or you can generate them at a constant interval of a second.

There are point and volume particle generators, various "force fields" to provide the desired behavior: gravity, turbulence, pushing and pinching field. There are also auxiliary collision objects for restricting the movement of particles using a plane or volume. The figure below shows the operation of the collisional object of the “sphere” type and the gravitational field.


Object "collision".

Each effect consists of one or more so-called particle systems. A similar principle can be seen in the Maya program.

The particle system includes one or more particle generators, and all the particles within the system are subject to the same rules - be it color, dynamic fields, collisions, etc. All particles in the system can be of the same type (sprites, instances, or trails), and all have the same material. In the usual effect contains 3-7 systems of particles, and complex can be more than 10 systems. To draw each system, you need your own Draw Call, therefore, the smaller the particle systems in the effect, the easier it is for the video card to portray it.



Art

In games, like in movies, nobody cares how plausible and physically correct is the interaction of objects and particles in an effect. The main thing - entertainment. But in games, the effect of entertainment must be divided by the frequency of use.

Suppose we have a classic character mage who can throw fireballs. If this is a rare ability that can be used no more than once per minute, then you can make a big “epic” explosion with complex animation, which will be displayed for quite a long time - up to several seconds.

If this is a “spam ability” that can be used at least every second, the explosion will be quite different. It should be a small, non-irritating effect that will also need to be quickly removed. Such effects can live just 0.25 seconds.



The game is first and foremost a gameplay. The effects themselves are secondary and support the mechanics. If you follow this rule as accurately as possible, then there will be no place for beautiful things in the game. The entourage of the game will be dry, as in checkers or road signs, because no matter how beautiful the picture is, it will inevitably distract attention from the gameplay. Fortunately, the mass audience for which we are aimed, loves and expects beautiful things. The task of the artist according to the effects is to invent and implement it in such a way that it does not contradict the game mechanics, but complements it.



The very style of effects in Skyforge is different from Allods Online. The render uses global illumination with HDR adaptation and dynamic light sources. All this imposes certain requirements on visual effects. Each of them should look like a certain physical phenomenon (even if it is magic), and not as an abstract something, otherwise the effect will stand out from the general stylistics. If we made a cartoon in Allods, we make a Hollywood blockbuster in Skyforge.



About art in the effects you can write a separate article, so here I will stop. It is always better to see everything yourself one day than to read it 10 times, albeit with pictures. Such an opportunity will also appear on your site, in closed beta tests of the game.

The effects artist's profession is a constant challenge. This is the need to achieve a plausible result in the face of severe constraints. Most often it is a deception of the viewer, a mixture of technology and the artist's skill. Our specialty is distinguished by the ability to view and understand the dynamics of natural phenomena, technical and man-made processes, and even the work of simple household appliances like a gas burner in a stove. Therefore, if you suddenly see a person who is “stuck”, looking at a waterfall, a fountain or a burning urn, do not rush to conclusions - perhaps he is just an effects artist.

Other materials can be viewed on the Skyforge developers website and in our Vkontakte community .

Source: https://habr.com/ru/post/201360/


All Articles