L3DT users' community
Large 3D terrain generator

Oblivion import issue. (Height map issue)

Got a problem or need advice?

Oblivion import issue. (Height map issue)

Postby Martinloki » Sat Mar 24, 2007 12:23 am

The details are below, but my main question is this:
How do I set up the heightfield so that the highest mountain tops are light grey, not bright white?

(The max alt is of the map is, say, 5km, but the highest peak is 500m.)

Detailed history:
So I've created a nice little island that I would like to import it into Oblivion. Everything seems fine; the raw file is created, the construction set imports it, and the overview looks right. But when I actually preview the rendered version, my 300m hills stretch up into space. I messed around and found that if I change the gradient of the raw file to go from black to 50% grey in photoshop, I can tame the mountains and things start to get more reasonable. My issue though is that this is a really messy workaround and difficult to repeat as the max mountain sizes change from isle to isle. Is there any way to set the max altitude of the map, but have the max alt of the land stay at a different level. Each time I change it in the Vert scale it seems to just scale the landmass so that the final heightmap shades stay the same.

Thanks for your time and help.
Martinloki
Member
 
Posts: 15
Joined: Sat Mar 24, 2007 12:11 am

Postby demi » Sat Mar 24, 2007 4:11 am

Frist of all I have never used Oblivion editor so maybe I am wrong Try exporting the RAW file and under options change the values for height by double clicking the option to change the value. The options are displayed on the right of the extension selected.

Maybe you need to export BYTE aligned.
demi
Oracle
 
Posts: 227
Joined: Thu Nov 24, 2005 4:56 am

USHORT (meters) may be the answer.

Postby Martinloki » Sat Mar 24, 2007 5:22 am

Thanks for the quikc response. I tried the BYTE thing, but it resulted in an 8 bit file (I should have figured that...) and the high points were still bright white.

However your suggestion caused me to rexamine the options and I noticed that the default is "USHORT (spanned)."

Well, considering that my issue is that the gradient seemed to be "spanning" from black to white no matter what the heights were I changed that setting to "USHORT (meters)."

The result was rather flat, but much closer to my goal. I am going to continue to play with it in hopes that it is what I need.

Thank you again.
Martinloki
Member
 
Posts: 15
Joined: Sat Mar 24, 2007 12:11 am

Postby demi » Sat Mar 24, 2007 5:27 am

No matter what the height is, even if the highest point is 1 meter, the highest point is always white on raw, png,jpeg and so on. The import function should ask for a min and max. Check the editor.
demi
Oracle
 
Posts: 227
Joined: Thu Nov 24, 2005 4:56 am

Part of the fun...

Postby Martinloki » Sat Mar 24, 2007 5:36 am

Ya, that's been part of the fun with importing this stuff. Feedback and interaction with the TESCS (The Elder Scrolls Construction Set) consists of one message box, when you click import, which reads

"Import? Import raw images from Data\HeightField directory? (images must be 1024x1024 and in 16-bit RAW format)"

That's it. No settings in the menus, no useful help that I've found, nada. All the info I have come across is in the Wiki, and there they used a different program which put out a map that didn't have any bright spots.

Fortunately, between these posts I have experimented more and found that the "USHORT (meters)" option that you brought to my attention is the solution.

No I just have to work out the horizontal scale, but that is just a simple matter of resizing the amount of room I want the isle to take up, and I have already done it and know it will work.
Martinloki
Member
 
Posts: 15
Joined: Sat Mar 24, 2007 12:11 am

Oh, and re: the highest point...

Postby Martinloki » Sat Mar 24, 2007 5:40 am

I just reread your post and realized I ignored part of it. When I choose the option with (meters) instead of (spanned) it left the high points dark. Not black, but only a shad or two above black. This was only visible in the .RAW file. (I thought I had ended up with a blank file it was so dark, but adjusting the levels in photoshop confirmed that data was there.) I don't know how it calculates the data, but in the TESCS the heights came out exactly right using the (meter) option.
Martinloki
Member
 
Posts: 15
Joined: Sat Mar 24, 2007 12:11 am

Postby piratelord » Sat Mar 24, 2007 9:55 pm

There is an option in L3DT to import a heightmap so that white is max altitude instead of the brightest colour being max altitude. Aaron will also be adding a feature that exports in the same way.
piratelord
Luminary
 
Posts: 60
Joined: Sun Dec 10, 2006 2:59 pm

Postby Aaron » Mon Mar 26, 2007 1:06 am

Hi Martinloki,

I'll try to shed some light on this:

16-bit PNG and RAW files can store values from 0 to 65535, whereas in L3DT (and many other programs) the height is stored as a single-precision floating point number with a range of -1E38 to 1E38 (1 followed by 38 zeroes, if you're not familiar with exponential notation). Usually, the floating point numbers are crunched down into the 16-bit integer values in the images using scaling and offset values such that the minimum height is set to 0 in the image and the maximum height is set to 65535 in the image (this is the 'USHORT (spanned)' option). This option gives you the greatest accuracy, which for a typical heightfield might be a few centimetres (~inches). By the way, USHORT is shorthand for 'unsigned short integer', which means a 16-bit positive number (0...65535).

The other option ('USHORT (metres)') assumes that the scaling factor is one, so that for example a height of 1000m has a value of 1000 in the file. This is easy to interpret, but has really poor precision, as the smallest change you can represent is one metre (HUGE!). Now, these 'USHORT (metres)' images will usually only use the low range of the images because your maps typically have maximum heights of ~1000 - ~5000 metres, so the brightest pixel has a value of ~1000 - ~5000. That is only ~1.5% - ~7.6% of the full-range of the 16-bit images, and hence they'll be very dark.

The preferred option for handling terrain data is usually something like the Terragen TER file, which has 16-bit precision (hence ~same size as RAW) but also includes a header with the required scaling values to convert the 16-bit file values back to real-world height units. It's a very widely supported format amongst terrain apps (partly because it's so simple), and TESCS may do well to support it. It's one of the formats natively supported by L3DT (also HFF, BT and HFZ).

No matter what the height is, even if the highest point is 1 meter, the highest point is always white on raw, png,jpeg and so on.


That's true for 'USHORT (spanned)', which is the usual method, but it's not true for 'USHORT (metres)'.

There is an option in L3DT to import a heightmap so that white is max altitude instead of the brightest colour being max altitude. Aaron will also be adding a feature that exports in the same way.


I just remembered that in some of the image exports, you can already set the minimum and maximum greyscale values (see options button). Thus, you can set how the floating-point values span the image greyscale range. Is this useful?

Cheers,
Aaron.
User avatar
Aaron
Site Admin
 
Posts: 3696
Joined: Sun Nov 20, 2005 2:41 pm
Location: Melbourne, Australia

Re: Oblivion import issue. (Height map issue)

Postby Maegfaer » Wed Apr 06, 2011 6:30 pm

I see this topic is already 4 years old, but I'd like to mention here how to correctly export a 16 bit RAW file for Oblivion or Skyrim:

Btw, the Horizontal scale of your map in L3DT should be 1.8288221359252928. I'm also assuming here that you want 0 meters in L3DT be equal to the default sea level in Oblivion/Skyrim.

When you are ready for exporting, make sure the lowest point on your map equals -117.0446166992187. I usually find an irrelevant spot on the map, like in a corner of the ocean. There I use the Set To brush, fill in -117.0446166992187 and paint a very small part at that height. Then I exit the 3D editor, I go to "Operations" -> "Heightfield" -> "Clip heightfield...". There I clip below -117.0446166992187 to -117.0446166992187, just to make sure.

This process is necessary because when exporting from L3DT, it assumes that the lowest point on the map is the lowest point possible (pure black colour). Oblivion and Skyrim assume that black colour == -4096 Units, which equals to -117.0446166992187 in meters (might not make sense if you try to calculate it, because the game engine multiplies vertical distances by 2. So actually it's -8192 units).

When exporting, make sure you select 16-bit RAW unsigned (manual scale), and as manual scale choose 0.1143013834953308. Depending on how you import the file into Skyrim/Oblivion, you may need to set InvertY to False. If you use TESAnnwyn for importing the worldspace, that is definitely necessary. If you use TESAnnwyn, this is an example of the commandline for Oblivion for a 4x4 quads heightmap:

tesannwyn -i 4 -w WorldSpaceName -p 1 -b 16 -d 4096x4096 -x -64 -y -64 -0 -h -8192 RAWFileName.raw

For Skyrim (make sure you have the new version that supports Skyrim: viewtopic.php?f=4&t=514&p=8632#p8632) it's simply:

tesannwyn -i Skyrim -w WorldSpaceName -p 1 -b 16 -d 4096x4096 -x -64 -y -64 -0 -h -8192 RAWFileName.raw


The result will be a tesannwyn.esp file, which you can rename after importing is done.
Maegfaer
New member
 
Posts: 5
Joined: Wed Apr 06, 2011 6:27 pm

Re: Oblivion import issue. (Height map issue)

Postby ratbuddy » Sat Mar 31, 2012 6:10 pm

I've followed those intrustions to the letter, and I simply can't get my heightmap to work in Skyrim. I ran the .RAW through Tesannwyn, and made sure the resulting .esp was in my Skyrim data folder, and I'm stumped from there. I just can't figure out how to make the new world show up. I've checked the .raw in Photoshop and it does look correct, so is not strictly a L3DT issue, more of a Skyrim issue, but I'd really love to get it working. Once I have the tesannwyn.esp in the data folder, how do I actually import it into the Skyrim Creation Kit and give it a name as a new worldspace?

I'll gladly pay for the full version of L3DT if I can get it playing nice with Skyrim :)
ratbuddy
Newbie
 
Posts: 1
Joined: Sat Mar 31, 2012 5:59 pm

Re: Oblivion import issue. (Height map issue)

Postby Maegfaer » Wed Apr 25, 2012 11:02 am

The worldspace already exists in the ESP it's called after the worldspace name parameter in the TESAnnwyn command line. Ingame you can go to there by opening the console and typing "cow worldspace_name 0,0" (make sure your plugin is in the load list). For loading in the CK, you need to convert the ESP to a ESM if your worldspace is bigger than 80-100MB or so, or else it crashes when loading. Then fire up the CK, load Skyrim.esm + your worldspace plugin, and when it's done loading browse the worldspace list to select yours. If you get the error that you can't load two masters, add bAllowMultipleMasterLoads=1 under [General] to your SkyrimEditor.ini in your Skyrim installation, or make your worldspace plugin dependant on Skyrim.esm (recommended, you kinda need to do this anyway). It can be done with tools like TesVsnip, Wrye Bash, and some others. If you were able to load your worldspace plugin as ESP in the CK, simply re-saving should make it dependant on Skyrim.esm. You can't resave a ESM so you'll have to do it manually. Note that I highly recommend converting to a ESM.

I know I let most how-to's out, creating a new worldspace in Skyrim is a huge endeavor, it would take me a full day to write a real tutorial and even then I'd get tons of questions of people getting stuck. You really need to do most research yourself and occasionally ask the modding community.
Maegfaer
New member
 
Posts: 5
Joined: Wed Apr 06, 2011 6:27 pm

Re: Oblivion import issue. (Height map issue)

Postby Antiscamp » Thu May 03, 2012 6:08 am

All your posts on the forums helped me get my heightmap into the game, Maegfaer. They helped me so much that I'll mention you in my Credits in the ReadMe for my Frontier mod, in fact. Thanks for your hard work on Skyrim heightmaps and I wish you the best of luck with MERP. :)
Antiscamp
Newbie
 
Posts: 1
Joined: Thu May 03, 2012 5:54 am

Re: Oblivion import issue. (Height map issue)

Postby Telarus » Thu May 03, 2012 7:02 am

Nice that it worked out. Any screenshots of the L3DT terrain in the Skyrim engine?
Telarus
Doyen
 
Posts: 112
Joined: Mon Jun 01, 2009 12:34 am

Re: Oblivion import issue. (Height map issue)

Postby Maegfaer » Wed May 23, 2012 11:02 am

Thanks for crediting me AntiScamp, it's appreciated! I'm glad it all worked out for you.

@Telarus, here is a video of our WIP: http://www.youtube.com/watch?v=eMb3jn1m7QE
Maegfaer
New member
 
Posts: 5
Joined: Wed Apr 06, 2011 6:27 pm

Importing Heighmap into CK

Postby themraw435 » Sun Jun 03, 2012 4:52 pm

So i made the heightmap in L3DT and it looks cool but when I go to import it into the creation kit using TESAnnwyn it creates the .esp file then I go to check it in the CK's heightmap editor and it comes out all wrong. I've tried it a few times and the terrain comes out in zig zags or like a crumpled up piece of paper what could be causing this? I'm sure its something simple im overlooking any help would be appreciated. Thanks
themraw435
Newbie
 
Posts: 1
Joined: Sun Jun 03, 2012 4:46 pm


Return to Help and support

Who is online

Users browsing this forum: Google [Bot] and 7 guests

cron