Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
Use the docs, Unity is very well documented.
If you are seeing "severe performance issues" as you call it I wouldn't imagine LOD to help you as much as learning about asset optimization in general.
But if it is not the detail of the models, what else is the biggest problem with these guys?
https://steamcommunity.com/sharedfiles/filedetails/?id=1679164000
I want to learn, but I'm only just starting to get a feeling for unity editor as I have explored more of it and learned a lot about it when I followed the tutorial referenced in that mod.
By all means explore LOD bias if anything then just to learn but most of the performance hit is attributed to this particular post effect, animations and the rest of the overhead with using TTS as opposed to just Unity on it's own. As such you will likely not really improve performance if only for the absolute lowest end of hardware that particularly struggles with the polycount.
https://docs.unity3d.com/540/Documentation/Manual/script-ScreenSpaceAmbientOcclusion.html
The Unity doc doesn't explain this particular feature in detail so if you care about how it works you can find countless documentations elsewhere on the intrinsic concept.
I will experiment with the LODs then to see if that does anything.
Thanks for the help!
I have followed this tutorial:
https://www.youtube.com/watch?v=ifNyVS2_6f8
(Which essentially explains "Make several versions of your model in Blender, put them into different layers, name them with _LOD[number] according to LOD level, so that unity recognises it")
The original model was consisting of several parts in blender, but it has worked fine. However, since it seems you have to name each object in Blender with the _LOD tag for unity to recognise it, I joined the parts together, making sure the armature still works and the UV map was intact afterwards.
Then, working off of the result I got from this tutorial:
https://www.youtube.com/watch?v=j-0iaZUgsTk
I set up the model as described, changing animation type to humanoid, assinging the animator controller I have created and unchecking root motion to keep the model in place.
After having assinged the material to each LOD level, I pressed play. At this point the model should animate correctly in the viewport, but this one with the LODs does not. Apparently the armature does follow the animations as can be seen by the red rings. But the model does not pose. What's wrong?
https://i.postimg.cc/KZGL7cH9/grafik.png
In assigning LODs your animations most likely lost a lot of references to gameobjects, in fact as I am not versed in using both LOD and animation together for things strictly outside of the Unity editor such as assetbundles I can not say for sure this will work without C# scripts (meaning not at all as you can't bundle any scripts).
Feel free to export a unitypackage containing only one dude (only need one for testing) and I can have a look at it.
https://i.postimg.cc/D2pyV8WW/grafik.png
The different colored skins show different LOD stages.
Performance has increased greatly.
The LOD stages do not follow the animation effect stages...
I.e. the model, upon choosing loop effect 2 the LOD0 goes into kneeling position as expected, but LOD1 does not do it and still stands. The weapon however does go into the correct position and stays there.
I hope everything is included in here, because the export package window with all the drop down menus being open is not exactly helpful in finding things. I tested it on a different unity project and it worked there.
https://www.media
fire.com/file/q2s1op9ndxxp9ue/LOD_soldier_unitypackage.rar/file
To explain the structure of your current asset:
You have a primary gameobject containing mesh renderers and bones as your primary LOD that contains it's own animations.
You also have two secondary groups of gameobjects for the LOD1 and LOD2 states, these are duplicates of the primary but with mesh renderers using the lower poly meshes.
In the editor, you can zoom out to have the LOD component toggle between these three LOD groups. In effect it basically swaps between these game objects, and the crux is that the animations are duplicated to create new, unique animations with references to only their own duplicate bones and only work if called separately, as the animator for LOD0 does not have any references to objects in LOD1 or LOD2.
You can test this by selecting the clones and playing it's respective animations. The asset works as intended, but the structure of it is not great.
There are ways to work around this, but seeing as I think you did not create this model and it's animations you will not have a fun time going back and properly assigning bones. None of these solutions will be quick and easy, but the probably easiest one is tying everything to one animator calling the animation on all LOD group gameobjects. The other, probably not recommended option is not using an animator but instead calling a list of animations to play at once. Third is just remaking the animator states and animations for each set of sub bones in a structure that is correct to begin with.
What I've listed here is how it's done, maybe if you're lucky you could find a tool to do it for you, though I couldn't say and doubt it at all exists. Unfortunately you don't have access to C# scripts which would make this a whole lot easier, and the TTS effects script does not seem to support more than one animator param per loop.
You could potentially run through the animations with LUA instead of the contextual menu using trigger effects, but I can not guarantee this working flawlessly.
I suspect you're in for a whole lot of manual reassignment work.