L3DT users' community
Large 3D terrain generator

Unable to Extract Terrain Normal & Unfavorable Lighting

Got a problem or need advice?

Unable to Extract Terrain Normal & Unfavorable Lighting

Postby rockwill1066 » Tue Aug 07, 2018 3:44 am

I attempted to extract the Terrain Normal of this map that I imported using this satellite image program through this website, but unfortunately I received these errors:
    L3DTio_BigBitmap::SaveMapFile error:
    - data size exceeds maximum allowed by bitmap format specification
    L3DTio_BigBitmap::SaveMapFile error
    - call to SaveMapFileEx failed
    L3DTio_BigBitmap::SaveMapFile error:
    - data size exceeds maximum allowed by bitmap format specification
    L3DTio_BigBitmap::SaveMapFile error
    - call to SaveMapFileEx failed
Based on these errors, I would presume that I need to decrease the data size, although I don't know to which extent, so I would test around with it but sadly my computer doesn't do well with processing such things & is extremely inefficient through L3DT, which results in crashing, even though the computer has a very high processing capability. I posted the thread "Crash due to Calculation" in an attempt to resolve this issue although I haven't received any resolutions yet. So I would like for someone to tell me how to resolve this if anyone knows, perhaps by informing me how much I need to decrease the data size. Data Size:
Data Size.png
Data Size.png (11.35 KiB) Viewed 19727 times


The other issue is with the lighting. Much akin to the issue with extracting the Terrain Normals, I would like to simply test around with this and not use anyone else's time, but alas my computer's processing issues with this specific program is the reason as to why I'm posting on the forum about this. Perhaps this has something to do with the tiles or some other means of dividing terrain in relation to lighting? I'm not certain. Example:
Unfavorable Lighting.jpg

Light Settings:
Light Settings.png
Light Settings.png (2.73 KiB) Viewed 19727 times
rockwill1066
New member
 
Posts: 9
Joined: Sat Aug 04, 2018 4:14 pm

Re: Unable to Extract Terrain Normal & Unfavorable Lighting

Postby Aaron » Tue Aug 07, 2018 2:03 pm

Dear rockwill1066,

I apologise for this fault. I am testing a fix for the bitmap plugin that should remove this size restriction. Once tests are passed, I will upload an updated installer and post back here to let you know. Might take a day or so.

As for the featureless lightmap, this may be due to the flatness of the terrain geometry. What is the horizontal scale for the heightmap, and what is the altitude range? If the heightmap is very flat, then the light map will also appear flat (bump mapping only does so much).

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

Re: Unable to Extract Terrain Normal & Unfavorable Lighting

Postby Aaron » Tue Aug 07, 2018 3:44 pm

Hi rockwill1066,

The new exporter seems to work properly on large images, except that it gets amazingly slow when the tile map cache is too small to fit a whole scanline in memory. I think this is fairly easily fixable, so before I send out an update, I'd like to see if I can fix this performance issue first. I'm sorry for the delay.

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

Re: Unable to Extract Terrain Normal & Unfavorable Lighting

Postby rockwill1066 » Thu Aug 09, 2018 5:55 pm

That's fine. I can understand that these things take time. The horizontal scale is 1.041. I don't know how to check for the altitude range, unfortunately. I decided to import the satellite image altitude data into the program, though. I went into the 3D editor and the map consists of hills essentially, so it's definitely not flat. I did apply bump mapping though.
rockwill1066
New member
 
Posts: 9
Joined: Sat Aug 04, 2018 4:14 pm

Re: Unable to Extract Terrain Normal & Unfavorable Lighting

Postby Aaron » Fri Aug 10, 2018 9:30 am

Hi rockwill1066,

Thank-you for waiting. I've included an updated bitmap plugin in the latest developmental build (L3DT 18.08 build 1), which is on the Pro downloads page now (see link in your sales/registration e-mail). Please give it a try and let me know if it does/doesn't fix the problem you found when saving the image.

As for the lighting issue, do you think you could e-mail me your L3DT project file (.proj) and map definition file (.def.xml), to aaron@bundysoft.com? These files should contain the settings I'll need to work out what's gone wrong with the lighting.

Best regards,
Aaron.

PS: You can check the altitude range using the 'Operations->Heightfield->Change vertical range' menu item, which opens the change heightfield vertical range window. In that window, one of the text boxes displays the altitude range, in metres.
User avatar
Aaron
Site Admin
 
Posts: 3696
Joined: Sun Nov 20, 2005 2:41 pm
Location: Melbourne, Australia

Re: Unable to Extract Terrain Normal & Unfavorable Lighting

Postby rockwill1066 » Tue Aug 14, 2018 3:16 am

I sent you an e-mail which contains the project file (.proj) & the map definition file (.def.xml). Additionally, the Altitude range is set to (m) 933.00. Also, I didn't receive the sales/registration e-mail, so I don't have the link that I can use to access the L3DT 18.08 build 1 file; could you send it to me or send it to me again if you attempted to and failed?
rockwill1066
New member
 
Posts: 9
Joined: Sat Aug 04, 2018 4:14 pm

Re: Unable to Extract Terrain Normal & Unfavorable Lighting

Postby Aaron » Mon Aug 20, 2018 3:06 pm

Hi Rockwill1066,

Thanks for the files. I'm attempting to reproduce the fault now, using a Perlin-generated heightfield with the same size and scaling parameters, and then using the same settings for the attributes map, normals map, light map and texture map. I'll let you know how it goes when/if it finishes.

However, looking through the settings, I'm prepared to pin the bland light map on two particular settings:
  • Your map uses the 'arctic' climate, which will cover much of the terrain with the snow land type. This land type has no bump map, and so will appear smooth and boring in the light map.
  • The chosen sun elevation angle is quite high (60deg); this high angle will make the lighting appear quite flat unless the terrain is very steep. Bump-mapping only slightly perturbs the surface normals, so it won't add much detail at a high sun angle. This, coupled with the choice of the arctic land type, will make the terrain appear very smooth indeed in the light map.

To demonstrate my point about the sun angle, please consider these old screenshots (using the arctic climate) showing the sun angle at 30 degrees (top) and 90 degrees (bottom). Note how the higher sun angle in the second image removes much of the light map detail, except on the steeper slopes. Also note how the snow is smooth and featureless in both images.

Image
Image

Also, as I looked through the settings I noticed a few things could be problematic:
  • attributes map resolution (AM/HF) was very high (16x), whilst texture resolution was low (2x). There is no benefit in generating an attributes map that is larger than the output texture. Using this setting should make the attributes map calculation something like 64 times slower than necessary, for no benefit.
  • Attributes map tile size was set to 4096. Large tile sizes are considered harmful, and should be avoided. Please use the default value (512px).
  • Terrain normals map resolution (TN/HF) was also high (16x), when 2x is sufficient to match the chosen texture resolution. This should make the normal map calculation something like 64 times slower than necessary.
  • Light map resolution (LM/HF) was also high (8x), when 2x is sufficient to match the chosen texture resolution. This should make the light map calculation something like 16 times slower than necessary.

Otherwise, I'll wait for the calc to finish before commenting more.

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

Re: Unable to Extract Terrain Normal & Unfavorable Lighting

Postby Aaron » Tue Aug 21, 2018 2:24 pm

Hi Rockwill1066,

The map completed OK using your settings, and it would indeed appear the reason that the light map looks so plain is because you're using the 'arctic' climate, and this covers most of the map in the 'snow' land type, which has no bump map since it's supposed to be smooth. You can see that in the screenshots below, where the the top image below shows the textured map, and the bottom image shows just the light map. Note that the light map is completely smooth and featureless on the 'snow' land type due to there being no bump-mapping, but shows strong bump mapping on the rock land type.

screenshot3.jpg


screenshot3_LM.jpg


(the terrain looks so lumpy because I used a quick-n-dirty Perlin generator to make the heightfield, without any more adfanced heightfield effects, like erosion and terracing.

As for the speed problems you reported, I'd recommend you reduce the resolutions of the attributes map, normals map, and light map to match the resolution of your texture map (2x), unless you have some reason you need these to be higher resolution than the output texture (?). That change should make a big difference in calculation speed. Oh, and set the mosaic tile size for these calculations back to the default (512 px); that should also improve speed, and probably stability if you're finding crashes.

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

Re: Unable to Extract Terrain Normal & Unfavorable Lighting

Postby rockwill1066 » Tue Aug 21, 2018 9:20 pm

Thank you kindly. I decided to follow your instructions and everything is much quicker.
rockwill1066
New member
 
Posts: 9
Joined: Sat Aug 04, 2018 4:14 pm

Re: Unable to Extract Terrain Normal & Unfavorable Lighting

Postby rockwill1066 » Wed Aug 22, 2018 12:53 am

Update: oddly enough it's stuck on Calculating mip-maps.. and the time remaining is only 8 seconds and it's been on this for a while and I don't know what's causing it. I set the settings to what you recommended and the entire process is taking 3-4 hours.
rockwill1066
New member
 
Posts: 9
Joined: Sat Aug 04, 2018 4:14 pm


Return to Help and support

Who is online

Users browsing this forum: No registered users and 10 guests

cron