Closed FzuLiWei closed 6 months ago
There isn't a way to currently cache and reuse the render textures. But, there are several ways to address this - The first way is to build a prefab using the prefab maker. That will basically "hardcode" a character, and you can then reuse it as many times as you like without duplication. Then second way is to use type "TintedTexture" in some of the channels. This only works when the material type is set to "no atlas". Then the texture from the overlay is used directly instead of layered/composited (the Color property on the material is set to the first color on the overlay). If you make no changes to the normal map or metallic maps, for example, you can do this. The third way is to skip using the texture merge for some materials - and "hard code" the material to specific textures. The fourth way is to use the UMASimpleLOD to rebuild the textures on the fly based on distance to the camera.
All of these can be combined based on what you need.
Thanks
hello , In this code TextureMerge.cs.
see unity doc , origin of coordinates is on the left bottom. why is not GL.LoadPixelMatrix(0, width, 0, height); I cannot understand it.
I think I already know why. Because unity Rect is base on left top is zero.
I get it.
This is because the parameter names were specified, so the order does not matter (the compiler figures it out).
Hello Jaimi:
I read UMA Code , I have know the texturemerge solution .A amazing solution . It create 3 RenderTexture to setmaterial . Of course ,if more channel ,more rendertexture.
I suggest If the same model without any reciple , Can it be optimized to only use 3 RenderTexture instead of 3 RenderTexture per model ,used for monsters in the game ?
It can further optimize memory usage, since memory usage is capped if a large number of characters are used .
Thank you again for the solution provided by UMA.