Jump to content
  • 0

Building Custom LODs - Exterior Structures/Objects


TechAngel85

Question

I'm really not understanding how to build custom LODs for mods reading the documentation. Lets set up a specific scenario I am needing this for:

 

I have a mod that adds structures (houses, bridges, objects, landscape edits, etc) to the Tamriel worldspace. What is the best method for ensuring all these exterior additions and edits are picked up by DynDOLOD? Should LOD be generated in the CK? using DynDOLOD? TES5LODGen? :confusion: From the information I found, it would seem the CK is best suited for this, but the information isn't coming across with a solid method.

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

TES5LODGen replaces CK tree and object LOD generation and makes it easier. From now on I will refer to xLODGen - which will mean the latest version of xEdit.exe either renamed to TES5LODGen.exe or SSELODGen.exe.

 

For LOD generation with either CK/xLODGen the base record of the references needs to define LOD models for the different LOD levels in order for the reference to get a LOD representation when LOD is generated. The base record also needs to have the Has Distand LOD flag set.

 

59721-0-1502618418.png59721-1-1502618417.png59721-2-1502618415.png

 

Note that Skyrim (CK/xLODGen/DynDOLOD) does not use LOD level 3 (LOD32) for object LOD, so no need to define that slot, but it doesn't hurt either.

 

For DynDOLOD, the defined LOD levels are only a fallback. It first tries to match LOD models to objects based on their full model filename, second it tries to match mesh rules and third uses defined LOD levels. How all that works, is explained in DynDOLOD_Mod_Authors.html.

 

So if you care about the mod working with xLODGen generation, you need to make sure the LOD levels are defined on the base records. This also works for DynDOLOD, but it will prefer filename and rule matching.

 

If you want to include any pre-made LOD in a mod, there are quite a few things to consider, but I am not sure if that is what you want, or just make sure the mod works with xLODGen/DynDOLOD.

Edited by sheson
Link to comment
Share on other sites

  • 0

TES5LODGen replaces CK tree and object LOD generation and makes it easier. From now on I will refer to xLODGen - which will mean the latest version of xEdit.exe either renamed to TES5LODGen.exe or SSELODGen.exe.

 

For LOD generation with either CK/xLODGen the base record of the references needs to define LOD models for the different LOD levels in order for the reference to get a LOD representation when LOD is generated. The base record also needs to have the Has Distand LOD flag set.

 

59721-0-1502618418.png59721-1-1502618417.png59721-2-1502618415.png

 

Note that Skyrim (CK/xLODGen/DynDOLOD) does not use LOD level 3 (LOD32) for object LOD, so no need to define that slot, but it doesn't hurt either.

 

For DynDOLOD, the defined LOD levels are only a fallback. It first tries to match LOD models to objects based on their full model filename, second it tries to match mesh rules and third uses defined LOD levels. How all that works, is explained in DynDOLOD_Mod_Authors.html.

 

So if you care about the mod working with xLODGen generation, you need to make sure the LOD levels are defined on the base records. This also works for DynDOLOD, but it will prefer filename and rule matching.

 

If you want to include any pre-made LOD in a mod, there are quite a few things to consider, but I am not sure if that is what you want, or just make sure the mod works with xLODGen/DynDOLOD.

Thank you! That was more informative than anything I've read so far. This end result I'm wanting is two fold:

The mod adds a house onto the side of a mountain. In doing this it reshapes the landscape and adds objects into the Tamriel worldspace. All assets are vanilla. No custom meshes.

  1. I want the house to be visible in-game from a distance...by default. I'm fairly sure this means having LODs included with the mod or possibly BTO files for the regenerated landscape (I'm assuming that can only be done in the CK). Unless simply setting the "Has Distant LOD" flags up will accomplish this goal?
  2. I'm also wanting this to be compatible with the entire DynDOLOD process which includes running xLODGen so the user's installed textures will be used.
Link to comment
Share on other sites

  • 0

1. If the plugin changes landscape/terrain, especially the terrain height, then you should generate terrain LOD with either CK or OscapexLODGen. Oscape may produce buggy terrain meshes with sheer drops in height. If that is the case try to EMSify the plugin just for generation.
Once terrain LOD is generated, just pick the Data\Meshes\terrain\tamriel\tamriel.*.btr and Data\Textures\terrain\tamriel\tamriel.*.dds from the area of your house (CK offers generating specific chunks I believe to save some time). For terrain LOD, I would only include LOD level 4 and maybe 8, as 16/32 affect a much larger area and the map, which is probably not needed.

To include object LOD, either use CK or xLODGen. DynDOLOD is intended to generate LOD for entire worldspaces. I will talk about both xLODGen and CK, but first we need to talk about the object LOD texture atlas.

Before generating object LOD with CK/xLODGen I suggest to install the fixed vanilla "data" from Skyrim Vanilla LOD Source Files v2.5 - no need for the "source" folder if generating LOD with xLODGen/DynDOLOD. DynDOLOD has the same fixes included, so there is no need for it, but in case it is installed, DynDOLOD Resources should overwrite it.

The problem with including object LOD for only a small area is, that it needs to either use the vanilla object LOD texture atlas, or its own atlas with a unique file name in order to be compatible with other mods. The object LOD BTO meshes support pointing to a different atlas texture. xLODGen/DynDOLOD both use a distinctive file name, which is different from vanilla. So, mixing only parts of their object LOD with vanilla object LOD is possible. Though, again, if you have another mod that tries to do the same, problems occur, as it would use the same unique filename from xLODGen, but the content will most likely be different.

xLODGen tries to use a custom atlas definition file (Edit Scripts\[game mode]-AtlasMap-[worldspace].txt, so for example Edit Scripts\TES5-AtlasMap-Tamriel.txt), when the option to build the texture atlas is not checked. This can be used to either generate object LOD that uses the vanilla atlas (I have yet to make the file for the vanilla atlas for TES5, for SSE they are already included in latest xEdit), or generate object LOD with a unique atlas texture file name of your choosing.

When you generate LOD with xLODGen and the atlas build option is checked, afterwards there will be a Edit Scripts\LODGenAtlasMap.txt for the last generation. In order for future LOD generations to reuse the same atlas map file, rename LODGenAtlasMap.txt to TES5-AtlasMap-Tamriel.txt. To generate object LOD that use a unique atlas texture file name that only belongs to your mod, open the file in notepad and search and replace all occurrences of textures\terrain\[worldspace]\Objects\[worldspace]ObjectsLOD.dds, so for example from textures\terrain\Tamriel\Objects\TamrielObjectsLOD.dds to textures\terrain\Tamriel\Objects\MyAwesome-MOD-LOD-Atlas-Tamriel.dds. Then also rename the files in textures\terrain\[worldsapce]\objects\*.dds to match of course.

Now each new generation with build atlas not checked will use that atlas map file. I will try to create the vanilla atlas map files some time soon.

If using CK, you are forced to only create LOD that uses the vanilla texture atlas (which happens automatically if no new LOD models define new LOD textures), unless you want to replace the object LOD of the entire worldspace. In order for CK object LOD generation to create compatible object LOD, you always need to create object LOD for the entire worldspace. If you generate only specific chunks with CK, the generated texture atlas will only contain LOD textures that are used in these chunks. In any case, visually compare the generated atlas texture with the vanilla atlas texture, to make sure they match exactly. If any texture position is off or missing, the texture atlas does  not match and you will not be able to mix your LOD BTO files with vanilla LOD BTO files without either LOD having the wrong textures.

For CK to be able to generate object LOD, you need to install the "source" folder with the TGA textures from Skyrim Vanilla LOD Source Files v2.5.

 

Once you generated object LOD with CK/xLODGen just include the BTO LOD meshes of the area the mod changes and discard the others.

2. If the base record for the house already has LOD models defined, then nothing else needs to be done for xLODGen/DynDOLOD compatibility.




Disclaimer, there is a chance I am describing features of xEdit/xLODGen not available in the latest download. In case something doesn't work as described let me know.

If you need more detailed instructions how to actually use the tools, let me know.

Edited by sheson
Link to comment
Share on other sites

  • 0

Thanks for the details. It sounds like a bit of a process, but the LODs have been put on hold for a bit. I'm porting an old player home from classic to SSE. In doing so I've been finding a lot of things the author never addressed. I was hoping it would be a quick port and done...but I've spent the better part of the day correcting small issues in the CK, which eventually turns into several hours of editing and refining each time I open the mod up. :ermm:

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Guidelines, Privacy Policy, and Terms of Use.