Jump to content

[WIPz] TES5LODGen


zilav

Recommended Posts

You know the commands better than I :)

 

Anyhow, the next thing I discovered is, that LODGen.exe sets objsnow also when material is VolcanicSulfurCrystalsLite, maybe others as well but I haven't verified the exact circumstances.

 

I work around it by changing LODGen.pas to only write MAT to the LOD export file when it contains the word 'snow' as there are only LOD shaders for snow anyways.

 

Let me know if you need more info or test cases about this.

Link to comment
Share on other sites

  • Replies 140
  • Created
  • Last Reply

Top Posters In This Topic

  • zilav

    50

  • Sheson

    38

  • Prometheus

    22

  • Deathbydestiny

    4

Top Posters In This Topic

Posted Images

It writes objsnow when any material is set, and this is intended. It was the fist step at implementing materials in lod, and unfortunately the last for now.

Link to comment
Share on other sites

  • 4 weeks later...

It seems the main problem with this tool is the textures used for the LOD meshes. When you look at the CK atlas, its 2048x. Each square is either 256x or 128x. Its 20mb (HD texture pack), and its all that's required. More importantly, its one texture, one draw call to provide textures to many, many models. If you reduced the resolution of all the textures for models you are converting to LOD to ~128x, that would solve VRAM problems when using this tool. Then however, D3D9 is horribly inefficient at large quantities of individual textures. Draw Calls count will go through the roof with larger/dense worldspaces, which would definitely bog down Skyrim (D3D9 is horrible with its draw call limits, and Skyrim is a dense game).

 

An Atlas should seriously be considered for performance reasons. If anyone wants ever wants to generate a new, large worldspace, this tool is off limits. Anyone wants a dense, smaller worldspace with complete LOD, tool is off limits. Still, if you really wanted LOD for every object generated with this tool, it could be done for PC's with a beast CPU, an optimized driver (Nvidia atm is focusing on Draw call performance) and a strong GPU with a wide memory bus (256 bit+).

Link to comment
Share on other sites

Read second post. Not having an atlas is by design to overcome other lod limitations like tileable textures, anything else can be put on atlas manually. I mentioned that someone needs to create RAEVWD mod for Skyrim with manual built atlas to use this tool effectively on weaker hardware.

I regenerated lod for Skyrim and it works just fine on my GTX660Ti. By the end of year with the release of GTX 800 series this card will become a lower end segment.

Link to comment
Share on other sites

  • 2 weeks later...

It seems to me that tangents and bitangents need to be adjusted for rotation of objects? No matter the combinations of fix/generate tangents the mountains look really off from what CK does. Is this a known issues or am I missing something? If unclear I can provide screenshots and more info on request.
 
Also when selecting "remove unseen faces" it appears only triangles are removed but not the vertices? Could lower file size a tiny bit.

 

Not having an atlas doesn't seem to be much of a problem on modern hardware. I created over 800 new LOD objects so far resulting in the number of LOD objects generated by LODGen to increase from 14000 to 69000 for Tamriel and the only slowdowns I see are loading times. FPS seems to depend on triangles count these days.

post-2652-0-45788600-1407154643_thumb.gif
Click image for animated gif to see the difference, only lod level 4 generated.
 
Before you ask, yes there will be a release at some point. After summer probably. This will include a tes5edit script that adds the new lodfiles to the statics automatically. I am kind of hoping for a LODGEN update before fall to address the couple issues I reported so far  :)

Link to comment
Share on other sites

Pardon me for stupid questions, but TES5LODGen and LODGen are two different programs or something? I am really, really confused :D

Link to comment
Share on other sites

There is LODGen.pas that needs to be run from TES5Edit. It generates a textfile with all the lod objects for LODGen.exe.

The exe generates the BTO files based on the textfile from LODGen.pas and is started automatically by LODGen.pas. The exe can be executed from command prompt as well of course.

Link to comment
Share on other sites

Before you ask, yes there will be a release at some point. After summer probably. This will include a tes5edit script that adds the new lodfiles to the statics automatically. I am kind of hoping for a LODGEN update before fall to address the couple issues I reported so far  :)

Well, the author of lodgen is back and he knows about the current issues, just doesn't have time for updates atm. But I believe they will be fixed sooner or later.
Link to comment
Share on other sites

There is LODGen.pas that needs to be run from TES5Edit. It generates a textfile with all the lod objects for LODGen.exe.

The exe generates the BTO files based on the textfile from LODGen.pas and is started automatically by LODGen.pas. The exe can be executed from command prompt as well of course.

Ah ok, so it's all kind of part of TES5Edit. I think you were working on something yourself, though? I don't really understand these things, I just read something somewhere...

Link to comment
Share on other sites

Also when selecting "remove unseen faces" it appears only triangles are removed but not the vertices? Could lower file size a tiny bit.

Can you please upload a generated objects lod bto file with floating vertices?
Link to comment
Share on other sites

Well, the author of lodgen is back and he knows about the current issues, just doesn't have time for updates atm. But I believe they will be fixed sooner or later.

 

That is good news! :)

 

 

Ah ok, so it's all kind of part of TES5Edit. I think you were working on something yourself, though? I don't really understand these things, I just read something somewhere...

 

I also have a bunch of tes5edit/papyrus scripts that can switch dynamic lod objects depending on quests. It can cover a couple ships, hearthfire houses, fires etc. But first I need to get the static LOD done and create just a "few" more LOD meshes and work on some scripts to make it all more user friendly. All these thinks take an awful lot of time :)

 

 

Can you please upload a generated objects lod bto file with floating vertices?

 

Here is a zip with 2 BTO files, once with and once without the unseen faces. If you compare the objHD mountains you can see a reduced number of triangles while the vertices number stays the same.

https://mega.co.nz/#!ZFJ0TbZT!sAGTDjMZBsGiW1dqhV6e08zPVoCilE7mx-3Efz4r7B0

niftoaster reduces those and then some, but since it is unaware of certain BTO aspects it messes up the multibound settings so the BTO files become unusable.

Link to comment
Share on other sites

  • 5 weeks later...

I think LODGen.pas could use an option to skip all objects that have the neverfade flag set.

 

When LODGen.pas is executed the enabled neverfades are presumable intentional by the mods in the load order and thus no static LOD should be generated for these objects.

 

 

I also have another question: is it OK to use "uses LODGen;" in my own TES5Edit script and use its procedures, functions and options form?

I have a script that among other things adds new/updated LOD nifs to the statics as override records and then calls LODGen.pas to process the world and execute LODGen.exe

This allows for a single script doing things pre and after LODGen in one go. Obviously all kinds of credit will be given.

 

Thanks

Sheson

 

Link to comment
Share on other sites

I think LODGen.pas could use an option to skip all objects that have the neverfade flag set.

Then better to always skip them, not optionally. I'll update lodgen script.

Yes, you can use it freely as you want. All scripts shipped with xEdit are free to use and modify.

Link to comment
Share on other sites

Then better to always skip them, not optionally. I'll update lodgen script.

Makes sense.

Yes, you can use it freely as you want. All scripts shipped with xEdit are free to use and modify.

Great, just wanted to make sure. Thanks

Link to comment
Share on other sites

Regarding the never fade flag, check the reference instead of the base element. In fact neverfade only really works reliable when the reference is persistent, so it could AND check for both flags.

 

 

LODGen.exe should carry over the SLSF2_Double_Sided flag from the nif. I checked by setting it manually in a BTO file and it worked with Skyrim. lod_flat trees use it for example.

Link to comment
Share on other sites

Regarding the never fade flag, check the reference instead of the base element. In fact neverfade only really works reliable when the reference is persistent, so it could AND check for both flags.

 

Ok.

 

LODGen.exe should carry over the SLSF2_Double_Sided flag from the nif. I checked by setting it manually in a BTO file and it worked with Skyrim. lod_flat trees use it for example.

Nice catch, but are there any lod models in Skyrim that uses that besides trees which are not a part of objects lod?
Link to comment
Share on other sites

 

Nice catch, but are there any lod models in Skyrim that uses that besides trees which are not a part of objects lod?

 

I didn't see any default LODs using it. Dragonborn has this one tree dlc2lodtreepineheavysnow.nif that is done as object, but it doesn't use the flag either. It has the extra triangles on all sides.

It seems supporting the flag would be an extra feature like the textures. I could make use of it beyond trees for some objects I already created LOD for, woven fence for example.

 

My upcoming project supports trees as objects. This way it becomes "easy"  to have lod for a handful of trees a mod like 'cutting room floor' adds around a farm for example.

Unless I am missing something CK tree lod only supports trees that are straight up, no rotation. So fallen or trees growing at angles are problematic too and can be covered by object lod.

Until the flag is supported it works with lod_flat trees that have all sides, but it basically means double the triangles :)

Link to comment
Share on other sites

Trees LOD has randon angles to avoid repetitiveness and different shading compared to objects. Making them as objects lod causes a big drop in quality afaik.

Link to comment
Share on other sites

Lets work on TES5TreeGen after LODGen is finished then :)

Making Trees LODGen is quite simple actually since lod files are just a binary arrays of data, and they are mostly decoded

http://forums.bethsoft.com/topic/1368378-tree-lod-btt-files-%E2%80%93-finding-a-solution-to-wall-of-trees-32-cell-problem/

The only problem is that LST file is not fully decoded yet, at least I didn't see any new threads on that topic.

Link to comment
Share on other sites

Making Trees LODGen is quite simple actually since lod files are just a binary arrays of data, and they are mostly decoded

http://forums.bethsoft.com/topic/1368378-tree-lod-btt-files-%E2%80%93-finding-a-solution-to-wall-of-trees-32-cell-problem/

The only problem is that LST file is not fully decoded yet, at least I didn't see any new threads on that topic.

 

I updated the thread with what I know :)

Link to comment
Share on other sites

Thanks, very interesting. Making trees lodgen won't be a big trouble, however it won't bring anything new either. The current method of CK + BTT patcher gives the same results.
The biggest problem of trees lod in Skyrim is premade atlas, which makes any mods that alters trees incompatible.
_lod_flat.nif files are only needed as a placeholder for width, height and UVs, and those values can be stored elsewhere. Having lod image for each tree in a separate resource file will make UVs obsolete and allow in theory to build dynamic lod with autogenerated atlas for any combination of mods.
Just throwing some random ideas around :geek:

Link to comment
Share on other sites

I like the idea to able to create tree lod at the same time as object lod based on current load order...  and yes it seems almost straight forward to export the tree data just the same as LODGen.pas does for LODGen.exe or (after a quick look at the tree lod patcher) even write the LST, BST directly from a pas, though it might be a bit slow  :)

 

There is the texture atlas command line tool from nvidia https://developer.nvidia.com/legacy-texture-tools which supposedly combines images into one texture.

 

Creating single "source" textures for the default trees should not be that hard either.

Anybody else who creates custom trees kind of needs to create a lod texture anyhow.

Gathering/providing the 6 data points of a tree for the LST by hand one time seems doable too

 

But really, I need to focus on my object LOD project for now. I promise it will be jaw dropping. No kidding :)

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...