Войти
ПрограммированиеФорумОбщее

[UNITY] Декали повреждений на Skinned Mesh Renderer (4 стр)

Страницы: 1 2 3 4
#45
6:30, 23 ноя. 2020

Llevellyn
Normal Map
Вы некропостер


#46
10:46, 23 ноя. 2020

Llevellyn
от автора:
>How it works is that it:
>takes a snapshot of the vertices in the characters skinned mesh, calculates which vertices are affected by the projected decal, adds those vertices in to a new skinned mesh (or existing one if previous decal has already created it) and calculates new uv's for the decal.

И:
>I did some tests using a model with ~35k vertices (the Guard model from Adam character package). In this test on average (with 20 datapoints) I got ~120 decal vertices per millisecond. So for example if you have a decal that covers an area with ~4000 vertices it will take ~34 milliseconds to create the decal. Memory vice we are talking about few megabytes of mesh data. With multithreading enabled there won't be much visible impact from the computation, but you will be triggering garbage collection if you create a lot of decals with large meshes.
>For comparison using a model with ~6k vertices (Robot Kyle), with same decal and same amount of tests I got an average of 80 vertices / millisecond. The average decal was 400 vertices and took ~5ms to create.
>In both tests I used the same decal which has a size of 0.4 world units. With this system the amount of vertices within the decal area determines the overall performance, so characters with lower mesh density are recommended.

Ну я каких-то значительных лагов не заметил. Не могу ничего сказать, насколько качественно каждую декаль прям делает, потому что у меня нельзя было подходить близко и осматривать каждый труп.

Страницы: 1 2 3 4
ПрограммированиеФорумОбщее