Amplify Impostors Shu face tutorials from minus zero learning Amplify Impostors

Tip : Select the right side of the directory, you can quickly find what you need

This series of blog links: Portal

 

note:

  • Amplify Impostors does not support: SkinnedMesh
  • Switching platforms may lead to the collapse of Unity, and the switch is not in the past. (Solution: Unity directly open, plug-ins required to delete, and then introduced into the finished switch; Unity Hub opened, the current can be switched off Unity, the switching platform Hub opened.)
  • It recommended in Unity2018.4.

[I do the test in 2017, under BillboardMesh preview is always transparent, rendering the pictures are black and white. Display properly replaced after 2018. ]

     2017

     2018

  • Recommend optimization is done in the PC platform. (WebGL platform model may not recognize the border, can not be optimized, will open BillboardMesh following scenario)

 

 

A, LOD Introduction

Depending on the distance from the target camera, showing the accuracy of different models. Two LOD models below are present memory, although it will increase memory consumption, but will reduce the burden of rendering.

We can see from the model is recent, show the tree on the left, 10.5k face, stay away display to the right of the tree, 7.6k surface.

   

 

 

Two, AmplifyImpostors introduction

Save the displayed information of each face of a model to a picture, the camera distance based on a complete different display models or pictures

LOD models are displayed, AmplifyImpostors display models and pictures.

Under the tree diagram on the left is the original model, the right side of this tree is AmplifyImpostors to create pictures. We can see the original tree number of faces is 5.9k, 22 optimized picture.

 

 

Three, AmplifyImpostors attributes explain

  • ImpostorAsset : Resource File
  • Group LOD : After addition of the components of the LOD model can be adjusted to the element information LOD
  • Type Bake : rendering model (explained below)
  • TextureSize : size of the generated map. The larger the value, the higher the resolution of the resulting optimization thereof.
  • Pixel Padding: increasing the pixels of each image picture boundary, so as to avoid interference that may arise during mipmap. Value of 32 means that the picture will expand 32 pixels in each direction.

Billboard Mesh: 

  • Max Vertices [4,16]: used to define the maximum number of vertices on the left side, it does not exceed the last number of vertices.
  • Outline Tolerance [0,1]: by increasing this parameter, or increase the number of vertices, such that the shape of the finally generated will be more closely fit the shape of the object. Parameter is set to 0 to produce a package shape of the entire object, which is simpler and more loosely shape. However, setting a value of 1, then the resulting shape more bonded object (need to set a reasonable number of vertices).
  • Normal Scale [0,1]: This value is set according to the position of the vertex normals in the shape of the object picture, the maximum value is set, will create a rectangle. When a rectangular, extra vertices to be removed.

Bake Preset

Baking preset parameters, but also their own point of new, reassigned

  • Suffix : map name suffix
  • Channels : channels. There RGBA, RGB
  • sRGB : sRGB is included
  • Compression : Compression mode. There are None, Low, Normal, High
  • The Format : format. There PNG, TGA

Global Settings:

Edit--Preference--Impostors:

Impostor the Default Path New : The default save path when creating Impostor.

  • RelativeToPrefab, Asset open path point +.
  • Global, pop Relative file to Prefab Floder set point + folder path.

Importer Settings the Texture : If you change the size of textures, then, if you want to ask it again.

IF not Present LODGroup the Create : Check will be automatically added to create a parent object LOD Group assembly (will only take effect when the LOD Group component object is not added).

Suffixes : map name suffix

 

 

Four, AmplifyImpostors optimization process

1, into the model, adding components

Adding components to the model AmplifyImpostor

 

2, the model to create a resource file

a, can point + create, you create the resource file is automatically assigned to ImpostorAsset

b, can Assets Right Create - Create a AmplifyImpostorAsset

 

3 selects a corresponding rendering mode

There AmplifyImpostors rendering mode 3, the appropriate mode selected as needed

1)Spherical

Effect: When the camera is rotated to observe the target, the target will be resilient (as would be the target symbiotic AxisFrames [16] To see the different facets of its position in accordance with the camera, toward the corresponding image is switched to.)

A, BakeType: Spherical, TextureSize: 4096 (with 8192 I tested the plugin will be stuck, look forward to the follow-up to solve)

B, BakeImpostor, generated.

The picture is not clear solutions:

  • I can be found in the above figure does not clear, the size of the map can be generated by TextureSize increase, increasing the resolution
  • By reducing the number of surface texture can be generated AxisFrames, reached at a fixed map size, reducing the number of surface texture, to enhance the resolution of each face of the object.

 

2)Octahedron

Effect: the relative first, to improve support for camera rotation. When the distance observation, the model generated no significant effect of jitter.

The disadvantage is that the past can not put a watch, put closer look at the effect will be significant overlap. (LOD but we are far from this model show, really close with both models. Just solve this problem.)

 

3) HemiOctahedron

Effect: This mode is only render positive model (do not render negative), rendering done from the front is very good (because only half of rendering, accuracy is increased), but the negative side of this model, on the Goof.

 

4, LOD adjustment

a, LOD recalculation

Select LODGroup component's parent object, click the Recalculate Bounds recalculate the border.

Re-settlement boundary: Solving camera drag far, the target was switched LOD. Even if the ratio LOD1 (optimization thereof) account for 99% (LOD0 was true, LOD1 optimization thereof), still camera in order to switch to the far drag LOD1 (shown below).

b, ratio adjusting LOD

Drag this boundary, if necessary, adjust and optimize the LOD was accounted for in proportion. This is a small object, the current I tune is 25%. Large objects may be adjusted to 40% or more.

c, suggested that this was made to optimize production of a good preform LOD

When the LOD simply feel inappropriate, either because adjustment AmplifyImpostors property, so that the current LOD inappropriate time,

You simply adjust the LOD value preforms, you can change all the model LOD value of the entire scene.

To avoid a transfer of a trouble ~

 

 

So far this complete optimization of the object!

Please point like a praise ~

Enjoy!

Published 329 original articles · won praise 85 · views 190 000 +

Guess you like

Origin blog.csdn.net/weixin_38239050/article/details/104891781