Jump to content

Question

Posted (edited)

I am currently trying to use TES4LL and/or MPGUI with MO, but unfortunately I run into a bunch of problems.

 

The main problems I see so far, are:

- tes4ll_ultimate.bat does not create any meshes, only three empty folders

- the process of creating meshes with MPGUI crashes

 

Nexus user malonn also is currently trying to get those tools to work with Mod Organizer, but as it seems he has the exact same problems as I do.

 

I will now write a complete report on what I have found out until now, how I do things and where my problems are. I hope, that either Tannin or gruftikus, or the STEP community could help me out here.

 

=======================================================

 

First, in order to mod Oblivion, I searched around what I would need to do, how to do it and in particular, in which order. I come to the conclusion, that all necessary things should be done in this order:

 

- Sorting out mods I want to use (downloading & activating)

- Sorting the Loadorder via LOOT

-- Consider running Land Magic

- Run TES4ll - generating distant meshes for terrain

- Run TES4qLod (from within TES4ll) - generating textures for distant land meshes

- Run TES4ll_normalmaps

- Create the Bashed Patch with Wrye Bash

- Run TES4LODGen.exe (renamed TES5Edit.exe) - generating .lod files based on distant objects provided by mods and low poly distant object meshes ( _far.nif )

 

Instead of running the individual batch files of TES4ll one could also use MPGUI - Multi Purpose GUI.

 

 

But first, I tried to run TES4ll just by itself. So I downloaded it and extracted the content of the .7z archive into the following folder:

..\Steam\SteamApps\common\Oblivion\Data\..

 

I then opened MO and added tes4ll_ultimate.bat with the arguments -f "...,makemeshes,..." as an executable:

Image 1

 

When I now run "tes4ll_ultimate.bat" through MO, a dos window opens and the following happens:

Image 2

 

At the end there is the line: "Please close this window." So one would think that everything is done. I press enter and close that window. But, back in MO:

Image 3

 

Besides the three folders, no meshes have been created.

 

 

So, after that wasn't as successfull as I had hoped, I downloaded MPGUI.

 

 

I installed MPGUI outside of my Oblivion folder:

C:\Spiele\Modding\0_Programme\MPGUI

 

Spiele = Games

 

 

I then added MPGUI in MO as a new executable file:

Image 4

 

If I run it through MO I see this:

Image 5

 

File --> Open Batch... --> select "tes4ll_all.mpb" in:

C:\Spiele\Steam\SteamApps\common\Oblivion\Data\Ini\tes4ll

 

Once the .mpb file is opened .. and I have selected Oblivion under "Options - Game Mode - Oblivion" .. MPGUI looks like this:

Image 6

 

Now I can see, that basically none of my plugins are recognized by mpgui:

Image 7

 

.. and therefore I can't select any worldspaces in the next tab. If I rescan my plugins, and switch back to the first tab, I see that two new lines were added:

 

19 [Info] Reading esp/esm files from 'C:\Spiele\Modding\0_Programme\Mod_Organizer_Oblivion\mods\Bashed Patch'
20 [Info] Plugins.txt path is: 'C:\Users\NAME\AppData\Local\Oblivion\plugins.txt'
Line 19 - MPGUI falsely scans my "Bashed Patch" mods folder inside MO .. that's why it can't find any plugins.

Line 20 - The wrong plugins.txt is selected by MPGUI .. it should be the one in MO's folder:

C:\Spiele\Modding\0_Programme\Mod_Organizer_Oblivion\profiles\Default\plugins.txt

 

 

So here is my first conclusion .. the Bashed Patch must be deactivated within MO's mod list/left pane/installation order.

Image 8

 

Once I deactivated the Bashed Patch and run MPGUI once again, selected the "tes4ll_all.mpb" and the game mode Oblivion, I now could see this in the Plugins tab:

Image 9

 

I then selected all plugins, read the worldspace in the next tab, left everything else at it's default settings and switched over to the "Start Process" tab, where I clicked "Click me if you are ready".

Result: the tes4ll.exe crashes:

Image 10

 

 

After a bit of head-scratching I opened up the "mpgui_autoload.mpb" file with Notepad++, found in:

C:\Spiele\Modding\0_Programme\MPGUI\mpgui_autoload.mpb

 

 

Original:

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[_Autoload]
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

LogFile                   -value="$_workdir\mpgui.log"

## 1, 3, 4 reserved for Morrowind, Fallout 3 and FalloutNV


AddGame              -n=2 -name=Oblivion
SetGamePluginFile    -n=2 -value="$_appdata\Oblivion\plugins.txt"
SetGameSearchPattern -n=2 -value="oblivion"
SetGameStdWorldspace -n=2 -value="Tamriel"

AddGame              -n=3 -name=Fallout3
SetGamePluginFile    -n=3 -value="$_appdata\Fallout3\plugins.txt"
SetGameSearchPattern -n=3 -value="Fallout 3"
SetGameStdWorldspace -n=3 -value="Wasteland"

AddGame              -n=5 -name=Skyrim
SetGamePluginFile    -n=5 -value="$_appdata\Skyrim\plugins.txt"
SetGameSearchPattern -n=5 -value="skyrim"
SetGameStdWorldspace -n=5 -value="Tamriel"

;SetPath                  -value="$_workdir\ini\mpgui\"

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
GUIConsoleEcho -text="Autoload batch file loaded"
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

.. and changed a few things and also added two new lines:

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[_Autoload]
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

LogFile			   -value="$_workdirmpgui.log"

## 1, 3, 4 reserved for Morrowind, Fallout 3 and FalloutNV


AddGame	              -n=2 -name=Oblivion
SetGamePluginFile     -n=2 -value="C:\Spiele\Modding\0_Programme\Mod_Organizer_Oblivion\profiles\Default\plugins.txt"
SetGameSearchPattern  -n=2 -value="oblivion"
SetGameStdWorldspace  -n=2 -value="Tamriel"
GameMode		   -name=Oblivion
SetPath			   -value=C:\Spiele\Steam\SteamApps\common\Oblivion\Data\Ini\tes4ll\tes4ll_all.mpb

;AddGame	      -n=3 -name=Fallout3
;SetGamePluginFile    -n=3 -value="$_appdata\Fallout3\plugins.txt"
;SetGameSearchPattern -n=3 -value="Fallout 3"
;SetGameStdWorldspace -n=3 -value="Wasteland"

;AddGame	      -n=5 -name=Skyrim
;SetGamePluginFile    -n=5 -value="$_appdata\Skyrim\plugins.txt"
;SetGameSearchPattern -n=5 -value="skyrim"
;SetGameStdWorldspace -n=5 -value="Tamriel"

;SetPath		   -value="$_workdir\ini\mpgui"

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
GUIConsoleEcho -text="Autoload batch file loaded"
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Now, when I open MPGUI and click on "File --> Open Batch...", I can directly select the batch file "tes4ll_all.mpb", without the need to manually navigate to the correct folder. Once the file is selected, the Game Mode "Oblivion" is set automatically .. and Fallout3 and Skyrim are commented out within the code above, hence do not showup as alternatives within MPGUI.

 

 

But now comes my actual problem. If I now activate all plugins, read the worldspaces and want to "start the process" .. the "tes4ll.exe" still crashes.

 

.. hence, I currently am not able to create any meshes through neither TES4ll, nor MPGUI. And here I hope that someone could help me .. is there something I could do?

Edited by pStyl3
  • Answers 39
  • Created
  • Last Reply

Top Posters For This Question

Recommended Posts

  • 0
Posted (edited)

That I hope aswell, or that I have some magical idea that helps me to workaround these problems. :P I mean, both OBSE's + TES4LODGen's problems can be worked out under MO, even if it is a bit more complicated, so there should be something that could be done about TES4LL/MPGUI aswell. *fingers crossed*

 

 

I filled a new issue on Tannin's bug tracking site: #813

Edited by pStyl3
  • 0
Posted

tes4LL is pretty ridiculous though...

Meshes are easy and don't take long but Normal maps and terrain take forever outside mo...2-10 hrs

Mo would take upwards of double to triple the time and probably fail

  • 0
Posted

I was wondering if any more progress was made on this particular issue.  I've been trying out Oblivion with Mod Organizer and have had success with everything important except for tes4ll.  I'd like to be able to see my pretty lods rather than the ugly ones I currently see :(.

 

Artorius.

  • 0
Posted (edited)

I made a few comments on the issue #813 that I've opened on Tannins bugtracking site.

 

Then gruftikus wrote me via PM the following answer:

 

Hi,

 

ich habe mal kurz drübergeschaut (bin leider die ganze Woche am arbeiten). Generell müsste man alles, was mit MPGUI läuft, auch mit einem direkten Aufruf von tes4ll hinbekommen. MPGUI ist nur eine shell, die tes4ll aufruft. Man könnte also die Kommandozeile, die MPGUI produziert, einfach kopieren.

 

MPGUI setzt auch die Liste an mods zusammen, hier habe ich das glaube ich etwas eleganter gemacht und den Pfad zu dem plugin.txt wählbar gemacht. tes4ll macht das soweit ich mich erinnere, nicht. Wenn die Modliste leer ist, öffnet er die Windows-Registry, sucht den app-path und dort die Plugin-Daten. Ich selbst nutze MOM, der tauscht die Dateien aktiv aus.

 

Leider habe ich keine richtige Möglichkeit mehr die "alte" Version zu testen, ich arbeite ja schon seit 2 Jahren an einer neuen Version wo ich praktisch alles von vorne geschrieben habe. Ich weiss, viel zu lang schon....

 

Wenn diese Version fertig ist (leider hakt es noch an der Performance) dann kann ich sicherlich die eine oder andere Option einbauen...

 

"I took a quick look over it [this thread]. In general you should be able to run everything, that can be run with MPGUI, with a direct call from tes4ll aswell. MPGUI is only a shell that calls tes4ll. One could easily copy the command line that MPGUI produces.

 

MPGUI also puts together the list of mods, I believe I made the path to the plugin.txt choosable. tes4ll does not do this, if I remember correctly. If the modlist is empty, it opens the windows registry, searches the app-path and there the plugin-data. I myself use MOM, which exchanges the files actively.

 

Unfortunately I don't really have the possibility to test the "old" version anymore, as I work on a new version since 2 years, where I have rewritten practially everything. I know, way to long already..

 

Once the new version is ready (the performance isn't that good as of now), I can surely build in some options.."

 

------

 

 

Tannin also made this change with MO 1.2.12:

 

- fixed a stability problem with some oblivion tools

 

I am not 100% sure that he refers to TES4LL and MPGUI (I didn't ask) .. but I think that's most likely the case.

 

 

 

 

All that said, I haven't come around to test the changes yet .. but I surely will do that within the next days and will then post my findings here!

Edited by pStyl3
  • 0
Posted

Thanks for the reply!  Indeed I also spotted that in the nexus changelog and asked about it in the thread there.  Having tes4ll working properly will make MO more or less fully usable with all of Oblivion's tools.

 

It's also good to see that gruftikus is still working on the tool so hopefully we will see an even better tool :)

  • 0
Posted (edited)

Updated MO to version 1.2.14.

Updated xEdit to version 3.0.33 svn1839 (Link, so TES4Edit.exe as well as TES4LODGen.exe are up2date)

 

-----

 

TES4LL

 

Besides the mentioned circumstance - that, while the meshes ARE created (in contrary to the initial statement in this thread), these meshes are falsely placed inside the "Unofficial Oblivion Patch" mod folder Comparison - nothing has changed.

 

DOS Output - TES4LL (Pastebin)

 

So TES4LL seems to work under MO, though the meshes are still not placed inside Overwrite .. they still replace the "original" files inside the Unofficial Oblivion Patch .. and that is not good.

 

 

-----

 

MPGUI

 

Well .. I have good and bad news. Good one is, it worked two hours ago when I tried the mentioned process of Post #1. Bad news is, while changing absolutely NOTHING .. it stopped working for me once again. I changed nothing and is doesn't work anymore, I really don't know what suddely went wrong. Even restarting my PC now does not fix the problem. Anyway, step by step now.

 

 

...

 

So, after that wasn't as successfull as I had hoped, I downloaded MPGUI.

 

 

I installed MPGUI outside of my Oblivion folder:

C:\Spiele\Modding\0_Programme\MPGUI

 

Spiele = Games

 

 

I then added MPGUI in MO as a new executable file:

Image 4

 

If I run it through MO I see this:

Image 5

 

File --> Open Batch... --> select "tes4ll_all.mpb" in:

C:\Spiele\Steam\SteamApps\common\Oblivion\Data\Ini\tes4ll

 

Once the .mpb file is opened .. and I have selected Oblivion under "Options - Game Mode - Oblivion" .. MPGUI looks like this:

Image 6

 

Now I can see, that basically none of my plugins are recognized by mpgui:

Image 7

 

.. and therefore I can't select any worldspaces in the next tab. If I rescan my plugins, and switch back to the first tab, I see that two new lines were added:

19 [info] Reading esp/esm files from 'C:\Spiele\Modding\0_Programme\Mod_Organizer_Oblivion\mods\Bashed Patch'

20 [info] Plugins.txt path is: 'C:\Users\NAME\AppData\Local\Oblivion\plugins.txt'

Line 19 - MPGUI falsely scans my "Bashed Patch" mods folder inside MO .. that's why it can't find any plugins.

Line 20 - The wrong plugins.txt is selected by MPGUI .. it should be the one in MO's folder:

C:\Spiele\Modding\0_Programme\Mod_Organizer_Oblivion\profiles\Default\plugins.txt

 

 

So here is my first conclusion .. the Bashed Patch must be deactivated within MO's mod list/left pane/installation order.

Image 8

 

Once I deactivated the Bashed Patch and run MPGUI once again, selected the "tes4ll_all.mpb" and the game mode Oblivion, I now could see this in the Plugins tab:

Image 9

 

I then selected all plugins, read the worldspace in the next tab, left everything else at it's default settings and switched over to the "Start Process" tab, where I clicked "Click me if you are ready".

Result:  the tes4ll.exe crashes:

Image 10

 

All that is still the way I do things.

- First deactivate the Bashed Patch

- then open MPGUI from MO 1.2.14

- select "tes4ll_all.mpb"

- select all my plugins

- read the worldspaces

- goto "Start Process" and select "Click me if you are ready"

 

Plugins - Worldspace - LOD Meshes - Normal Maps - Color Maps - Start Process

 

The process worked when I tried it first two hours ago: MPGUI - Output (Pastebin)

MPGUI crashed on exit, but that wasn't a problem .. the new files were placed in Overwrite .. great!

 

The folder structure ..Meshes\LandscapeLOD..  wasn't there by default, but that can be made manually with the now newly created meshes inside Overwrite.

 

So I now changed the "Mid Resolution" inside MPGUI to "Ultimate Resolution", once again the process finished, (MPGUI crashes on exit, again no real problem), the files showed up in Overwrite .. and now I have a correct "mod" in MO containing the new meshes, Link.

 

 

--

So far so good .. but from now on MPGUI always crashes with the same message as before: Image 10 once I click on "Click me if you are ready", regardless what I do (and again, I don't know what I could possibly have changed ....). It's now all the same once again, if I try to create meshes, use the inbuild TES4qLod function or try to create Normal Maps .. it always crashes.

 

 

 

So yeah .. hurray that a solution comes within reach  ::):  .. unfortunately we aren't really there yet.

Edited by pStyl3
  • 0
Posted

I've been lurking on this topic for the past few days.  I just wanted to say thanks, pStyl3, for trying to figure out how to get TES4LL working for all of us MO users and for giving me some ideas to try which eventually got it mostly working on my computer.

I couldn't get MPGUI to work at all so I gave up on using that, but the batch files that came with TES4LL worked for me (after a few edits).  Here's what I did to get TES4LL mostly working on my computer (I'll explain what I mean by "mostly working" a little farther down).

Note: The filepaths that I use below are based on where I installed Mod Organizer to.  You'll just need to substitute the paths given with where your MO is installed.

  • "Install" TES4LL directly to the actual game data folder.
  • [Recommended but Optional] Open Inites4ll and make a copy of the tes4ll_all.mpb file.
  • Edit the tes4ll_all.mpb file in your favorite plain text editor (I use Notepad++) with the following edits:

[Optional] New Line 19

LogFile -value="G:Mod OrganizerOblivionmodsTES4LLtes4ll.log"

Note: This edit may be optional, but all other line numbers will expect that this line was added.

This line just adds a log file so you can piece apart exactly what the program is doing in case you encounter problems.

 

--

Line 38 - Change

@overwritelods SetOption -installdirectory="$_gamedirDataTextureslandscapelodgenerated"

to

@overwritelods SetOption -installdirectory="G:Mod OrganizerOblivionmodsTES4LLTextureslandscapelodgenerated"

--

Line 68 - Change

@makenormalmaps @overwritelods SetOption -installdirectory="$_gamedirDataTextureslandscapelodgenerated"

to

@makenormalmaps @overwritelods SetOption -installdirectory="G:Mod OrganizerOblivionmodsTES4LLTextureslandscapelodgenerated"

--

Line 78 - Change

@writeout SetOption -installdirectory="$_gamedirData"

to

@writeout SetOption -installdirectory="G:Mod OrganizerOblivionmodsTES4LL"

--

Line 90 - Change

@overwritelods SetOption -installdirectory="$_gamedirDataMeshesLandscapeLOD"

to

@overwritelods SetOption -installdirectory="G:Mod OrganizerOblivionmodsTES4LLMeshesLandscapeLOD"

4. In MO, add new program shortcuts for the following:

  • TES4LL, "[Game Directory]Datates4ll_ultimate.bat" (or either of the other two: midres or hires)
  • TES4LL - Normal Maps, "[Game Directory]Datates4ll_normalmaps.bat"

Note: Don't forget to replace "[Game Directory]" with the path to your actual Oblivion game directory.

[Optional] You can add one more program shortcut if you like:
TES4LL - TES4qLOD, "[Game Directory]Datates4ll_tes4qlod.bat"
But this will not work (yet).  For some reason, even with the edits we made to tes4ll_all.mpb, it still tries to write all of its "partial" files to the Overwrite mod.  This is a problem since it causes MO to quickly run out of space and it can't complete.

 

5. Run your new TES4LL and TES4LL - Normal Maps program shortcuts through MO.  When finished you'll notice a new "Mod" added to your list called "TES4LL" which will contain all of the new textures and meshes.

 

Why this edit works:  TES4LL suffered from essentially the same problem that TES4LODGen had with MO.  When mods add data to the Overwrite mod, MO doesn't release the resources those files used.  This isn't a problem for most programs, but when textures and meshes are involved more than likely there will be troubles.  TES4LODGen's newest update allowed a new command line switch to specify where the files were placed which fixed the problem since no files were being written to the Overwrite mod.  Our edits to tes4ll_all.mpb are actually specifying a place other than Oblivion's "Data directory" (the Overwrite mod) to export the files to.

 

I tried to figure out how to get TES4qLOD's "partials" to go into a temporary folder too, but there's no way to specify this.  I downloaded the standalone TES4qLOD mod (https://www.nexusmods.com/oblivion/mods/42473) to look at the source code and see if I could figure out how to tell it where to save to.  I probably could, but I came to two road blocks: I don't know C and I don't know how to compile C.  I could probably step through it and figure out how to get what I need done in C, but the whole compile thing sounded tough (I'm a web developer, not an application programmer).  I might look at it later, but for now I'm happy with my noise replacer for LOD textures (https://www.nexusmods.com/oblivion/mods/9952 I use medium or strong personally).

Well I hope this helps someone to use TES4LL since it does make the LOD land look so very much better.

Happy modding!

~Ari

  • 0
Posted (edited)

Ah well I guess I'll have to make do with not having tes4ll for the moment.  Thanks for trying anyway.

 

I've been lurking on this topic for the past few days.  I just wanted to say thanks

 

No problem. ::):

 

-----

 

I have now reinstalled TES4LL and MPGUI completely, to see whether or not that could reactivate my ability to use MPGUI through MO .. it didn't. As of now MPGUI doesn't work for me, and I still don't know why or how it worked two days ago. Very strange.

 

 

@ sirenAri

Wow, thanks a lot! I have gone through your post and can basically confirm everything of it. So, while I also use Notepad++, I changed the content of tes4ll_all.mpb as you said:

 

Original:

 

 

[tes4ll]

 

; ============================

; Optional pedestal walls

; Requires more triangles!

; Enable this only if you want to exchange or overwrite single quads

; Not required if you rerun tes4ll after landscape changes

; Read the manual for more info

; SetOption -createpedestals

; ============================

 

; ============================

; Optional 16 bit matrices (no 32-bit floats)

; enable this only if the tes4ll task exceeds 3GB

; and you have a crash

; SetOption -use16bit

; ============================

 

@testmode SetPath -value="$_gamedirData"

@use16bit SetOption -use16bit

 

@_worldspaceid SetOption -worldspaceid=$_worldspaceid

@c_nconvert SetOption -ddstool="nconvert.exe -out dds"

@c_dxt1 SetOption -ddstool="nvdxt -dxt1c -file"

@c_8888 SetOption -ddstool="nvdxt -u8888 -file"

@c_none SetOption -ddstool=""

 

SetOption -minheight="-2048"

@minheight SetOption -minheight="$minheight"

 

ParseModList ; reads mod list from Plugins.txt (or from -l option) and sets the flags

 

; ****************************

; Make color maps

; ****************************

 

@overwritelods SetOption -installdirectory="$_gamedirDataTextureslandscapelodgenerated"

SetFlag -name=tes4qlod_flag_a -value=""

@option_blending SetFlag -name=tes4qlod_flag_a -value="-a"

SetFlag -name=tes4qlod_flag_f -value=""

@option_map SetFlag -name=tes4qlod_flag_f -value="-f"

SetFlag -name=tes4qlod_flag_q -value="-q 1"

@qlod2 SetFlag -name=tes4qlod_flag_q -value="-q 2"

@qlod4 SetFlag -name=tes4qlod_flag_q -value="-q 4"

SetFlag -name=tes4qlod_flag_D -value=""

@!overwritelods SetFlag -name=tes4qlod_flag_D -value="-D"

SetFlag -name=tes4qlod_flag_B -value=""

@c_none SetFlag -name=tes4qlod_flag_B -value="-B"

 

 

@tes4qlod @option_silent CallTes4qlod -options="$tes4qlod_flag_q $tes4qlod_flag_f $tes4qlod_flag_a $tes4qlod_flag_D $tes4qlod_flag_B" -silent

@tes4qlod @!option_silent CallTes4qlod -options="$tes4qlod_flag_q $tes4qlod_flag_f $tes4qlod_flag_a $tes4qlod_flag_D $tes4qlod_flag_B"

 

 

@!makemeshes @!makenormalmaps @!writeout Exit

 

; ****************************

; Make normal maps

; ****************************

 

@!2048 GenerateHeightmap -n=1

@2048 GenerateHeightmap -n=2

 

@makenormalmaps @lodshadows SetOption -lodshadows -zboost=4.0

@makenormalmaps @!lodshadows SetOption -zboost=$z_val

@makenormalmaps @512 SetOption -bmpscaling=0.5

@makenormalmaps @overwritelods SetOption -installdirectory="$_gamedirDataTextureslandscapelodgenerated"

@makenormalmaps WriteAllQuads -writenormalmap

 

; ****************************

; Generate final heightmap

; ****************************

 

@2048 GenerateHeightmap -n=1 -quick ;;reread standard resolution

; fixes bug in Valenwood-Elsweyr patch

 

@writeout SetOption -installdirectory="$_gamedirData"

@writeout WriteAll -writeheightmap

 

; ****************************

; Make meshes

; ****************************

 

@!makemeshes Exit

;;@!notesannwyn CallTesannwyn

;;@!notesannwyn ReadHeightmap -n=1

;;@notesannwyn GenerateHeightmap -n=1

 

@overwritelods SetOption -installdirectory="$_gamedirDataMeshesLandscapeLOD"

@ultimate SetOption -useshapes

@useshapes SetOption -useshapes

 

 

; ============================

; Step 1:

; Set single custom points

; With the console command "tdt" coordinates of critical points

; can be obtained and added in this section:

; ============================

 

 

@usedatafiles ReadDataFile -filename=inites4llRumareCoastLine.dat

@usedatafiles ReadDataFile -filename=inites4llWeyeNorth_FortEmpire.dat

@usedatafiles ReadDataFile -filename=inites4llWeyeWaynet.dat

@usedatafiles ReadDataFile -filename=inites4llWeye_FortAsh.dat

@usedatafiles ReadDataFile -filename=inites4llFortEmpire_Aleswell.dat

@usedatafiles ReadDataFile -filename=inites4llWayToCheydinhal.dat

@usedatafiles ReadDataFile -filename=inites4llFortUrasekToBridge.dat

@usedatafiles ReadDataFile -filename=inites4llFortUrasekToAleswell.dat

 

@xulRollingHills_EV.esp @usedatafiles ReadDataFile -filename=inites4llUL_RollingHills.dat

 

 

; ============================

 

 

; ============================

; Step 2:

; Set cell grid nodes (optional)

; NB: the DivideGrid commands sets vertices at the grid points anyhow.

; So it does not hurt to have the points in advance

; ============================

FocusAll ; use the entire worldspace

SetGrid -x=4096 -y=4096

@wallremover @ultimate SetOption -mindistance=100

@wallremover @ultimate @!small_world BreakAtGrid -x=4096 -y=4096 -max=80 -zmin=-200

@wallremover @ultimate @small_world BreakAtGrid -x=4096 -y=4096 -max=50 -zmin=0

@wallremover @high_res SetOption -mindistance=128

@wallremover @high_res @!small_world BreakAtGrid -x=4096 -y=4096 -max=150 -zmin=-200

@wallremover @high_res @small_world BreakAtGrid -x=4096 -y=4096 -max=130 -zmin=0

; ============================

 

 

; ============================

; Step 3:

; Set custom panorama view for better horizon

FocusAll

SetOption -mindistance=256

@usepanorama Panorama -x=0 -y=0 ;imperial city

@usepanorama Panorama -x=38520 -y=46880 ;university

@ElsweyrAnequina.esp @usepanorama Panorama -x=7410 -y=-157980 ;corinthe

; ============================

 

 

; ============================

; Step 4:

; Improve the coast line (optional)

; Comment the following lines, if the contour is not

; wanted.

; The quality is much better if the minimum distance is reduced

;

; Syntax: ContourLine -x= -y= -z= -offsetx= -offsety

; [-setmin] [-setmax]

; x,y are the grid pattern. If the contour line (at z)

; is bypassed, a linear interpolation is done to find (roughly)

; the contour point.

; setmin and setmax are optional flags which sets the vertices

; at the grid (x,y) in addition, for the lower and higher point, respectively.

; The offset(x,y) are the offset for the starting point

; Displaced offsets of the lower and upper contour lines

; produces a "zick-zack" line.

; ============================

FocusAll

SetOption -mindistance=128 ; 32

ContourLine -x=4096 -y=4096 -z=0 -offsetx=0 -offsety=0

 

ContourLine -x=512 -y=512 -z=100 -offsetx=0 -offsety=0 -findmax

ContourLine -x=512 -y=512 -z=-100 -offsetx=256 -offsety=256 -findmin

SetOption -mindistance=256 ;;; CS uses 1/16th of a cell = 256

; ============================

 

 

 

; ============================

; Step 5:

; Smooth the heighmap

; Avoids that the random points are triggered by local fluctuations

; Syntax: Filter -n=X

; with X as the distance

; Computing time goes quadratically with X

; ============================

@!small_world Filter -n=4 ; -n=4

@small_world Filter -n=3

; ============================

 

 

; ============================

; Step 6:

; Define the density algorithms for the

; random vertex points in Step 6

; ============================

; Each algorithm can be restricted to specific regions

; by the focus command:

; 1.) FocusAll

; 2.) FocusQuad -x=... -y=...

;

; ============================

FocusAll

 

AlgFirstOrder -add=0.2

@!small_world AlgSecondOrder -add=0.5

@small_world AlgSecondOrder -add=1

 

;improve mountain peaks by a factor of 5

@nicer_mountains @!small_world AlgPeakFinder -multiply=1 -radius=4096 -scanradius=8192 -lowest=4000 -maxval=1 -minval=0.2

@nicer_mountains @small_world AlgPeakFinder -multiply=1 -radius=4096 -scanradius=4096 -lowest=1000 -maxval=1 -minval=0.2 -linear

 

AlgSecondOrder -multiply=1

 

; Switch off sampling below the shore line:

AlgLayer -multiply=1 -lowest=-999999 -highest=-300 -minval=1 -maxval=0

; ============================

 

 

; ============================

; Step 7:

; Set the random points

;

; Very important: the Oblivion game engine has large

; limitations. At the end, the mesh of each quad must

; not have a number of vertices, triangles and points larger then 65535

;

; The focus command can be used, as described in Step 6,

; ============================

FocusAll

@mid_res SetMaxVerticesPerQuad -n=10000

@high_res SetOption -mindistance=200

@high_res @!small_world SetMaxVerticesPerQuad -n=13000

@high_res @small_world SetMaxVerticesPerQuad -n=20000

@ultimate SetOption -mindistance=200

@ultimate @small_world SetOption -mindistance=128

@ultimate @!small_world SetMaxVerticesPerQuad -n=18000

@ultimate @small_world @_worldspace=DibellasWatch SetMaxVerticesPerQuad -n=30000

@ultimate @small_world @!_worldspace=DibellasWatch SetMaxVerticesPerQuad -n=25000

; ============================

 

 

; ============================

FocusAll

MakeTriangulation

FocusAll

DivideGrid -x=4096 -y=4096

; ============================

 

 

; ============================

;WriteQuad -x=00 -y=00 -tex=60.00.00.32.dds

;WriteQuad -x=00 -y=00 -ps

;WriteQuad -x=0 -y=0

WriteAllQuads

; ============================

 

; ****************************

[mpgui]

; ****************************

 

GUIRequestVersion -value="1.22"

 

@!tes4ll_doonce GUITab -help="Options for mesh generation" -text="LOD Meshes" -name=tes4ll_gui

@!tes4ll_doonce GUITab -help="Normalmaps" -text="Normal Maps" -name=tes4llnm_gui

@!tes4ll_doonce GUITab -help="Options for Lightwave's TES4qLOD" -name="tes4qlod_gui" -text="Color Maps"

@!tes4ll_doonce GUITab -help="Start process here" -name="final_gui" -text="Start Process"

 

@!tes4ll_doonce GUIConsoleEcho -text="Tes4ll batch file for Tamriel loaded"

SetFlag -name=tes4ll_doonce -hidden

 

SetOption -noskipinfo ;avoid nasty skip messenges in loop mode

 

; ****************************

[final_gui]

; ****************************

 

## makes sure that tab is disabled if no worldspace is selected:

GUIEnable -name=final_gui

@!_worldspace GUIDisable -name=final_gui

 

GUITextBox -text="If you have selected all previous options, you can continue here..." -name=final_gui_intro -vdist=10

 

 

GUITextBox -text="General options" -name=tes4ll_text2 -vdist=10

 

## A checkbox for a basic question:

GUICheckBox -name=overwritelods -text="Overwrite the original files (please make a backup before checking this option)" -help="You have to check this option if tes4ll should place the new files in the LOD directories."

GUIEnable -name=overwritelods

@!makemeshes @!makenormalmaps @!tes4qlod GUIDisable -name=overwritelods

 

GUICheckBox -name=use16bit -text="Use 16 bit derivative matrices" -help="Only slightly more unprecise, but saves 2x memory. Use this for large worlds like Onras heightmaps of Tamriel"

GUIEnable -name=use16bit

@!makemeshes GUIDisable -name=use16bit

 

GUITextBox -text="Minimum height" -name=min_height_intro -width=0.30 -vdist=10

GUITextBox -text="-2048" -name=minheight -input -sameline -width=0.70 -help="Set a mimimum value for the heightmap, in particular for empty cells. Change this only if you know what you are doing."

 

GUICheckBox -name=writeout -text="Write heightmap as a 32-bit bmp file" -vdist=5

 

GUITextBox -text="Tool options" -name=tes4ll_text4 -vdist=10

 

GUIDropDown -name=flagnm_compression -vdist=5 -help="dds compression tool. The tool must be present in the Data directory."

GUIDropDownItem -parent=flagnm_compression -name=c_s3tc -text="Use S3TC.exe for DDS generation" -select

GUIDropDownItem -parent=flagnm_compression -name=c_nconvert -text="Use nconvert.exe for DDS generation"

GUIDropDownItem -parent=flagnm_compression -name=c_dxt1 -text="Use nvdxt with DDS DXT1 compression"

GUIDropDownItem -parent=flagnm_compression -name=c_8888 -text="Use nvdxt with uncompressed 8:8:8:8 DDS"

 

GUIDropDownItem -parent=flagnm_compression -name=c_none -text="<None> (needs other tool to convert bmp to dds)"

GUIEnable -name=flagnm_compression

@!makenormalmaps @!tes4qlod GUIDisable -name=flagnm_compression

 

 

 

## The final button. Once the button is clicked, the flag "exec_tes4ll" is set for one single run of this section

GUIButton -name=exec_tes4ll -text="Click me if you are ready" -vdist=30

GUIEnable -name=exec_tes4ll

@!makenormalmaps @!tes4qlod @!makemeshes @!writeout GUIDisable -name=exec_tes4ll

 

 

@exec_tes4ll @!overwritelods GUIMessageBox -title="Hint" -text="You have not selected the option to overwrite the original files. Do not forget to copy your files by hand to the appropriate place (or stop the process, and check the "overwrite" option)"

@exec_tes4ll @_worldspace GUIExec -exe="tes4ll.exe -f "$_flaglist" -w $_worldspace -l "$_modlist" " -dumpbatch

 

 

; ****************************

[tes4ll_gui]

; ****************************

 

## makes sure that tab is disabled if no worldspace is selected:

GUIEnable -name=tes4ll_gui

@!_worldspace GUIDisable -name=tes4ll_gui

 

GUITextBox -text="Select options for LOD mesh generation..." -name=tes4ll_gui_intro -vdist=10

 

## A checkbox for a basic question:

GUICheckBox -name=makemeshes -text="Make LOD meshes" -help="Check this if you want to create the LOD meshes" -select

 

GUITextBox -text="Options for vertices placement" -name=tes4ll_text1 -vdist=10

 

## A checkbox for a basic question:

GUICheckBox -name=nicer_mountains -text="Enable peak finder algorithm" -help="Enhances the quality of the mountains" -select

GUIEnable -name=nicer_mountains

@!makemeshes GUIDisable -name=nicer_mountains

 

## A checkbox for a basic question:

GUICheckBox -name=wallremover -text="Enable the cell grid boundary wall remover" -help="Enhances the near to far grid transition. Highly recommended" -select

GUIEnable -name=wallremover

@!makemeshes GUIDisable -name=wallremover

 

##

GUICheckBox -name=usedatafiles -text="Use Tamriel data files" -help="Use some hand-placed vertex points" -select

GUIEnable -name=usedatafiles

@!_worldspace=Tamriel GUIDisable -name=usedatafiles -unselect

@!_worldspace GUIEnable -name=usedatafiles -select

@!makemeshes GUIDisable -name=usedatafiles

 

##

GUICheckBox -name=usepanorama -text="Use Tamriel panorama points" -select

GUIEnable -name=usepanorama

@!_worldspace=Tamriel GUIDisable -name=usepanorama -unselect

@!_worldspace GUIEnable -name=usepanorama -select

@!makemeshes GUIDisable -name=usepanorama

 

## Add a drop down menu, first the parent:

GUIDropDown -name=flag_res -vdist=5 -help="Select your resolution"

## and now the items:

GUIDropDownItem -parent=flag_res -name=mid_res -text="Mid Resolution " -select

GUIDropDownItem -parent=flag_res -name=high_res -text="High Resolution"

GUIDropDownItem -parent=flag_res -name=ultimate -text="Ultimate Resolution"

GUIEnable -name=flag_res

@!makemeshes GUIDisable -name=flag_res

 

 

GUITextBox -text="Mesh options" -name=tes4ll_text3 -vdist=20

 

## A checkbox for a basic question:

GUICheckBox -name=useshapes -text="Use shapes instead of strips" -help="Faster generation, but needs more graphics card performance"

GUIEnable -name=useshapes

@ultimate GUIDisable -name=useshapes -select

@!makemeshes GUIDisable -name=useshapes

 

GUICheckBox -name=small_world -text="Use small world setup" -help="Try to further enhance the settings. Use this option only for small worldspaces which have about 2-4 quads"

GUIEnable -name=small_world

@!makemeshes GUIDisable -name=small_world

@_worldspace=Tamriel GUIDisable -name=small_world -unselect

 

 

; ****************************

[tes4llnm_gui]

; ****************************

 

## makes sure that tab is disabled if no worldspace is selected:

GUIEnable -name=tes4llnm_gui

@!_worldspace GUIDisable -name=tes4llnm_gui

 

GUITextBox -text="Select options for normal maps generation..." -name=tes4llnm_gui_intro -vdist=10

 

 

## A checkbox for a basic question:

GUICheckBox -name=makenormalmaps -text="Make normal maps" -help="Select this if you want to generate the normal maps"

 

###--------------------------------------------------------------

GUITextBox -text="Graphics options" -name=tes4llnm_text3 -vdist=10

 

GUIDropDown -name=flagnm_resnormal -vdist=5 -help="Select your texture resolution"

GUIDropDownItem -parent=flagnm_resnormal -name=512 -text="512x512"

GUIDropDownItem -parent=flagnm_resnormal -name=1024 -text="1024x1024" -select

GUIDropDownItem -parent=flagnm_resnormal -name=2048 -text="2048x2048"

GUIEnable -name=flagnm_resnormal

@!makenormalmaps GUIDisable -name=flagnm_resnormal

 

GUICheckBox -name=lodshadows -text="Fake shadows (can take a while)" -help="Tweaks the normap maps such to obtain the impression of landscape shadows" -vdist=5

GUIEnable -name=lodshadows

@!makenormalmaps GUIDisable -name=lodshadows

 

GUITextBox -text="z-Boost for non-faked normals" -name=tes4llnm_text3a -vdist=10

 

GUIDropDown -name=flagnm_zboost -vdist=5 -help="Boost factor for z"

GUIDropDownItem -parent=flagnm_zboost -name=z1 -text="Factor 1 (undistorted)"

GUIDropDownItem -parent=flagnm_zboost -name=z2 -text="Factor 2 (more contrast)" -select

GUIDropDownItem -parent=flagnm_zboost -name=z4 -text="Factor 4 (even more contrast)"

GUIEnable -name=flagnm_zboost

@lodshadows GUIDisable -name=flagnm_zboost

@!makenormalmaps GUIDisable -name=flagnm_zboost

 

@z1 SetFlag -name=z_val -value="1"

@z2 SetFlag -name=z_val -value="2"

@z4 SetFlag -name=z_val -value="4"

 

 

; ****************************

[tes4qlod_gui]

; ****************************

 

## makes sure that tab is disabled if no worldspace is selected:

GUIEnable -name=tes4qlod_gui

@!_worldspace GUIDisable -name=tes4qlod_gui

 

GUITextBox -text="Select options for color maps generation..." -name=tes4qlod_gui_intro -vdist=10

 

 

## A checkbox for a basic question:

GUICheckBox -name=tes4qlod -text="Make color maps (calls build-in TES4qLOD)" -help="Select this if you want to generate the color maps with TES4qLOD"

 

## Just some info:

GUITextBox -text="Please select what TES4qLOD should do" -name=tes4qlod_into -vdist=10

 

GUITextBox -text="Select resolution per quad:" -name=tes4qlod_into2 -vdist=10

 

## Add a drop down menu, first the parent:

GUIDropDown -name=tes4qlod_resolution -help="Select the resolution for a single quad (N.B. Vanilla has 512x512)" -vdist=3

## and now the items:

GUIDropDownItem -parent=tes4qlod_resolution -name=qlod1 -text="1024x1024 pixel [recommended]" -select

GUIDropDownItem -parent=tes4qlod_resolution -name=qlod2 -text="2048x2048 pixel"

GUIDropDownItem -parent=tes4qlod_resolution -name=qlod4 -text="4096x4096 pixel"

GUIEnable -name=tes4qlod_resolution

@!tes4qlod GUIDisable -name=tes4qlod_resolution

 

 

 

GUITextBox -text="Options:" -name=tes4qlod_into3 -vdist=10

 

## New blending flag

GUICheckBox -name=option_blending -text="Use layer blending" -help="Uses the opacity of the different layers for alpha blending" -select

GUIEnable -name=option_blending

@!tes4qlod GUIDisable -name=option_blending

 

 

## A flag about the total map:

GUICheckBox -name=option_map -text="Create full map of wordspace" -help="Creates a full map of your worldspace"

GUIEnable -name=option_map

@!tes4qlod GUIDisable -name=option_map

 

 

## Verbosity option of tes4qlod:

GUICheckBox -name=option_silent -text="Silent TES4qLOD" -help="Disables all the text output of tes4qlod"

GUIEnable -name=option_silent

@!tes4qlod GUIDisable -name=option_silent

 

 

 

 

 

Modified:

 

 

[tes4ll]

 

; ============================

; Optional pedestal walls

; Requires more triangles!

; Enable this only if you want to exchange or overwrite single quads

; Not required if you rerun tes4ll after landscape changes

; Read the manual for more info

; SetOption -createpedestals

; ============================

 

; ============================

; Optional 16 bit matrices (no 32-bit floats)

; enable this only if the tes4ll task exceeds 3GB

; and you have a crash

; SetOption -use16bit

; ============================

 

LogFile -value="C:\Spiele\Modding\0_Programme\Mod_Organizer_Oblivion\mods\TES4LL\tes4ll.log"

@testmode SetPath -value="$_gamedirData"

@use16bit SetOption -use16bit

 

@_worldspaceid SetOption -worldspaceid=$_worldspaceid

@c_nconvert SetOption -ddstool="nconvert.exe -out dds"

@c_dxt1 SetOption -ddstool="nvdxt -dxt1c -file"

@c_8888 SetOption -ddstool="nvdxt -u8888 -file"

@c_none SetOption -ddstool=""

 

SetOption -minheight="-2048"

@minheight SetOption -minheight="$minheight"

 

ParseModList ; reads mod list from Plugins.txt (or from -l option) and sets the flags

 

; ****************************

; Make color maps

; ****************************

 

@overwritelods SetOption -installdirectory="C:\Spiele\Modding\0_Programme\Mod_Organizer_Oblivion\mods\TES4LL\Textures\landscapelod\generated"

SetFlag -name=tes4qlod_flag_a -value=""

@option_blending SetFlag -name=tes4qlod_flag_a -value="-a"

SetFlag -name=tes4qlod_flag_f -value=""

@option_map SetFlag -name=tes4qlod_flag_f -value="-f"

SetFlag -name=tes4qlod_flag_q -value="-q 1"

@qlod2 SetFlag -name=tes4qlod_flag_q -value="-q 2"

@qlod4 SetFlag -name=tes4qlod_flag_q -value="-q 4"

SetFlag -name=tes4qlod_flag_D -value=""

@!overwritelods SetFlag -name=tes4qlod_flag_D -value="-D"

SetFlag -name=tes4qlod_flag_B -value=""

@c_none SetFlag -name=tes4qlod_flag_B -value="-B"

 

 

@tes4qlod @option_silent CallTes4qlod -options="$tes4qlod_flag_q $tes4qlod_flag_f $tes4qlod_flag_a $tes4qlod_flag_D $tes4qlod_flag_B" -silent

@tes4qlod @!option_silent CallTes4qlod -options="$tes4qlod_flag_q $tes4qlod_flag_f $tes4qlod_flag_a $tes4qlod_flag_D $tes4qlod_flag_B"

 

 

@!makemeshes @!makenormalmaps @!writeout Exit

 

; ****************************

; Make normal maps

; ****************************

 

@!2048 GenerateHeightmap -n=1

@2048 GenerateHeightmap -n=2

 

@makenormalmaps @lodshadows SetOption -lodshadows -zboost=4.0

@makenormalmaps @!lodshadows SetOption -zboost=$z_val

@makenormalmaps @512 SetOption -bmpscaling=0.5

@makenormalmaps @overwritelods SetOption -installdirectory="C:\Spiele\Modding\0_Programme\Mod_Organizer_Oblivion\mods\TES4LL\Textures\landscapelod\generated"

@makenormalmaps WriteAllQuads -writenormalmap

 

; ****************************

; Generate final heightmap

; ****************************

 

@2048 GenerateHeightmap -n=1 -quick ;;reread standard resolution

; fixes bug in Valenwood-Elsweyr patch

 

@writeout SetOption -installdirectory="C:\Spiele\Modding\0_Programme\Mod_Organizer_Oblivion\mods\TES4LL"

@writeout WriteAll -writeheightmap

 

; ****************************

; Make meshes

; ****************************

 

@!makemeshes Exit

;;@!notesannwyn CallTesannwyn

;;@!notesannwyn ReadHeightmap -n=1

;;@notesannwyn GenerateHeightmap -n=1

 

@overwritelods SetOption -installdirectory="C:\Spiele\Modding\0_Programme\Mod_Organizer_Oblivion\mods\TES4LL\Meshes\LandscapeLOD"

@ultimate SetOption -useshapes

@useshapes SetOption -useshapes

 

 

; ============================

; Step 1:

; Set single custom points

; With the console command "tdt" coordinates of critical points

; can be obtained and added in this section:

; ============================

 

 

@usedatafiles ReadDataFile -filename=inites4llRumareCoastLine.dat

@usedatafiles ReadDataFile -filename=inites4llWeyeNorth_FortEmpire.dat

@usedatafiles ReadDataFile -filename=inites4llWeyeWaynet.dat

@usedatafiles ReadDataFile -filename=inites4llWeye_FortAsh.dat

@usedatafiles ReadDataFile -filename=inites4llFortEmpire_Aleswell.dat

@usedatafiles ReadDataFile -filename=inites4llWayToCheydinhal.dat

@usedatafiles ReadDataFile -filename=inites4llFortUrasekToBridge.dat

@usedatafiles ReadDataFile -filename=inites4llFortUrasekToAleswell.dat

 

@xulRollingHills_EV.esp @usedatafiles ReadDataFile -filename=inites4llUL_RollingHills.dat

 

 

; ============================

 

 

; ============================

; Step 2:

; Set cell grid nodes (optional)

; NB: the DivideGrid commands sets vertices at the grid points anyhow.

; So it does not hurt to have the points in advance

; ============================

FocusAll ; use the entire worldspace

SetGrid -x=4096 -y=4096

@wallremover @ultimate SetOption -mindistance=100

@wallremover @ultimate @!small_world BreakAtGrid -x=4096 -y=4096 -max=80 -zmin=-200

@wallremover @ultimate @small_world BreakAtGrid -x=4096 -y=4096 -max=50 -zmin=0

@wallremover @high_res SetOption -mindistance=128

@wallremover @high_res @!small_world BreakAtGrid -x=4096 -y=4096 -max=150 -zmin=-200

@wallremover @high_res @small_world BreakAtGrid -x=4096 -y=4096 -max=130 -zmin=0

; ============================

 

 

; ============================

; Step 3:

; Set custom panorama view for better horizon

FocusAll

SetOption -mindistance=256

@usepanorama Panorama -x=0 -y=0 ;imperial city

@usepanorama Panorama -x=38520 -y=46880 ;university

@ElsweyrAnequina.esp @usepanorama Panorama -x=7410 -y=-157980 ;corinthe

; ============================

 

 

; ============================

; Step 4:

; Improve the coast line (optional)

; Comment the following lines, if the contour is not

; wanted.

; The quality is much better if the minimum distance is reduced

;

; Syntax: ContourLine -x= -y= -z= -offsetx= -offsety

; [-setmin] [-setmax]

; x,y are the grid pattern. If the contour line (at z)

; is bypassed, a linear interpolation is done to find (roughly)

; the contour point.

; setmin and setmax are optional flags which sets the vertices

; at the grid (x,y) in addition, for the lower and higher point, respectively.

; The offset(x,y) are the offset for the starting point

; Displaced offsets of the lower and upper contour lines

; produces a "zick-zack" line.

; ============================

FocusAll

SetOption -mindistance=128 ; 32

ContourLine -x=4096 -y=4096 -z=0 -offsetx=0 -offsety=0

 

ContourLine -x=512 -y=512 -z=100 -offsetx=0 -offsety=0 -findmax

ContourLine -x=512 -y=512 -z=-100 -offsetx=256 -offsety=256 -findmin

SetOption -mindistance=256 ;;; CS uses 1/16th of a cell = 256

; ============================

 

 

 

; ============================

; Step 5:

; Smooth the heighmap

; Avoids that the random points are triggered by local fluctuations

; Syntax: Filter -n=X

; with X as the distance

; Computing time goes quadratically with X

; ============================

@!small_world Filter -n=4 ; -n=4

@small_world Filter -n=3

; ============================

 

 

; ============================

; Step 6:

; Define the density algorithms for the

; random vertex points in Step 6

; ============================

; Each algorithm can be restricted to specific regions

; by the focus command:

; 1.) FocusAll

; 2.) FocusQuad -x=... -y=...

;

; ============================

FocusAll

 

AlgFirstOrder -add=0.2

@!small_world AlgSecondOrder -add=0.5

@small_world AlgSecondOrder -add=1

 

;improve mountain peaks by a factor of 5

@nicer_mountains @!small_world AlgPeakFinder -multiply=1 -radius=4096 -scanradius=8192 -lowest=4000 -maxval=1 -minval=0.2

@nicer_mountains @small_world AlgPeakFinder -multiply=1 -radius=4096 -scanradius=4096 -lowest=1000 -maxval=1 -minval=0.2 -linear

 

AlgSecondOrder -multiply=1

 

; Switch off sampling below the shore line:

AlgLayer -multiply=1 -lowest=-999999 -highest=-300 -minval=1 -maxval=0

; ============================

 

 

; ============================

; Step 7:

; Set the random points

;

; Very important: the Oblivion game engine has large

; limitations. At the end, the mesh of each quad must

; not have a number of vertices, triangles and points larger then 65535

;

; The focus command can be used, as described in Step 6,

; ============================

FocusAll

@mid_res SetMaxVerticesPerQuad -n=10000

@high_res SetOption -mindistance=200

@high_res @!small_world SetMaxVerticesPerQuad -n=13000

@high_res @small_world SetMaxVerticesPerQuad -n=20000

@ultimate SetOption -mindistance=200

@ultimate @small_world SetOption -mindistance=128

@ultimate @!small_world SetMaxVerticesPerQuad -n=18000

@ultimate @small_world @_worldspace=DibellasWatch SetMaxVerticesPerQuad -n=30000

@ultimate @small_world @!_worldspace=DibellasWatch SetMaxVerticesPerQuad -n=25000

; ============================

 

 

; ============================

FocusAll

MakeTriangulation

FocusAll

DivideGrid -x=4096 -y=4096

; ============================

 

 

; ============================

;WriteQuad -x=00 -y=00 -tex=60.00.00.32.dds

;WriteQuad -x=00 -y=00 -ps

;WriteQuad -x=0 -y=0

WriteAllQuads

; ============================

 

; ****************************

[mpgui]

; ****************************

 

GUIRequestVersion -value="1.22"

 

@!tes4ll_doonce GUITab -help="Options for mesh generation" -text="LOD Meshes" -name=tes4ll_gui

@!tes4ll_doonce GUITab -help="Normalmaps" -text="Normal Maps" -name=tes4llnm_gui

@!tes4ll_doonce GUITab -help="Options for Lightwave's TES4qLOD" -name="tes4qlod_gui" -text="Color Maps"

@!tes4ll_doonce GUITab -help="Start process here" -name="final_gui" -text="Start Process"

 

@!tes4ll_doonce GUIConsoleEcho -text="Tes4ll batch file for Tamriel loaded"

SetFlag -name=tes4ll_doonce -hidden

 

SetOption -noskipinfo ;avoid nasty skip messenges in loop mode

 

; ****************************

[final_gui]

; ****************************

 

## makes sure that tab is disabled if no worldspace is selected:

GUIEnable -name=final_gui

@!_worldspace GUIDisable -name=final_gui

 

GUITextBox -text="If you have selected all previous options, you can continue here..." -name=final_gui_intro -vdist=10

 

 

GUITextBox -text="General options" -name=tes4ll_text2 -vdist=10

 

## A checkbox for a basic question:

GUICheckBox -name=overwritelods -text="Overwrite the original files (please make a backup before checking this option)" -help="You have to check this option if tes4ll should place the new files in the LOD directories."

GUIEnable -name=overwritelods

@!makemeshes @!makenormalmaps @!tes4qlod GUIDisable -name=overwritelods

 

GUICheckBox -name=use16bit -text="Use 16 bit derivative matrices" -help="Only slightly more unprecise, but saves 2x memory. Use this for large worlds like Onras heightmaps of Tamriel"

GUIEnable -name=use16bit

@!makemeshes GUIDisable -name=use16bit

 

GUITextBox -text="Minimum height" -name=min_height_intro -width=0.30 -vdist=10

GUITextBox -text="-2048" -name=minheight -input -sameline -width=0.70 -help="Set a mimimum value for the heightmap, in particular for empty cells. Change this only if you know what you are doing."

 

GUICheckBox -name=writeout -text="Write heightmap as a 32-bit bmp file" -vdist=5

 

GUITextBox -text="Tool options" -name=tes4ll_text4 -vdist=10

 

GUIDropDown -name=flagnm_compression -vdist=5 -help="dds compression tool. The tool must be present in the Data directory."

GUIDropDownItem -parent=flagnm_compression -name=c_s3tc -text="Use S3TC.exe for DDS generation" -select

GUIDropDownItem -parent=flagnm_compression -name=c_nconvert -text="Use nconvert.exe for DDS generation"

GUIDropDownItem -parent=flagnm_compression -name=c_dxt1 -text="Use nvdxt with DDS DXT1 compression"

GUIDropDownItem -parent=flagnm_compression -name=c_8888 -text="Use nvdxt with uncompressed 8:8:8:8 DDS"

 

GUIDropDownItem -parent=flagnm_compression -name=c_none -text="<None> (needs other tool to convert bmp to dds)"

GUIEnable -name=flagnm_compression

@!makenormalmaps @!tes4qlod GUIDisable -name=flagnm_compression

 

 

 

## The final button. Once the button is clicked, the flag "exec_tes4ll" is set for one single run of this section

GUIButton -name=exec_tes4ll -text="Click me if you are ready" -vdist=30

GUIEnable -name=exec_tes4ll

@!makenormalmaps @!tes4qlod @!makemeshes @!writeout GUIDisable -name=exec_tes4ll

 

 

@exec_tes4ll @!overwritelods GUIMessageBox -title="Hint" -text="You have not selected the option to overwrite the original files. Do not forget to copy your files by hand to the appropriate place (or stop the process, and check the "overwrite" option)"

@exec_tes4ll @_worldspace GUIExec -exe="tes4ll.exe -f "$_flaglist" -w $_worldspace -l "$_modlist" " -dumpbatch

 

 

; ****************************

[tes4ll_gui]

; ****************************

 

## makes sure that tab is disabled if no worldspace is selected:

GUIEnable -name=tes4ll_gui

@!_worldspace GUIDisable -name=tes4ll_gui

 

GUITextBox -text="Select options for LOD mesh generation..." -name=tes4ll_gui_intro -vdist=10

 

## A checkbox for a basic question:

GUICheckBox -name=makemeshes -text="Make LOD meshes" -help="Check this if you want to create the LOD meshes" -select

 

GUITextBox -text="Options for vertices placement" -name=tes4ll_text1 -vdist=10

 

## A checkbox for a basic question:

GUICheckBox -name=nicer_mountains -text="Enable peak finder algorithm" -help="Enhances the quality of the mountains" -select

GUIEnable -name=nicer_mountains

@!makemeshes GUIDisable -name=nicer_mountains

 

## A checkbox for a basic question:

GUICheckBox -name=wallremover -text="Enable the cell grid boundary wall remover" -help="Enhances the near to far grid transition. Highly recommended" -select

GUIEnable -name=wallremover

@!makemeshes GUIDisable -name=wallremover

 

##

GUICheckBox -name=usedatafiles -text="Use Tamriel data files" -help="Use some hand-placed vertex points" -select

GUIEnable -name=usedatafiles

@!_worldspace=Tamriel GUIDisable -name=usedatafiles -unselect

@!_worldspace GUIEnable -name=usedatafiles -select

@!makemeshes GUIDisable -name=usedatafiles

 

##

GUICheckBox -name=usepanorama -text="Use Tamriel panorama points" -select

GUIEnable -name=usepanorama

@!_worldspace=Tamriel GUIDisable -name=usepanorama -unselect

@!_worldspace GUIEnable -name=usepanorama -select

@!makemeshes GUIDisable -name=usepanorama

 

## Add a drop down menu, first the parent:

GUIDropDown -name=flag_res -vdist=5 -help="Select your resolution"

## and now the items:

GUIDropDownItem -parent=flag_res -name=mid_res -text="Mid Resolution " -select

GUIDropDownItem -parent=flag_res -name=high_res -text="High Resolution"

GUIDropDownItem -parent=flag_res -name=ultimate -text="Ultimate Resolution"

GUIEnable -name=flag_res

@!makemeshes GUIDisable -name=flag_res

 

 

GUITextBox -text="Mesh options" -name=tes4ll_text3 -vdist=20

 

## A checkbox for a basic question:

GUICheckBox -name=useshapes -text="Use shapes instead of strips" -help="Faster generation, but needs more graphics card performance"

GUIEnable -name=useshapes

@ultimate GUIDisable -name=useshapes -select

@!makemeshes GUIDisable -name=useshapes

 

GUICheckBox -name=small_world -text="Use small world setup" -help="Try to further enhance the settings. Use this option only for small worldspaces which have about 2-4 quads"

GUIEnable -name=small_world

@!makemeshes GUIDisable -name=small_world

@_worldspace=Tamriel GUIDisable -name=small_world -unselect

 

 

; ****************************

[tes4llnm_gui]

; ****************************

 

## makes sure that tab is disabled if no worldspace is selected:

GUIEnable -name=tes4llnm_gui

@!_worldspace GUIDisable -name=tes4llnm_gui

 

GUITextBox -text="Select options for normal maps generation..." -name=tes4llnm_gui_intro -vdist=10

 

 

## A checkbox for a basic question:

GUICheckBox -name=makenormalmaps -text="Make normal maps" -help="Select this if you want to generate the normal maps"

 

###--------------------------------------------------------------

GUITextBox -text="Graphics options" -name=tes4llnm_text3 -vdist=10

 

GUIDropDown -name=flagnm_resnormal -vdist=5 -help="Select your texture resolution"

GUIDropDownItem -parent=flagnm_resnormal -name=512 -text="512x512"

GUIDropDownItem -parent=flagnm_resnormal -name=1024 -text="1024x1024" -select

GUIDropDownItem -parent=flagnm_resnormal -name=2048 -text="2048x2048"

GUIEnable -name=flagnm_resnormal

@!makenormalmaps GUIDisable -name=flagnm_resnormal

 

GUICheckBox -name=lodshadows -text="Fake shadows (can take a while)" -help="Tweaks the normap maps such to obtain the impression of landscape shadows" -vdist=5

GUIEnable -name=lodshadows

@!makenormalmaps GUIDisable -name=lodshadows

 

GUITextBox -text="z-Boost for non-faked normals" -name=tes4llnm_text3a -vdist=10

 

GUIDropDown -name=flagnm_zboost -vdist=5 -help="Boost factor for z"

GUIDropDownItem -parent=flagnm_zboost -name=z1 -text="Factor 1 (undistorted)"

GUIDropDownItem -parent=flagnm_zboost -name=z2 -text="Factor 2 (more contrast)" -select

GUIDropDownItem -parent=flagnm_zboost -name=z4 -text="Factor 4 (even more contrast)"

GUIEnable -name=flagnm_zboost

@lodshadows GUIDisable -name=flagnm_zboost

@!makenormalmaps GUIDisable -name=flagnm_zboost

 

@z1 SetFlag -name=z_val -value="1"

@z2 SetFlag -name=z_val -value="2"

@z4 SetFlag -name=z_val -value="4"

 

 

; ****************************

[tes4qlod_gui]

; ****************************

 

## makes sure that tab is disabled if no worldspace is selected:

GUIEnable -name=tes4qlod_gui

@!_worldspace GUIDisable -name=tes4qlod_gui

 

GUITextBox -text="Select options for color maps generation..." -name=tes4qlod_gui_intro -vdist=10

 

 

## A checkbox for a basic question:

GUICheckBox -name=tes4qlod -text="Make color maps (calls build-in TES4qLOD)" -help="Select this if you want to generate the color maps with TES4qLOD"

 

## Just some info:

GUITextBox -text="Please select what TES4qLOD should do" -name=tes4qlod_into -vdist=10

 

GUITextBox -text="Select resolution per quad:" -name=tes4qlod_into2 -vdist=10

 

## Add a drop down menu, first the parent:

GUIDropDown -name=tes4qlod_resolution -help="Select the resolution for a single quad (N.B. Vanilla has 512x512)" -vdist=3

## and now the items:

GUIDropDownItem -parent=tes4qlod_resolution -name=qlod1 -text="1024x1024 pixel [recommended]" -select

GUIDropDownItem -parent=tes4qlod_resolution -name=qlod2 -text="2048x2048 pixel"

GUIDropDownItem -parent=tes4qlod_resolution -name=qlod4 -text="4096x4096 pixel"

GUIEnable -name=tes4qlod_resolution

@!tes4qlod GUIDisable -name=tes4qlod_resolution

 

 

 

GUITextBox -text="Options:" -name=tes4qlod_into3 -vdist=10

 

## New blending flag

GUICheckBox -name=option_blending -text="Use layer blending" -help="Uses the opacity of the different layers for alpha blending" -select

GUIEnable -name=option_blending

@!tes4qlod GUIDisable -name=option_blending

 

 

## A flag about the total map:

GUICheckBox -name=option_map -text="Create full map of wordspace" -help="Creates a full map of your worldspace"

GUIEnable -name=option_map

@!tes4qlod GUIDisable -name=option_map

 

 

## Verbosity option of tes4qlod:

GUICheckBox -name=option_silent -text="Silent TES4qLOD" -help="Disables all the text output of tes4qlod"

GUIEnable -name=option_silent

@!tes4qlod GUIDisable -name=option_silent

 

 

Once that was done and saved, I re-added TES4LL (now, in contrary to before, without the "makemeshes" argument) .. I can now use TES4LL to create distant meshes as well as normal maps! Superb.

 

Screenshot of TES4LL "mod" in MO

 

 

 

The remaining problem child - TES4qLod

 

And here you are correct aswell. If "tes4ll_tes4qlod.bat" from TES4LL is added as executable in MO and then run, the application runs into memory blocks and can't finish the job.

 

The files it created until then can indeed be found in the Overwrite mod: Image

 

That (and this aswell, if I'm correct) points out, as you said, that the output folder of TES4qLod is still not correctly configured, if TES4qLod should run with MO.

 

 

Now .. while I don't have any real programming skills (yet), I do have "Visual Studio 2013 Express" (I actually want to try to learn the basics of C# some day) .. so I made the same as you, I downloaded the standalone TES4qLod tool and looked at the "tes4qlod.c" file. I recognize these lines that are probably the ones we are looking for:

Source1

 

Maybe this one aswell:

Source2

 

 

The thing now is, that I can't compile that project too, for some reason I don't know .. there should probably be more source files of the project, to be able to recompile the standalone TES4qLod tool, am I correct? Anyway, if I could recompile the project, I would probably try something like this: Idea

 

And even if I could recompile the file, I still wouldn't really know, how that could help us with the inbuild TES4qLod function of TES4LL.

 

 

-----

 

Yeah, we are getting there. ::): TES4LL works mostly, only the inbuild TES4qLod function doesn't work. Possible solutions would probably be either Tannin fixing the "memory issue", or Gruftikus implementing a proper command so that we can specify an output folder (that is then outside of MO).

 

MPGUI still crashes aswell, but if we get TES4LL to work that shouldn't matter.

Edited by pStyl3
  • 0
Posted

That is quite interesting. Although at the moment I don't use these tools and have no need to get them to run via MO, I might be able to offer a small bit of advice.

From those screenshots of the source code, and your idea as a fix, it looks like I may have an alternative?

It looks like the output directories are hard-coded, and thus MO's VFS throws a curveball at the program. If you where to change those to user-defined variables, perhaps set at runtime by the user, then the program would have somewhere to send the output.

Not exactly sure how that code might look, my coding is very rusty, but I was always told variables are always better than hard-coding.

Of course I may be completely wrong, in which case feel free to disregard everything I just said. ;)

  • 0
Posted (edited)

 

Now .. while I don't have any real programming skills (yet), I do have "Visual Studio 2013 Express" (I actually want to try to learn the basics of C# some day) .. so I made the same as you, I downloaded the standalone TES4qLod tool and looked at the "tes4qlod.c" file. I recognize these lines that are probably the ones we are looking for:

Source1

 

Maybe this one aswell:

Source2

 

 

The thing now is, that I can't compile that project too, for some reason I don't know .. there should probably be more source files of the project, to be able to recompile the standalone TES4qLod tool, am I correct? Anyway, if I could recompile the project, I would probably try something like this: Idea

Actually your Source1 image points to variables that are relative to the directory that the program is sitting in.  Changing that probably wouldn't do what you want it to.  (I could be wrong since I don't know C.)

 

The best fix would probably be adding a new argument for the file path and changing the directories lower in the file to use that new argument.  That would probably require someone who actually new C to to fix it up for us though.  I looked at it again and it looks like the argument addition itself is easy enough but getting the rest of the program to use it would be the problem for me.

 

Or we could just wait for an MO update that doesn't have a memory leak.

 

~Ari

 

Edit: I'm sorry it looked like I disregarded your post, GrantSP.  I had actually started typing this a few hours ago and only just now finished it up (I was looking at the source code for TES4qLOD).  What you suggested is pretty much exactly what I mentioned as well, hehe.

Edited by sirenAri
  • 0
Posted

Hi there,

 

as you might know, I'm the author of this package (tes4ll, not TES4qLOD).

 

Sorry for the late reaction, but at the moment I'm on a travel...

 

The way TES4qLOD was build in was indeed a little bit unprofessionial. Lightwave used a lot of hard coded stuff, and I changed it only where really needed.

 

In the new version of tes4ll this will be different: the maps generated by TES4qLOD are written into memory (without these partials), not in some temporary directory. This allows to modify the color map with filters, make some scaling, and write out the dds file directly (tes4ll will come with some libraries for scaling and a dds plugin).

 

Also the scripting was written completely from scratch and will allow for more options

  • 0
Posted (edited)

I have restored my posts in this topic, for some reason many BBCodes weren't working anymore. Hopefully everything should be back to it's prior state now.

 

As hishutup, I'm also very happy to see the ongoing development. :;): Once you think that your new version is ready to be tested (whenever that may be .. no need to rush things), just tell us about it and we will provide you with as much feedback as possible!

 

Looking forward to this.

Edited by pStyl3

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

Important Information

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