[WIP-REL] Oscape, landscape-lod generator

Post » Wed Dec 14, 2011 7:05 pm

Introduction

Oscape is a tool which extract to, and converts landscapes in .raw/.pgm/.stm-format into NIF-files and surface-textures (color-map, normal-map and height-map). These files can be extracted from existing ESPs via the built-in extractor, though you are free to produce the heightmaps with any other software and use high-quality source-material to produce the landscape-LODs as long as they are multiple of 1024.

Manual and references

Manual of the GUI-version:
http://obge.paradice-insight.us/wiki/Oscape_%28GUI%29
Manual of the non-GUI-version (with a bit of a technical explanation):
http://obge.paradice-insight.us/wiki/Oscape
Manual of the LLOD component of OBGE that utilizes additional LODs:
http://obge.paradice-insight.us/wiki/LLOD_%28Module%29

Thanks

To Warrudar, for making CBash open-source, and to sit with me over the code, and of course for being such a fine fella!
And to any of you who love and test and suggest and suffer and rage about OBGE. :intergalactic:

Notes

Doesn't require TESAnnwyn, it does the extraction by itself (via CBash).
Doesn't require TESqLOD, it does the calculation of normals by itself and distinct from the data in the plugins.
Doesn't require TES-CS, it will do the calculation of surface-color by itself.

Present

I hope you can give me a bit of feedback, crashes, wishes, suggestions for the GUI etc.
I also think it'd be nice to collect a few questions, I guess there may be a lot.
There are a few things in this WIP, I think it's not possible to abort the CBash-based extraction currently, just let it run. I also imagine running out of memory may rather crash spectacularly instead of terminating nicely. I did extract my entire load-order (all of UL, all of TWMP, and all the other stuff) with the 32bit version and 3GB memory used just fine though.
I don't plan on any new mayor features for REL, I only want to make it rock-stable currently, though of course I continue working on the colormaps.

Future

Write out the color-maps (in any resolution!). This does work already though I have to fix a few misalignments. I imagine this will be for 2.0.
CBash will support Skyrim, so will Oscape ( Skscape?, sound like a voice :D ).
User avatar
Darian Ennels
 
Posts: 3406
Joined: Mon Aug 20, 2007 2:00 pm

Post » Wed Dec 14, 2011 3:58 am

Thanks for another awesome contribution Ethatron :)

I believe this is an alternate method do generate lods from what gruftikus is doing.

That said, does this require OBGE in any way? I see that you point to the LLOD component of OBGE, so curious if that is a requirement to see the LOD goodiness in the game with OScape.
User avatar
Ice Fire
 
Posts: 3394
Joined: Fri Nov 16, 2007 3:27 am

Post » Wed Dec 14, 2011 6:48 pm

Great! Many thanks for this!

Will give it a try at the weekend.
User avatar
Anna Beattie
 
Posts: 3512
Joined: Sat Nov 11, 2006 4:59 am

Post » Wed Dec 14, 2011 5:50 pm

Thanks for another awesome contribution Ethatron :)

I believe this is an alternate method do generate lods from what gruftikus is doing.


Yes, it goes as far back as this (all of tamriel, first meshes I produced):
http://www.gamesas.com/index.php?/topic/1209053-wiprel-oblivion-graphics-extender/page__view__findpost__p__18139399
My desire for the multiple LODs until the horizont is also age old:
http://www.gamesas.com/index.php?/topic/1196753-wiprel-oblivion-graphics-extender/page__st__40__p__17806417#entry17806417

I had to do a lot of integrations before I even could make the tip of the iceberg appear (that tip is LLOD). It''s comprehensable that most of the ground-work doesn't appeal, I hope we can make the GUI-version quite accessable.

That said, does this require OBGE in any way? I see that you point to the LLOD component of OBGE, so curious if that is a requirement to see the LOD goodiness in the game with OScape.


No, but you're probably just going to need half of the features without it.

Some notes:
I was playing with the idea to have different settings preselected, depending if you want to generate for LLOD or not, I recognize it's a bit tidysome to deactivate the subsequent lower resolutions every time (1/2, 1/4, 1/8 etc.).
I'm also searching for a way to explain and/or transmit what the number of vertices really mean. One can simply create a (not box-back-puttable) suggestion to use 876543 points as target, though I'd like to actually make people conciously consider/rationalize about that number, but I'm not sure how ...
As the entire system is error-based maybe we come to the conclusion to make people always go for a specific maximum error, not for a maximum number of points.

It's also a bit of a pedagogic adventure besides a "simple" appliction. :)
User avatar
SHAWNNA-KAY
 
Posts: 3444
Joined: Mon Dec 18, 2006 1:22 pm

Post » Wed Dec 14, 2011 8:18 am

Write out the color-maps (in any resolution!). This does work already though I have to fix a few misalignments. I imagine this will be for 2.0.
Does this mean I can forget about fixing the CS's black LOD texture bug? :P
User avatar
sam
 
Posts: 3386
Joined: Sat Jan 27, 2007 2:44 pm

Post » Wed Dec 14, 2011 6:29 pm

Does this mean I can forget about fixing the CS's black LOD texture bug? :P


Yes, sort of. This functionality substitutes the general color-LOD texture creation in the CS, the one without objects. Besides some little mis-alignments it works. Besides that I just have to prepare the code to possibly manage a 4kx4k per tile/quad generation of a 108 tile extract, that's lots of disk space and memory (108*4096*4096*4 => 7.2GB uncompressed, 1.2GB DXT1), which not all have.

Here is a ultra-damaged JPEG of the extract:
http://paradice-insight.us/stuff/oblivion/TamrieRaw.land.jpg

I still have the desire to make the textures with rendered objects (mostly trees/foilage, I don't care that much about the cities). Either I start writing code to render top-view billboards at object-positions, or I shred the CS-executable into form - something like a I-destroy-all-of-the-other-functionality-of-the-CS-I-only-care-about-this-thing-not-crashing-every-cell version of your CSE. I'm a bit sick of the code-quality regarding scalability of Oblivion/CS ... makes me want to act with this sort of sadistic brutality. :D
User avatar
Lillian Cawfield
 
Posts: 3387
Joined: Thu Nov 30, 2006 6:22 pm

Post » Wed Dec 14, 2011 8:02 am

Has to issue a little update (crash when a field wasn't filled). Just download again.

I also fixed the color-texture mis-alignment, here two thumbnails (1.4MB each LOL):
http://paradice-insight.us/stuff/oblivion/TamrielRaw-thumb.png
http://paradice-insight.us/stuff/oblivion/TamrielUL-thumb.png

Rendering vanilla Tamriel vs. UL-Tamriel. Resolution is 1/4th.
I tried doing alpha-blending of the layered textures the Detailed-Terrain way, but's just wrong. Was worth a try though.
User avatar
Kari Depp
 
Posts: 3427
Joined: Wed Aug 23, 2006 3:19 pm

Post » Wed Dec 14, 2011 5:20 am

Err what does this do? What is it for?

Is this for mod makers or mod users?
User avatar
Nymph
 
Posts: 3487
Joined: Thu Sep 21, 2006 1:17 pm

Post » Wed Dec 14, 2011 5:38 am

Greetings!

Thanks for this tool! :bowdown: I downloaded the GUI version last night and again this morning. You can be sure I'll give it a good testing, distant landscape being a special interest of mine, one that has received little attention until this and Gruftikus recent tool. I've a few questions and reports:

What do I do with the files "tootle.dll" and/or "tootleDLL64.dll"? I assume we need only one, depending on if our OS is 32 or 64 bit?

Likewise, the various VCReditst listings. Do we need to ensure we have either 32 or 64 bit, not both, installed depending on OS? Do we need both 2008 and 2010 or is this someone tied in to our particular OS?

For the moment I've left those alone, figuring I might well already have them installed.

I took my best shot at configuring the GUI and generating mesh and texture sets. Mesh generation runs for some time and seems to be going well, until this message pops up: "Invalid Triangle Count: must be between 0 and 65535". At the same time the progress bars shows:

Resolution 786432, saving mesh
saving non-UV tile {-32,32}

I click the pop-up button, at which point generation ceases. How do we correct this sort of error?

I next thought to created textures only, to use in conjunction with Gruftikus meshes. Here, nothing happens. I click generate. A few seconds later I'm at the installers tab, telling me there are no installable files found. I'm gonna assume haven't met requirements? Those VCRedists or the tootles?

For later down the pike, can we get a fuller explanation of how we enter coordinates into the MyCustomPoints file? Is it simply like with Gruftikus where we enter...

-35374 19504
-25663 19982
-37606 19880

81032 70350
82440 68502

...and so on?

Also, can we enter comments within MyCustomPoints? Some of my supposed corrections don't work out. With nothing but a long string of coordinates it can be hard to tell what I need to back out of without a complementary written explanation of what each set of related coordinates was added to fix.

Thanks again!
-Decrepit-
User avatar
Vicki Blondie
 
Posts: 3408
Joined: Fri Jun 16, 2006 5:33 am

Post » Wed Dec 14, 2011 6:42 am

I still have the desire to make the textures with rendered objects (mostly trees/foilage, I don't care that much about the cities). Either I start writing code to render top-view billboards at object-positions, or I shred the CS-executable into form - something like a I-destroy-all-of-the-other-functionality-of-the-CS-I-only-care-about-this-thing-not-crashing-every-cell version of your CSE. I'm a bit sick of the code-quality regarding scalability of Oblivion/CS ... makes me want to act with this sort of sadistic brutality. :D
Heh, I can relate to that. At any rate, I'll keep my eye on this. Will also take a closer look at the texture generator code - We might just be able to put it sleep until the background cell loader's done.
User avatar
Facebook me
 
Posts: 3442
Joined: Wed Nov 08, 2006 8:05 am

Post » Wed Dec 14, 2011 6:47 am

Also, can we enter comments within MyCustomPoints? Some of my supposed corrections don't work out. With nothing but a long string of coordinates it can be hard to tell what I need to back out of without a complementary written explanation of what each set of related coordinates was added to fix.

Thanks again!
-Decrepit-


I think most of your question are answered by the documentation ... I'll answer you later, am in a hurry currently.
The 2008 links are just mispackaged, only 2010 matters.
User avatar
KiiSsez jdgaf Benzler
 
Posts: 3546
Joined: Fri Mar 16, 2007 7:10 am

Post » Wed Dec 14, 2011 5:18 am

Looks great!
I just have a few questions...
1. Does this tool do the same thing as http://www.tesnexus.com/downloads/file.php?id=40549 does?
2. If it does, which one is better for visual effects?
3. tes4ll fixed the double bottom problem under Niben Bay, would this tool fix that as well?

Thanks!
User avatar
Bonnie Clyde
 
Posts: 3409
Joined: Thu Jun 22, 2006 10:02 pm

Post » Wed Dec 14, 2011 11:01 am

I'll add a few usability things to the GUI, hold on.

Edit: Okay, I added a menu where you can switch defaults (orientation and some of the generator checkboxes). And a checkbox where you can flip the orientation of the raw heightfield. And the Target-dropdown is now sorted lowest to highest "profile" and explains how those values have been calculated. Also heightfields exported prior to the new version are incompatible because of that. Just download the adjusted version from the same location. I'll add the documentation for the menu later.
User avatar
Jason White
 
Posts: 3531
Joined: Fri Jul 27, 2007 12:54 pm

Post » Wed Dec 14, 2011 5:47 pm

Hi,

thank you for this tool. I had to play 2 years with these terrible landscape meshes, and looked about 1 year for a tool, and finally decided to do it on my own. So now we have 2 tools.

I just tried 2 resolutions with Oscape, the default one (1/1 and default target - I forgot the number), and later 1/2, and 1166400. Still I have to understand the meaning of the numbers. But anyhow, what I suggest that you offer maybe 2-3 standard sets of parameters (maybe just with buttons), and move the details to an expert modus. I my opinion, most people are only interested in the basic numbers (1x Vanilla, 2x Vanilla, ....)

For the higher resolution, a popup appeared saying "to much vertices - have to split" - or so. I have problems to open these meshes. Nifscope is crashing, and Oblivion of course also. I can only guess that there is more than one shape object inside the file (but why is Nifscope crashing?). I had similar problems with tes4ll, when I tried to overcome this 64k limit by adding more than one tristrip in one quad. It seems that Oblivion is so nice to merge this...

What you also could add is to cut all triangles at the cell boundaries. Is this possible? It would avoid the "void" problem at the near-to-far transition.

1. Does this tool do the same thing as http://www.tesnexus.com/downloads/file.php?id=40549 does?
2. If it does, which one is better for visual effects?

Basically yes. tes4ll has some additional features to have better mountains and the correct shore line.

BTW, maybe I missed it, but how can I generate the textures (I mean the color textures, not the normal maps)?
User avatar
emily grieve
 
Posts: 3408
Joined: Thu Jun 22, 2006 11:55 pm

Post » Wed Dec 14, 2011 8:54 am

I tried running the 32-bit version (Win XP), and I got this message:

"The procedure entry point RegGetValueA could not be located in the dynamic link library ADVAPI32.dll."

:unsure:
User avatar
Josee Leach
 
Posts: 3371
Joined: Tue Dec 26, 2006 10:50 pm

Post » Wed Dec 14, 2011 3:10 pm

I updated to your recently announced build. Created a set of "normals" with it. Worked like a charm this time! Well...I did run in to one snafu. Possibly something I entered incorrectly...I kept the input configurations from the earlier build. Oh, I should point out that I didn't have Oscape install the textures, since I prefer creating BAIN packages and install through Wrye Bash.

Anyway, I thought to look at a couple of "normals" with PAINT.NET. I picked the most obvious, 60.00.00.32, which holds the Imperial City and Cheydinhal. Only, what appeared on-screen was obviously not that quad but another. I looked at several other quads. None were labeled correctly. For instance, Oscape's 60.-32.32.32 is in reality 60.-32.00.32 (the Weye, Chorrol, partial Skingrad quad). No biggy, at least on the obviously quads. It's easy enough to rename the files to what they actually are.

It's prolly some dumb mistake on my part, and I'll investigate further when I have time. (Working in retail as I do, Black Friday isn't the best of days for pursuing pastimes.) Still, I wanted to run it by ya 'just in case'.

-Decrepit-
User avatar
Ross Zombie
 
Posts: 3328
Joined: Wed Jul 11, 2007 5:40 pm

Post » Wed Dec 14, 2011 6:38 pm

You didn't re-extract the heightfield, after I made previous extracted heightfields incompatible.
User avatar
FirDaus LOVe farhana
 
Posts: 3369
Joined: Thu Sep 13, 2007 3:42 am

Post » Wed Dec 14, 2011 6:14 am

You didn't re-extract the heightfield, after I made previous extracted heightfields incompatible.

So true... I was so happy it this-time produced results I forgot about all else, but simply had to try the files in-game. As mentioned, once (if?) I make it through my Black Friday retail shift I'll restudy the documentation and GUI interface more thoroughly and hopefully get the procedure right.

-Decrepit-
User avatar
Adrian Morales
 
Posts: 3474
Joined: Fri Aug 10, 2007 3:19 am

Post » Wed Dec 14, 2011 6:36 am

BTW, maybe I missed it, but how can I generate the textures (I mean the color textures, not the normal maps)?


You missed that I said that I wanted to make a few other things first (usability, stability, memory consumption). ;)
But being masochist I made you your own special version:
http://paradice-insight.us/stuff/oblivion/OscapeGUIb.7z

Have fun, you'll need ~4GB of memory for the TWMP color-map.
User avatar
Heather beauchamp
 
Posts: 3456
Joined: Mon Aug 13, 2007 6:05 pm

Post » Wed Dec 14, 2011 12:13 pm

I updated to your recently announced build. Created a set of "normals" with it. Worked like a charm this time! Well...I did run in to one snafu. Possibly something I entered incorrectly...I kept the input configurations from the earlier build. Oh, I should point out that I didn't have Oscape install the textures, since I prefer creating BAIN packages and install through Wrye Bash.


You don't need to install into Data/, you can also directly install into your bash-folder and let Bash take care of the update. It's especially convenient when you want to manage multiple resolutions at the same time, or try different textures sizes.

Edit: I updated the "color-map" version, I think it's possible to get away with TWMP on 32bit now.
http://paradice-insight.us/stuff/oblivion/OscapeGUIb.7z
User avatar
joeK
 
Posts: 3370
Joined: Tue Jul 10, 2007 10:22 am

Post » Wed Dec 14, 2011 4:34 am

What did the weekend testing result in?
User avatar
Amy Siebenhaar
 
Posts: 3426
Joined: Fri Aug 10, 2007 1:51 am

Post » Wed Dec 14, 2011 5:35 am

I got Oscape to work with your LOD shader, best that I could get to run was at 196608, anything more would give the "have to split" error. It's running great though in my tests. I ran Oscape many times as I seemed to miss that DirectX meshes are required for the shaders. It was funny because I ran it right the first time and then forgot that it was needed, much silly frustration. But its running great now, seems like a performance boost.
I tried to create the color maps once, but ended up with many black textures instead. So now I'm running color maps I created with Tes4qlod with Normals and Meshes from Oscape. About to test the LOD shader upgrade now. Thanks!
User avatar
Destinyscharm
 
Posts: 3404
Joined: Sun Jul 23, 2006 6:06 pm

Post » Wed Dec 14, 2011 6:18 pm

I got Oscape to work with your LOD shader, best that I could get to run was at 196608, anything more would give the "have to split" error.


LOL, you testet the threshold out on the single digit. :D
Yes, that's about the limit. You can actually go higher, but then you have to have quite a mental model of what the tool makes and is let's say less "easy". (hint: it's possible to calculate around the offending tiles with a border-points file from a lower resolution 1/1 run). Doesn't matter much, don't bother. :)

It's running great though in my tests. I ran Oscape many times as I seemed to miss that DirectX meshes are required for the shaders. It was funny because I ran it right the first time and then forgot that it was needed, much silly frustration. But its running great now, seems like a performance boost.


Cool. Yes, the meshes are optimized for overdraw, they should be substancially faster (upto 300%), though it's not that much of the total time, fractions of fractions of one frame.

I tried to create the color maps once, but ended up with many black textures instead. So now I'm running color maps I created with Tes4qlod with Normals and Meshes from Oscape. About to test the LOD shader upgrade now. Thanks!


Okay, let's see, I have all the terrain-textures loose, maybe the BSA-search doesn't yet work nice. When you observe the extraction it announces that it builds the search-db of BSAs, right? Then later in the status-bar, does it ever flicker a report of a found texture-file? It's just a little moment, then it goes back to "Extracting ...".
Can you remedy it by putting the "Data/Textures/Landscape" textures from the BSA as loose files?
Can you give me a screen of the color-map preview?

You have to generate from your installation "Data"-folder for color-maps, or you have all textures in your custom folder from that you generate. Let's say if you have a folder for a mod, which doesn't depend on native textures, you can use that but the textures it references in it's LAND-records must be found at the same location. Hope that's explained well. If it's mixed, textures from the mod & native textures, then one has to put the entire textures-BSA or the native loose files into the mod-folder.
User avatar
Connie Thomas
 
Posts: 3362
Joined: Sun Nov 19, 2006 9:58 am

Post » Wed Dec 14, 2011 7:19 pm

That would be the problem, yes. I do use self-created, renamed Texture BSA's that I keep in another folder.
Brings up another though - the few textures that are in my Data\textures\landscape folder did render, but not the ones from Unique Landscape BSA's, so would all landscape textures over all bsa's have to go into the landscape folder? That I can try.
OBGE thread for the LOD notes.
User avatar
Aliish Sheldonn
 
Posts: 3487
Joined: Fri Feb 16, 2007 3:19 am

Post » Wed Dec 14, 2011 9:38 am

That would be the problem, yes. I do use self-created, renamed Texture BSA's that I keep in another folder.
Brings up another though - the few textures that are in my Data\textures\landscape folder did render, but not the ones from Unique Landscape BSA's, so would all landscape textures over all bsa's have to go into the landscape folder? That I can try.
OBGE thread for the LOD notes.


If the landscape-texture are in some BSAs which reside in your "Data" folder for extraction, and they are not rendered it's a bug. I still don't know if you use your installation "Data" folder. If yes, then it's definitely not getting hold of the textures inside the BSAs and it's a bug, and I probably just have to add a slash or something to the BSA-searcher.

If the [base] BSAs are not in that "Data" folder they should be in there, yes.

Load-order of BSAs is by alphabet, if all landscape-textures are in BSAs the lexicographically first wins. It's a similar situation as for BSA load-order of Oblivion, we don't know what's the order there. Even though one could suggest the optimal behaviour of an application is to order the BSAs by the timestamp of the correspondingly named esp/esm. That's a bit of complex convention though because BSA can have "prefix" names of esp/esm, like in the case of Better Cities, that quickly becomes ugly.
In any case the only valid way to put custom replacers for standard textures (overwriting textures from the Oblivion BSAs) indeed are as loose files.

I'm just clarifying the situation we have given by Oblivion, I'm not critic or anything. I suppose when you play with custom BSAs you know most of it.
User avatar
RAww DInsaww
 
Posts: 3439
Joined: Sun Feb 25, 2007 5:47 pm

Next

Return to IV - Oblivion