[Tutorial]How to create LoDs inside unreal

EllessarrEllessarr Posts: 1,390
edited April 2021 in Unreal Discussion

hello guys i'm here with another "tutorial" but this time it's time for the "lod" which for games is something really important to work, let's start ty learning what is lod and why he is important, then let's start:

 

LoD in practical means, "Level of Details" which means how detailed is the mesh in game, to make things a little more easy for daz new comers take lods as a sort of "high resolution idea in daz when you want the mesh to be on the highest detailed possible, well lod is something like that however in a reverse way, let's keep the explanation, as we know real time render unlike still renders need "fast render" which means "low polys" and somethimes low resolution compared with still renders, then while in daz have a character alone having like 1 million polygons is not a big deal, for real time render it is a big deal, you need to adjust the polygons and sometimes adjust the resolution too, specially when you are seeing the things "from too afar". for exemple this image:

i've exported him at level 1 detail which is big than level 0 currently he have 130k tris and 69.333 vertices which is a little above average for many unreal charaters which normally already countig stuffs like "outfits ending being around 80k to 130k for triple AAA games and around 40 to 80 for A to B and around 40k for indies, again this is also counting stuffs like outfits and weapons, well it's means which this is a really high detailed character.

 

ok While ca be awesome to have a really high detailed character in the scene, it also can be a little "processor consuming, you must remember you are also dealing with stuffs like, landscapes props and others stuffs which can make a huge impact in perfomances for your system, then you can't go just droping million polygons stuffs like it's nothing, which is only part the isse lods try to adress.

 

The big issue and the reason lods are made is for "when those "high detailed stuffs" are being seeying from "too far away" like a 130k character 8k textures(let's drop the textures for now and focus only on the polygons to make things easy), he will still have the same weight or even more, the most afar you get from him, like for exemple you camera is like too far away to the point of the character being almost a "pixel" in your image, well while for your "human vision" this "pixel character" have a weight on it of a pixel" in your computer it's still have the same weight as if you are doing a closup, this is where "LoDs come, they are "generated low resolutions" of the mesh which are applied as far the camera get from the mesh, for exemple let's use a range from 0 to 80 where 0 is a super closeup and 80 is almost invisible far away, then for the 0 number you would need to use the "regular high resolution" of the character, then as the camera get away, for now let's use as a base 5 lods to make more easy), you will make this model be changed to a "less polygon" then when the camera goes to 20 it will change from the 130k model to let's say a 65k model(unreal default setup use the base model as base number for reduction which means all the lods are generated from him not from each other to make then more accurace), then when you go "more afar like 40 now the model fall to 32.5k, if you go more far away it go to 16.750 at 60 then at 80 it go down to 8.335, because at this point wil be impossible for the human eyes notice how low poly the model is at this level specially because of the materials which will have stuffs like normal map, Ao and others which helps hidden the "sharps of the model when needed and the engineer itself.

here again the orc, here his lods:

  

  

if you pay attention to the numbers at the top you can see the numbers being small on each image but the character still looks fine from far away, because of all the stuffs unreal try to keep the character the less buggy as it can

here the lowest poly count i've used in a close up:

as you can see the character have a lot of sharps it's only still looking good because of unreal effect which helps make's him looks more organic.

 

now which we learned about lods, now the next step:

 

How we create LoDs??

normally you do that yourself using programs like maya, blender, zbrush and even daz using the pluging decimator he have a option to create lods, however i would high and strong advice to only use it on "static meshes" or meshes without a "skeletal mesh" because of the bad/poor optmization and updates the decimator have can break bones and influence it's just a nightmare i'm really strong advice to not use it, use something else, whatever tool you choose i really can't help since i never tried to do that my best thing which i did was bake high resolutions details into normal make by using the bake process, which is something different but have a very look like type of work which means give to low poly models as much details is possibl as the high poly have.

 

however if you want to work "only inside unreal the "good news is which is possible to create direct inside unreal and this is what i gonna show, now let's begin,

 

1 first open daz and choose the character you want to export in my case i did it with the orc, then in the daz to unreal window, nothing really special you can choose to use the base resolution in this case 0 or export the level 1 which is 4 times the base 0 polygons, not really special, i would advice you if you want to export the level 1, do that only for the base character if you are exporting a character with outfits, hair and others stuffs, only set to the main mesh body to be level 1, the others leave then at 0, because normally outfits, hairs and those others stuffs already are good enough polycount and don't need those "extra" numbers and only do that if the character total number still under 100k or near it, if it's above keep the level 0, stuffs like normal maps. ambient occlusion and others stuffs will help to "round the character", now after all the process to export it get finished, open the mesh inside unreal by double clicking on it:

then the character mesh will be open something like that(unless you make some changes than mine window they will be very close in look)

 

then in asset details panel you will scroll down until you find this:

if it's minimized for some reason just click on the arrow before the name lod setting and the panel will be open the since i've already generated lods for the character mine is displaying 5, but the default value if you don't generated any lod and just exported the character will be 1, where it's say number of lods, then on that option you will choose the numbers you feel better for you, for exemple if you exported the character in base mesh or 0 then i feel which  would be good enough or even less, you can adjust the number as much as you want, it's just i feel having a good ammount of lods can make the transitions more "smooth" than for exemple a character going let's say 60k to 10k, it can be a huge change than go from 60 to 30 then 15 or 10 but you are free to make your own choices.

 

then after choose the ammount of lods you want click in the apply changes buttom(after that it will change the name to regenerate), it will automatically generate all the lods for you it can take a little time based on the ammount of lods and how detailed is character and others stuffs but it not gonna go more than maybe 10s in worst case i feel(for me take like 5s), now  your character have lods a good way to check it is go to the character render panel and look at where it's saying "lod" make sure it's marked auto, now you can scroll down on that scene to go far way from the character, as the camera get away the character you will notice the numbers droping an all will be fine.

 

now next step is configuring" your lods, for a optimal process can be good you configure each lod to set things like the "camera distance to make the lod pop up or the ammount of polygons or make sure morphs are being used and others stuffs to do that you will go back to the asset settings panel and scroll up a little until you are there:

here is where you configure all the stuffs, to be clear i'm also not tested everything on here then i will just talk about what i know any other configuration is for yourself to try, just make sure to have a proper backup of the character or use a "dummy character" before you can start to play here, here the options which i'm using now

 

1 - screen size: here is where you say to unreal "how far from the camera the character must be for the lods to work, to change this you need go back to the render screen character panel and change the lod from auto to the lod you want to configure in your case will be the 1

here the level 0 and 1

  

small numbers in size means more far away, big numbers means more close like face closup and all, then you can adjust to numbers even big than 1, for exemple if you want to to lod 0 to be only on closup then you make a number big than 1 like 1.2 or 1.5 or 2, more than 3 would means starting to pass away the character. for each lod you set how much the camera must be away to kick the lod you must set it for each lod and the numbers must be set to "small" for each lod above 0 and above each other, in mine exemple i did, 1, 0.8, 0.6, 0.4, 0.2, any number under 0.2 will be aways the lod 5, if you want more you can go furter and make even more low poly lods it's up to you.

 

now the next option is(it's not exactly in perfect order or each option just to make things more right)

2 - percent of triangles: here you say how much of the "base mesh" you want each lod use, for exemple the lod 0 is 1.0 which means 100% which means the 130k, for lod 1 i've used .5 which means 50% which is the 65k and so, here you set how much triangle it gonna have from the main base it can be changed but i would advise to use the main body and not the "generated lod to make sure all influences would work right.(whe you select any lod than the lod 0 it will display a option with "base lod" is on this option where you choose which "lod you want to generate the new lod" the default value is 0 since lod 0 is the first lod, its optional and only do that again if you already know what you are doing

3 - remap morph target: this option you use in case you export the mesh with morph targets and want to apply those morphs to the lods too otherwise when 'change lods" it now will be applied and for exemple you add a "morph to children, if this option is not marked when generating the lod, it will automatically go back to the original body without the morph, like in lod 0 you apply the children morph then when it change to lod 1 if this option is not applied the model go back being a adult

 

some extra options which i do know

 

bones to prioritize or bones to remove : the first one is the option you want to make sure when generate the new lod it work almost perfect as much as the base lod and the bones to remove is when you want to remove bones from the lod which don't make too much of a difference, for exemple face expression bones, in really low and far away lods where is impossible to see a character face you can choose the face bones to not be exported to the low model making it don't have any expression, it not gonna bug the animaton or anything it just prevent the animation on those bones to happens it will reduce the processor usage for those not needed bones.

 

well you have a really lot of others options which i myself never tested so far then it's up to you test each one and learn what they do on the modeal and how to use it in your favor.

 

well after you finish to setup all the lods with all the options you want now is just time to "regenerate the lods" you have 2 optons or regenerate each lod appart selecting again each lod in the scene screen then in the lod info you go back to the base lod then under that option you will see options like regenerate, remove or reimport this lod then click on that it will regenerate the current lod you are working in case you want it to regenerate all lods in one go then in the lod setting under the number of lods option click on regenerate, it will regenerate all the lods again using the current setting you changed for each lod, remember you must setup each lod to make sure all the options where proper worked otherwise you end with only the lods you really did some changes to have changes, because if you change stuffs for one lod it not gonna automatically passed to the next one you have to select again the options for each lod.

 

hope it help peoples.

 

any question beyond that like questions about the others options have a really high chance for me to "not know the asnwers for you", not trying to be a bad person or anything like that it's just i'm really not that skilled yet, i've just learned those days about that option to generate lods and almost as the others here i'm still pretty "new on this" to be answering any question, then have fun.

Post edited by Ellessarr on

Comments

  • RuphussRuphuss Posts: 2,631

    appreciate your work here

    how about such a feature in Daz Studio ?

  • EllessarrEllessarr Posts: 1,390

    Ruphuss said:

    appreciate your work here

    how about such a feature in Daz Studio ?

    for daz as far i can tell you have the decimator which do have a "lod options" but as i told in my tutorial i've ended having so many issues when trying to use decimator with skeletal meshes, which i've just ended giving up, i only recomend use it on static meshes,  but this is the tool, i really don't know if daz have others ways to "generae lods" for they models and how it's works even with the decimator since i'ved ended giving up on it, it would be good others peoples which better knowledge about it, but normally you can go by using the "base resolution when making renders, it normally can works with low poly stuffs to reduce the process, instead of use the "high resolution option which normally comes as default for renders or you can use the famous bilboards which are "renders of peoples to make it's looks crownded as some peoples do and you can find on daz, i'm really not that good with this, since daz is a still render lods are not considered really that important since you are not rendering in real time and don't need things "fast" then normally you don't see lods here, you see at best peoples using the lowest resolution possible for the render. 

  • I love how in-depth your tutorials are. This is very useful.

  • edited September 2021

    You truely rescued me with this! I knew most of it, but I had 1-2 little issues, which the little details in your guide solved them.

    Like the "remap morph target", were searching for that solution literally for hours and I could find only information for much older versions which didn't had this option yet or other workflows with a lot manual work of nearly re-creating morph targets, which is simply not gonna be realistic in most cases.

    Thank you for putting this out here!!!

    Post edited by dimitrios.karvounaris on
Sign In or Register to comment.