Jump to content

[WIPz] TES5LODGen


zilav

Recommended Posts

  • 1 month later...
  • Replies 140
  • Created
  • Last Reply

Top Posters In This Topic

  • zilav

    50

  • Sheson

    38

  • Prometheus

    22

  • happychappy

    4

Top Posters In This Topic

Posted Images

Hello , its a long time I do not work with lods in skyrim , and also I am not sure I understood well what this tool does or how to use at its best ... I will write here what I have and actually need and hopefully you could send me in the rigt direction and tell me how this tool could be used to help me out ...

I have done a dozillion new different models , city blockouts ( chunks of different buildings together merged like , Vanilla made cities) all are unique and new , using several different textures custom made etc.... The models are many and for a whole city at needs to be seen from very distant positions .

Now making lods manually for each chunk of piece means redo them by scratch into simplier forms , because many are way complex items ....

Is there a way that I can speed up the process of making lods and at the same time have advantage of them in terms of proper game optimization ?

Does this tool create meshes in reduced polycount for me ? Can eventually also create a reduced texture map to use as texture source for the lods? Or perhaps pick the original textures and create new ones for the lods to be used wich are way smaller than the original? Not sure if this helps with optimization .... Or in case can u point me to the right place for making quicker and good my needed huge amount of lods?

Thanks in anticipation for answers ...

Link to comment
Share on other sites

Hi. Zilav and Ehamloptiran are much more concerned than me for all questions related to TES5LODGEN, but if you rather want to go on the 'regular' way (I mean using Oscape and CK features, and I recommend that when you'll reach the public release for your mod) you can have a look at the ressources I released here. Even if you don't plan to use them immediatly, you can get some useful informations from the readme file on how LOD works and is implemented in Skyrim. (such as the potential translation and wrapping bugs)

Link to comment
Share on other sites

@Prometheus

 

LODGen does not help creating LOD models and textures. It "only" uses models to create the object LOD *.bto files for Skyrim. It allows additional features compared to CK when doing this.

 

I spend quite a few hours in blender/3dsmax/nifskope for the meshes and some in photoshop for the textures. For "organic" objects like landscape, rocks etc using the built-in poly reducing tools work pretty well. Sometimes that even works for structures with some touch up work. For others I start working off the collision box.

 

LODGen doesn't do texture atlas. So I did that as well in photoshop. I use a niftoaster spell to update UV of the meshes.

 

There is also a CK version of some of the meshes that I will update from time to time at http://www.nexusmods.com/skyrim/mods/59721/

The DynDOLOD TEST5Edit script can be used to prepare an esp with the new LOD models added to the base elements for CK/LODGen LOD creation. So you don't have to assign all the new mod models in CK by hand.

Link to comment
Share on other sites

I havent understood what actually dyndolod does and how it can be used on a completely new and custom made world with new onjects.

But on the lod creation....

My main issue is be sure to have the level optimized with proper lods . No slow down due to texture loads or heavy models load , but still have the best distant view effect possible ...

I have so to manually create each lod , but if I use this tool , how will be my performances ? Can I assign different textures , like reduced ones to models ?

For example if I have a huge building with 10000 polygons using 6 high res textures ... 2048x2048 or even 4096x4096 .... Many tiled....

Ca I make 4 lods of wich

Lod 1 5000 polys and 6 half size textures 1024^2

Lod 2 2500 polys and 6 te tures 256^2

Lod 3 800 polys and 6 textures 128^2

Lod 4 400 polys and 6 textures 64^2

Too many textures ? , since this adds 5 times the number of textures for each one ... Or is better to create a texture atlas?

Is it possible also to use hybrid texture atlas /custom loaded textures?

Can I have different texture atlasses?

Would this be doable? Does it needs permanent skse plugin. To work? Would this help loading and performances in my level?

My level is an endependant worldspace , using the normal vanilla mountain but all rest is new and custom, from new buildings to new rocks etc.... My main city is in the middle of the island that is 4096x4096 big and I want it to be visible from the far corners pf the shores ....

Link to comment
Share on other sites

For best performance use CK for LOD generation. It is the only way to automatically have a texture atlas for all LOD objects.

 

There are really only 3 LOD levels, 4, 8 and 16. I would only worry about the closest LOD level 4 and use the same lower poly for 8 and 16. Only larger structures even need LOD in 8 and 16.

 

If you use CK you do not have to create an atlas for a model, but I would advise to do so to optimize it further. Also there seems to be a limit to how many different LOD textures CK can put into the atlas. Check how LOD for vanilla farmhouses etc is done you get a pretty good idea. You often get away with 64x64 or 128x128 for textures. They are usually far away enough. 

 

If you check the vanilla texture, I would say that the textures for solitude are to small, but the ones from Whiterun are acceptable. 

 

While there isn't a real hard limit for how many polygons a LOD model should have, CK will complain if it is too high. I find most things work fine with a only few hundred. Buildings with straight lines sometimes even less. If you create a model for something that is used 1000s of times like a large rock, I would make a real effort to optimize the hell out of it. A unique structure that is only used a handful of times certainly could have some more without being a performance killer.

 

Usually the objects are really far away and small and really do not need much detail. I always remind myself that people do not run around looking at the LOD all the time. It just needs to be there and roughly fit the real thing in color tone and shape.

 

Using CK or LODGen static LOD doesn't require anything else once the bto files are created.

 

---

 

DynDOLOD is a package that consists of a TES5Edit script, LOD models and an in game mod to dynamically switch LOD objects.

The in game mod - which requires SKSe and PapyrusUtil - does not have to be used. Then all LOD behaves just as before. Meaning there won't be LOD for animated objects, and there won't be LOD for dynamic objects that [dis]appear/enable/disable based on quests.

 

The DynDOLOD TES5Edit script is used to scan for new LOD models and the load order so that LODGen make use of all LOD models. The script also creates data for the DynDOLOD in game mod, if desired.

Link to comment
Share on other sites

Most f the lods I am worried for are unique pieces of a city made of fitting blocks .

So basically you are saying. I have to manually create a tecture atlas for my models and assign it to the lods? If not wrong the first lod level can still not use a texture atlas? .

Link to comment
Share on other sites

CK will create atlas for you when building LOD, just keep in mind that textures used in lod should not be larger than 256x256, must not be tiled and there is a limit of 64 textures per worldspace used in LOD (atlas built by CK is 8x8 textures).

Link to comment
Share on other sites

CK will create atlas for you when building LOD, just keep in mind that textures used in lod should not be larger than 256x256, must not be tiled and there is a limit of 64 textures per worldspace used in LOD (atlas built by CK is 8x8 textures).

 

So I do not have to manually edit that texture Atlas for a worldspace ? I do have to manually create a small 64x64 texture for each one? or 256x256 each?

Then the Game will pick it up and I can delete after ?

and btw where is this located? How I do if I have more need for textures than are allowed for an atlas?

Link to comment
Share on other sites

CK creates the worldspace texture atlas when creating LOD.

 

If you want to do object LOD in CK check out this video

It details where the textures need to be in tga format to create object LOD with CK.

 

Have a look at this modders resource from Nico coiN, it has all the vanilla files in place already

http://www.afkmods.com/index.php?/topic/4079-skyrim-vanilla-lod-source-files/#entry153329

Link to comment
Share on other sites

So I do not have to manually edit that texture Atlas for a worldspace ? I do have to manually create a small 64x64 texture for each one? or 256x256 each?

Then the Game will pick it up and I can delete after ?

and btw where is this located? How I do if I have more need for textures than are allowed for an atlas?

If you are going to use CK to build LOD, then no need to create atlas manually. Resolution of LOD textures is entirely your decision, but no more than 256x256. CK builds lod by combining all your lod meshes into a several big macro meshes (with *.bto extension) and used lod textures are combined into a single atlas texture, so you don't need to distribute lod meshes and textures with the mod. But

deleteting them? Why? They will be needed anytime you want to rebuild lod.

 

If you are not going to use CK to build lod, then you'll need to create atlas manually. I can add automatic atlas creation for TES5LODGen similar to trees atlas, but lodgen.exe needs to be fixed first.

Link to comment
Share on other sites

No. A LOD 'low-poly' mesh must use a unique 'low-res' texture (256x256 if I remember right) and all UVs must sit inside the bound area from this texture. The Atlas generated by the CK is basically a 'compilation' of all the low-res textures used by all objects in a given worldspace. On the atlas they just look like 'tiles'. Here it is for worldspace Tamriel :

 

tamriel.objects.jpg

 

As you can see, the 'tiles number' seems to be limited. So, for a large worldspace it's a good idea to design a unique 'tile' for all related buildings : 1 tile only for the entire Castle Volkihar, for example.

Link to comment
Share on other sites

Ok but , lets say I have my big island , I used all usual skyrim stuff for exterior , while for buildings apart a couple here and there of farms I mostly used my own custom textures , befoure creating the lods and let the ck do this atlas,

Do I have to create a miniatlas for my buildings with not tiling textures to be used as source texture for the lods? Do I have to make 256x256 each small texture , as walls , roof , dors etc... or inside that square place all of the building textures ?

Sems like some of those lod textures are rendered out of the main high level model into the low level one , because there are shades , vertex colors and texture arrangement only visible ingame .

Link to comment
Share on other sites

UV of LOD textures should not wrap. CK will complain if UV coordinates are <0 or >1

You do not have to create a mini atlas for your LOD meshes, but you will quickly run out of space in the atlas CK creates. Just have a look at the vanilla LODs for buildings how they are done.

Render in orthographic view to create textures of a site of a buildings for example.

Link to comment
Share on other sites

Zilav, I came across another LODGen.exe crash, but it isn't its fault

 

I tested a mod with lod_flat trees and one of them had "BS Num UV sets" set to 1 instead of the normal 4097 and when it was used for object LOD it would cause LODGen to crash.

My understanding is that it should always be set to 4097 for Skyrim but I may be wrong. In any case neither nifskope cared and nifconvert didn't "fix" it either. Maybe LODGen can ignore wrong values to be more resilient.

 

I will try to notify the creator nonetheless.

Link to comment
Share on other sites

UV of LOD textures should not wrap. CK will complain if UV coordinates are <0 or >1

You do not have to create a mini atlas for your LOD meshes, but you will quickly run out of space in the atlas CK creates. Just have a look at the vanilla LODs for buildings how they are done.

Render in orthographic view to create textures of a site of a buildings for example.

You mean ingame ? Because if I pick a texture from there would look different than ingame and the same if I render it from a 3d tool as lghtning would be different ...
Link to comment
Share on other sites

Isnt there a way to project the texture from high res model to the low res one in niftool or similar way? So that it just picks the texture tile , the vertex coloring and combines them together in an orthographic projection?

Link to comment
Share on other sites

For objects LOD creation, you can affect 'simplified' meshes with lesser and lesser polys respectively for levels 0, 1, 2, and 3. The more an object is far from the player (ingame) and the more the engine will use a simple model. AFAIK, level 3 is totally unused by the vanilla game. Basically, level 0 meshes will be used by the CK for yourworldspace.4.x.y.bto files generation, level 1 meshes (if filled) for yourworldspace.8.x.y.bto files, and level 2 meshes (if filled) for yourworldspace.16.x.y.bto files.

 

 yourworldspace.16.x.y.bto files are the ones displaying in the world map. The dlc2solstheimworld.16.0.0.bto file from the UDBP contains the map model for the temple of Miraak, for example. But the general same area from the dlc2solstheimworld.8.8.8.bto file shows more detailed stuff (mainly mountains blocks), and the most detailed dlc2solstheimworld.4.12.12.bto file is even more detailed with the 2 big arches present on the stairs in front of the temple. Basically, it depends on what you want to be displayed from 3 specifc ranges.

 

Anyway, Skyrim and Solstheim are very 'bushy' and 'mountainous' areas. Very few material can be seen from large distances, and that's why few objects have 'very low-poly' meshes affected to LOD level 1, and even fewer to LOD level 2 (the map). The giant mushrooms from Solstheim can only be seen in dlc2solstheimworld.4.x.y.bto files, for example, and not further. It's a designers' clever choice to ease the engine burden, indeed. But keep in mind that only 1 LOD level for objects is often fairly enough, and nothing prevents you from affecting only 1 simplified mesh to all levels if you want. And it works perfectly fine ! :D

Link to comment
Share on other sites

what is  yourworldspace.16.x.y.bto 8 4 etc? and why those numeric valuse? do I neev to save like that files?

Those files are generated by CK from your lod meshes when you build objects lod. To have an idea of where different lod levels are relative to player, look at that picture.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...