[Translation] performance standards for cryengine3 art resources and colorant material settings

Source: Internet
Author: User

PS: some games not only apply to cryengine3, but also to our own games.

 

Scenario complexity

Leave the room through closed

Use Transition Region

Apply fog effects to non-masked Environments

Use visblocking/occluders for large objects

Adjust and reduce the visible area in the area of a special multi-object

Delete a type not visible to the player

Smooth the surface to reduce vertex Density

Adjust the visible range for each object

Set the maximum drawcils alert value to 2000 or smaller.

Use less textures as much as possible.

Avoid overlap of Multiple Materials

Do not overwrite multiple very large transparent layers or add layers (additive)

Set a proper distance for the fine arts resources to the level of granularity.

CPUPerformance

Use as few complex materials as possible (low performance cost)

Minimize the number of triangles in the cbuffer (save drawcils and reduce drawcils conflicts)

Area of cbuffer

Reduce the number of bones of an animation role

Do not use role animation blur (skin requires more bones)

Exercise caution when using texture streaming (requires decompression)

Use as few transparent objects as possible in the weather effect (CPU calculates the approximate value of fog effect)

Use triangles as much as possible for the physical proxy (for collision detection)

Exercise caution when using destructible objects

GPUPerformance

Resolution-independent:

Use as few vertices as possible for rendering (each vertex is a unique position and coordinate point of the texture)

Use a less complex vertex format

Use as few lights as possible with shadows

Use decals with caution

Resolution-related:

Render objects use as few pixels as possible on the screen

Use low-cost pixel shader (small lighting, less shader features such as reflection, simple shader ).

Use as few textures as possible for each material in the scenario

Use inexpensive texture formats (use compressed dxt1, dxt3, 3dc/dxt5 as much as possible)

Use mipmap

Alphablend is slower than alphatest, and alphatest is slower than an object that is not transparent.

Delayed rendering is cheaper than normal lighting, and the radius of all light effects should be as small as possible.

If you need some lights in some areas (such as the box area), this will lead to a large number of overlapping lights. It is necessary to use irradiancevolumes.

As few as possible to enable multiple postprocessing effects at the same time, another strategy is to reduce the time for enabling the postprocessing effects.

Do not use or use full-screen anti-aliasing (msaa/fsaa) with low overhead)

Weather effects with less effort

Use as few terrain materials as possible.

Memory usage:

Use as few textures as possible

Use a low-resolution texture resolution

Use the texture compression format (dxt1 is the best, dxt5 and 3dc are also good choices)

Use as few vertices as possible

Use the simplest physical substitution body as possible

Use as few animations as possible

Use as few models as possible or with a level

Use as few materials and particle transmitters as possible

Use as few roads as possible

Exercise caution when using the sticker

Use a light source with as few shadows as possible

Texture stream: (related to texture transfer bandwidth)

Streamability textures should be square-sized (same width and height, for example, 1X1 256x256 ).

Use as few different arts and sciences formats as possible for better unified management of texture pools

Use as few unique large textures as possible for each region to reduce I/O bandwidth consumption

Strictly abide by the texels per square meter (distance streaming is based on it), and use r_texelspermetter 1 to check it

Do not try to use a texture larger than 512x512 (split some large textures into small textures)

Try to avoid using smaller than X texture units (which will cause memory fragments) and splice small textures in the same region into a large texture.

If you still stick to using a large texture set (not recommended), make sure you do not use these physical to different areas of the scenario (such as vegetation)

General Program Performance Criteria:

The simpler the material, the more streamlined the texture.

Attachments should be adjustable and should not be displayed when the screen is too small

The eyes are closed based on distance to reduce the consumption of eye rendering (if the eyes are rendered)

We should try our best to prevent the destruction of destructible objects from spreading out too quickly (in my understanding, it is slow to scatter damaged objects as much as possible, and do not set them to too small damaged objects ?)

The smaller the number of vertices should be used for texture expansion (expanding into large blocks)

Exercise caution when using the sticker.

Determine the texture resolution (set appropriate proportions based on different ranges)

Set block area to reduce the number of rendering objects

Using protals in static scenarios can bring better efficiency.

Blocky ry helps to get more for the same vertex count)

Reuse ry and texture to reduce memory usage

Avoid using unique details in the scenario (especially in complex scenarios)

The material layer that needs to be rendered multiple times is slower than normal, so use it with caution.

Manually perform the reset xfrom and reset transformations operations before export. If not, these values are checked by the engine to generate assertions. For example, the physical model does not match the rendered ry.

The origin point should be inside the object's Package Box to avoid rendering results that are unexpected.

Track and solve all levels error levels displayed in the console input window.

Rendering call (Drawcils)

A different material of each object will cause a separate drawcall call. Each drawcall will cause an additional engine overhead. Therefore, you must avoid more than 2000 drawcils during observation at any point in the level.

Use as little as possible for different materials

Merge some textures (for example, if you use two different 512x256 textures for the same object, merge them into a texture of 512x512)

The square texture will be better applied to the texture stream

Each object uses as few different materials as possible. Each material of the object will cause drwacall at least twice. If the shadow is enabled, it will be three times.

Delayed rendering is used. The CPU overhead of delayed rendering is much lower than that of foreground rendering, and the main overhead is only for GPU rendering. The front-end drawcall can be replaced by a uniform screen drawcall for delayed rendering.

Number of vertices

In the engine, the UV boundary will increase the number of vertices and use as few UV boundary as possible.

Vertex normal vectors are separated on some hard edges to ensure smooth polygon and reduce the number of hard edges.

Physical proxy

A good physical proxy is very important in reducing the CPU physical computing time. If there is no physical proxy, the performance will slow down.

Use a simple physical proxy to replace the rendering model to process physical computing and reduce the CPU physical computing time.

The physical computation of rendering ry should only be applied to some destructible 3D bodies, such as the destructible trunk.

Use primitives as much as possible for physical proxy replacement

Try to use the rough object proxy to handle the collision of roles and the collision detection of rendering aggregates and bullets.

Use a set of smoothing bodies for each physical proxy (only soft edges)

Set the physical type (set the proper physics type in the material edtior of the 3D package) in the 3D package of the material editor)

Block proxy

For a large object, set the role's visual occlusion, use the block proxy instead, and use a single-side blocking proxy (because the default multi-side type is regarded as double-sided). It is as simple as possible. The smaller the number of triangles, the better.

ObjectLevels

Set the level of detail in each art resource. The number of vertices in each level must be reduced by at least % 50. Use the instancing and adjustment modifier of 3dmaxd

Reduce the number of materials with low levels of level of detail to save drawcils.

A good level of detail is the key to good performance and good resource appearance.

Material settings

Use as few materials as possible

Combine textures to reduce the number of materials and texture extraction

Keep all textures in crytif format

Use 128/128/128 as the default diffuse color

Use a simple gray 128/128/128 or quick color texture for early texture size experiments to get a suitable memory overhead Solution

Make sure all textures have been tested for performance

Vegetation

In an outdoor game, vegetation is an extremely high overhead for a vegetation coverage scenario, ensuring that the number of drawcils per region does not exceed 1 or 2

Reduce the material size of vegetation objects and save drawcils

Use only the optimal shader on vegetation objects

Reduce the number of sides because these objects are drawn many times on the screen.

Combine arts and sciences to reduce the number of materials and the least texture extraction (texture fetches)

Add multiple edges to the leaves to match and reduce overdraw (occlusion rendering), and use patches on the trunk.

Particle

Make particle effects as effective as possible, because they bring great overhead and have a great impact on performance. In addition, try to replace standard particles with simple particles without affecting vision to reduce performance overhead.

Frametime:

If your frametime target is 30 frames per second, the consumption of each frame should not exceed 33 seconds.

You can use r_displayinfo 2 to check the frame time or enable the performance evaluation mode (profile = 1 ).

Frame Rate = frame time in 1.0/1 s. For example, 1.0/0.033 (3) = 30.

The GPU time is very dependent on the screen resolution if the fsaa and render target formats are used, such as 720 p (1280x720) and HDR is disabled. The higher the setting, the worse the performance.

Specifically, this means that for xbox360, if you spend 5 ms for ZPass, 6 ms for General pass, and 10 ms for shadow processing (if this function is enabled ), this takes about 21 milliseconds. Theoretically, the frame rate on the GPU will not exceed 47 frames.

Overhead of non-delayed rendering illumination

Using a simple pass for sunlight Rendering

A single pass is used for the rendering of the point light source, which can be merged. Up to one pass can process four lights.

Spotlight rendering always uses a separate pass

This means that if your scene has sunshine, you can add a light source, which will bring additional drawcils light source effects to each object. The additional drawcall overhead means that more data needs to be processed on the CPU. Each drawcall will bring more filling overhead.

Limit the number of textures

Shaders reading textures is very expensive for host classes and old PC hardware.

Use the gloss option in the shader of diffusealpha to replace the glossmap ). This saves a lot of time for reading the texture of a shader. You can use it safely without worrying about any quality loss. If you use this feature and your luster is only in a single tone, you can adjust it by using the color material parameter in the highlighted color.

For the shader of vegetation, use the merged textures option. For the leaves, this means that the RGB channel of the glossmap texture contains your transparency RGB channel, and glossmap Alpha will contain your grayscale gloss information. For the trunk, it means that diffusealpha contains your grayscale gloss information. Do not ignore this because it is good for both GPU (reduced read overhead) and CPU (less overhead for setting texture sampling.

Correct useShaderColoring er options

When you use the grass shader generation option for grass rendering, this option is a very cheap rendering method that generates all shadows and reads with the least texture, correct use of this option is very important, especially for host games.

Use the decal shader generation option when you use a material as a sticker. This is important to ensure proper rendering. For example, you need to avoid Z-fighting (Z competition) in some hardware and some rendering conditions. In addition, the delayed rendering (deferred rendering) will only be able to normally render opaque ry/ground surface/decals. If this option is not enabled, you need to re-read the normal map and re-render and calculate the fog effect.

Water/rivers volumes

When water volumes and underwater fog effect are used, the density should be set to 0 if it is shile. In this way, the fog effect processing can be skipped.

Use water volumes in a small visible area. If you want to cover a large area, use small blocks as much as possible.

 

Author: Wuhua wujiu Source: wine.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.