LODs is a very important and very old optimization technique that Orchid Rain makes use of. If you don't want your mod to make the game run slower for other people, you must create and setup LODs for all your models. Luckily, we've got a tool that will help us do it easily.
LOD stands for Level Of Detail, and is a technique that employs different 3D models with varying polygon counts, to lower the computing power required to render a character or an environment by swapping between those models depending on the distance of the camera. In Orchid Rain, characters have 3 levels of detail, that is 3 different versions of their corresponding 3D models. Ideally, the player won't notice when the models change, but if you know what to look for, it's noticeable.
Select the GameObject containing the Skinned Mesh Renderer of your mod's model. Add a "LOD Generator Helper" component.
I've included with the Modding Template folder a version of Unity's AutoLOD experimental LOD generation package. This component is part of AutoLOD, and is the main way to auto generate and setup LODs.
You can see 3 levels being defined by default. Those values might be fine for our purposes. The game will override the "Screen Relative Transition Height" field. The Quality field will make the generated LOD models have less or more detail. Your goal should be having the lowest resolution possible models without compromising visual quality too much. Level 1 should always have a Quality of 1, because that's the model the player will see when close.
The three highlighted values could help you if your generated LODs are broken or have holes.
We'll press the "Generate LODs" button right now and see if the default settings work for us.
You will notice a couple of things. The component we added appears to be gone, and there's a new component. In reality LOD Generator Helper is not gone, but it's showing only one button that says "Destroy LODs". You can press that button at any time to undo and delete the generated LODs. LOD Group is a default Unity component that manages LODs. You don't need to pay attention to that last one.
In the Hierarchy, you'll see some new nested GameObjects. Inside Level00 - 02 are the GameObjects that contain our generated LODs. You can click on each of them to see them displayed in the Scene viewport.
You can click the "Gizmos" button in the Scene window to enable the "Selection Wire" option. It will allow you to see the wireframe of whatever object you have selected. It's useful if we want to inspect closely the topology of our generated LOD models.
Specially in the lowest levels, your topology might be a mess. For an procedurally generated LOD, it's actually not bad. The thing you should worry about are holes, because those could be more notorious. Bad topology isn't necessarily a problem, because these models won't be very close to the player, and it's very difficult to notice these imperfections in-game.
Of course, there's also the option to manually make these LODs yourself in your preferred 3D modelling software. This approach will be more than enough for most, if not all, cases.
If you are not happy with the results, you can press the "Destroy LODs" button in the LOD Generator Helper component to go back a couple steps. This process is non-destructive, unless you delete that component.
Update Npc Skin Info with your generated LODs by draggin and dropping each generated LOD GameObject to its correspondent field.
Though I've also made a little shortcut. Right click on the Npc Skin Info component's name and select "GetLodRenderers". It's not 100% guaranteed to work all the time, so keep that in mind. After you use that, make sure the "Lod" fields are correctly assigned.
After this, you can build your mod and test it in-game. It's possible it might be a bit hard to see if your LODs are working, because LODs are never supposed to be notorious. You will know if your LODs are not working if you start getting lower FPS than you would otherwise.
A bit hard to tell which LOD this guy is in now, but that works in our favor.
We need to do the same now for all the gibs. Word of advice, the less shortcuts you try to take, the less chance an error slips through your hands.
After you finish with the last gib, and update all the Gib Skin Info components with new LODs, you don't need to do anything else. Build your mod and test it.
Everything in order. You can't notice the lower level of detail of the farthest gibs, but your players will thank you for the optimization of your mod.