L3DT users' community
Large 3D terrain generator

Confused about scale...

Any and all chit-chat regarding L3DT.

Confused about scale...

Postby Wolfsong73 » Sat May 28, 2011 4:03 pm

Hello,

So, I'm working on a rough sketch of my zone map, as I discuss in a previous thread (which should be right near this one in the thread list).

Something seems wonky with the vertical scale as it doesn't seem to translate into the 3D view.

I set the border areas of the zone to 10 meters tall, which according to the conversion I found should have made them almost 33 feet high. In the 3D viewer, however, they're nowhere near that high. They're barely higher than the green avatar dude. I bumped them up to 20 meters tall, almost 66 feet tall, and they only now look like they're approaching where 10 meters should have placed them, but still not quite there.

Is the scale in L3DT stunted vertically or something and is there a way to adjust it, 'cause it's really screwing with me in trying to get the relative heights of different areas down. :D

Any help is appreciated!
Wolfsong73
Member
 
Posts: 14
Joined: Wed Nov 25, 2009 8:54 pm

Re: Confused about scale...

Postby Aaron » Sun May 29, 2011 8:27 am

Hi Wolfsong,

How are you setting the heights of the border zone? If you're using the design map, then it's probable that the erosion effects used when generating the heightfield from the design map are eroding the heights of those areas.

There is no special scaling applied to the heightfield in the 3D renderer. The green army man mesh is 2 metres tall, and as you can see from the screenshot below, he's the same height as a platform I made in Sapphire (using the 'LevelAt' tool) that was also 2 metres tall. Thus, if features are flatter than you expected, it's likely because that's what's in the heightfield data.

ArmyManHeight.png
ArmyManHeight.png (49.98 KiB) Viewed 36247 times


Have you checked in the 2D heightfield view whether the heights are as you expect? You can double-click on the heightfield map to get the height values at each point.

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

Re: Confused about scale...

Postby Wolfsong73 » Sun May 29, 2011 11:18 am

Hey there, Aaron,

Thanks for the response :)

I haven't checked the height at each point in the heightfield view yet (still learning the ins and outs of this beast heheh), but I can definitely tell it's not as high as it should be when in the 3D view, etc.

As for erosion reducing the height of the terrain... does that happen even if you have no erosion set on the design map at all? I've literally just been blocking in the different areas using the pencil tool (nothing being set at relative) to get the contours where I want them. Then from there I'm creating the heightmap... Is there still erosion happening even if I'm not actually applying any on the design map?

Thanks.
Wolfsong73
Member
 
Posts: 14
Joined: Wed Nov 25, 2009 8:54 pm

Re: Confused about scale...

Postby Aaron » Sun May 29, 2011 2:03 pm

Hi Wolfsong73,

Wolfsong73 wrote:...but I can definitely tell it's not as high as it should be when in the 3D view, etc.


That may be, but please check the heights first in the 2D heightfield view to be sure. If you are sure there's a difference in the heightfield between the 2D and 3D views, please send the heightfield file ([your project name]_HF.hfz) to me (aaron@bundysoft.com) and I'll have a look at it.

Wolfsong73 wrote:As for erosion reducing the height of the terrain... does that happen even if you have no erosion set on the design map at all?


No, there should be no erosion in that case. Could you send me your map definition file (*.def.xml) also? It may help resolve this issue if I can see the settings you're using.

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

Re: Confused about scale...

Postby Wolfsong73 » Sun May 29, 2011 5:54 pm

Aaron wrote:Hi Wolfsong73,

Wolfsong73 wrote:...but I can definitely tell it's not as high as it should be when in the 3D view, etc.


That may be, but please check the heights first in the 2D heightfield view to be sure. If you are sure there's a difference in the heightfield between the 2D and 3D views, please send the heightfield file ([your project name]_HF.hfz) to me (aaron@bundysoft.com) and I'll have a look at it.

Wolfsong73 wrote:As for erosion reducing the height of the terrain... does that happen even if you have no erosion set on the design map at all?


No, there should be no erosion in that case. Could you send me your map definition file (*.def.xml) also? It may help resolve this issue if I can see the settings you're using.

Best regards,
Aaron.


Easy enough... I'll need to put together another sample which will be easy enough since I'm only blocking in basic areas.

Get it to you soon as I can...
Wolfsong73
Member
 
Posts: 14
Joined: Wed Nov 25, 2009 8:54 pm

Re: Confused about scale...

Postby Wolfsong73 » Sun May 29, 2011 6:30 pm

So, it looks like I may have inadverdantly figured out how to get the result I want.

Painting over terraces seems to do the trick.

According to the height map, an area I paint as a 20m high area shows as that.. However, without applying terraces, it just doesn't look "right" to me. However, when I add terraces, I get the effect I want (more vertical cliffs and less sloping hills)... but also, the elevations actually look right to me as well inside the 3D view.

Perhaps just a trick of the eye. Really can't say lol.

In any case, though, the terraces actually get exactly the effect I want.. this way I can go back in and smooth things out as I want.

Anyway... seems I'm good for now.

Thanks for your assistance and offer of help, Aaron. Much appreciated.
Wolfsong73
Member
 
Posts: 14
Joined: Wed Nov 25, 2009 8:54 pm

Re: Confused about scale...

Postby Aaron » Mon May 30, 2011 9:30 am

Hi Wolfsong73,

I'm glad you found a solution. I'll discuss the terracing effect at the end, after first discussing what I think might be real cause of the problem you described.

From my reading of your comments, it sounds like the perceived problem was that the terrain was too flat in the 3D view, not that the vertical scaling was wrong (these are two different things). The 'steepness' of the map depends just as much on the horizontal scale as it does on the vertical height range. If the height values in the heightfield are themselves correct (and I'll assert they are, unless you've checked them in the 2D view and found them to be wrong), then the reason the slope is flatter than you'd expect is because the horizontal scaling is too large.

To demonstrate what I mean, I've attached below a screenshot of a little map I've created with a horizontal scale of 1m per vertex, and a total vertical range of ~64 metres:

1 metre/pixel horizontal scale:
1m_gnd.png
1m_gnd.png (109 KiB) Viewed 36238 times


If I now change the horizontal scale of the heightfield to 2m, without changing any heights or vertical scales, the map looks much flatter (see below), even though the heights are exactly the same. This is because increasing the horizontal scale by a factor of 2 decreases the average slope by the same factor. Everything is spread out further.

2 metres/pixel horizontal scale:
2m_gnd.png
2m_gnd.png (62.8 KiB) Viewed 36238 times


If I go further and set the horizontal scale to 5 metres per vertex, again with the exact same heights and vertical scales, the map looks absurdly flat:

5 metres/pixel horizontal scale:
5m_gnd.png
5m_gnd.png (34.07 KiB) Viewed 36238 times


I stress that this is the exact same map as in the first image, but with a much larger horizontal scale, the effect of which is to change the steep hills into very shallow rises (of the same height).

Are you by any chance using the default horizontal scale of 10 metres per pixel? If so, the horizontal distance from one design map pixel to the next is 640 metres (1 design map pixel = 64x64 heightfield pixels, by default). This means that a change in height of 20 metres between adjacent design map pixels works out as an average slope of less than 2 degrees, which would be barely perceptible. The horizontal scale is set in the 'heightfield size' wizard when you created the map, and can be changed now in the 'Operations->Heightfield->Change horizontal scale' menu item.

With regards to the terraces effect; the terrace effect doesn't actually change the terrain height range as such. What it does do is increase the local steepness of terrain in the middle of a certain band of heights by flattening the terrain at the top and bottom of that band. Thus, it wont make hills taller, but it will make them steeper (and thus more noticeable) by flattening the crest and approaches to the hill.

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

Re: Confused about scale...

Postby Wolfsong73 » Tue May 31, 2011 5:28 pm

Hey there, Aaron,

Thank you for the additional information regarding the vertical versus horizontal scale.

I'm using a pretty "average" size for the map area... 1024x1024 with 1m as the scale.

I'd pretty much figured it had to do with the fact that it was a situation of the elevation differences being more "gradual", where it's a hill, rather than a cliff, that was throwing me off. Also, I think, the reason is because though you have that little green dude as a reference, the camera is kinda above and behind him, so it's difficult (for me anyway) to get a good bearing on it.

The goal I had was to create a map layout with very distinct barriers (cliffs) to define the areas, and then gradually increasing elevation for areas that a player will eventually be able to get to. It's really just to get things roughed out and save me the time of having to do all that "by hand" in the game editor itself. It saves a lot of time and guess-work in terms of distances, etc.

I have managed to get the base "skeleton" in place for the zone now after a few "dry runs" to work out a technique that works for what I'm after.

So, now I'm going to take the height map into the world editor for the game engine and proceed to tweak and "correct" the spots that aren't exact and so forth... I'll have to post a screenshot of the top-down texture map when I have the chance... kinda in a hurry atm (on lunch break :-p).

Anyways... Thanks again!
Wolfsong73
Member
 
Posts: 14
Joined: Wed Nov 25, 2009 8:54 pm

Re: Confused about scale...

Postby Wolfsong73 » Fri Jun 03, 2011 1:27 am

So here's a shot of the texture screen for that area map I was trying to work on when I started this post.

This is a solid foundation for me to work from. I've managed to get it into the game engine I'm using (Torque3D) for a prototype, and am going to begin work on getting assets imported to turn it into a proper forest region. I'll be sure to post screenshots as its' coming together as well.

I didn't use any erosion on it, as that would result in losing the steepness of the cliffs... though it would be useful in some of the flatter areas and in the waterlines ,so I might utilize it there.

Anyway... here ya are...

Image
Wolfsong73
Member
 
Posts: 14
Joined: Wed Nov 25, 2009 8:54 pm

Re: Confused about scale...

Postby Telarus » Fri Jun 03, 2011 8:14 am

Hi Wolfsong,

Looks pretty good. Have you considered generating 1 version of the same design map with a lot of erosion, and then blending them together with an alpha map?

I think Aaron mentioned that the recent "combine maps" feature supported an alpha map input. This way, if 255 on the alpha map represents your 100% "cliffs/terraces only map", and 0 represents 100% "eroded map", than mid-grey (127) would be a 50-50 blend between them.

You could then paint a map and even have 20%eroded in the cliff areas, and 80% eroded near the shorelines.

If you work with a image editor like Photoshop which uses alpha masked layers as a default concept, it should be pretty easy to "rough in" a quick alpha mask, and then Gaussian blur it a bit to blend the areas together. I did a similar trick while building my current map (and the hypsometric texture I'm using as a work guide).

I should post a few more pics here on the forum, L3DT has been invaluable getting this project together.

You'd have to search here on the forums for the combine maps function, once you have your alphas.
Telarus
Doyen
 
Posts: 112
Joined: Mon Jun 01, 2009 12:34 am

Re: Confused about scale...

Postby Wolfsong73 » Fri Jun 03, 2011 11:34 am

Telarus wrote:Hi Wolfsong,

Looks pretty good. Have you considered generating 1 version of the same design map with a lot of erosion, and then blending them together with an alpha map?

I think Aaron mentioned that the recent "combine maps" feature supported an alpha map input. This way, if 255 on the alpha map represents your 100% "cliffs/terraces only map", and 0 represents 100% "eroded map", than mid-grey (127) would be a 50-50 blend between them.

You could then paint a map and even have 20%eroded in the cliff areas, and 80% eroded near the shorelines.

If you work with a image editor like Photoshop which uses alpha masked layers as a default concept, it should be pretty easy to "rough in" a quick alpha mask, and then Gaussian blur it a bit to blend the areas together. I did a similar trick while building my current map (and the hypsometric texture I'm using as a work guide).

I should post a few more pics here on the forum, L3DT has been invaluable getting this project together.

You'd have to search here on the forums for the combine maps function, once you have your alphas.


Hey there...

Well that approach sounds like it'd definitely be beneficial for other areas of the world. However, with the setting the above map is for, a lot of those cliffs are going to be either covered over completely with things like boulders, overgrowth and things of that sort, or they'll be cut out as a hole in the terrain and replaced with 3d models of overhanging cliff models, tunnel entrances and the like. Other than that, it'll be tweaked and adjusted as necessary.

The distinct features you can see in it now will pretty much be difficult to distinguish once it's finished, so other than the erosion aspect, there's no need to really muck with that one further.

Definitely for other environments, though, I can see it being helpful.
Wolfsong73
Member
 
Posts: 14
Joined: Wed Nov 25, 2009 8:54 pm

Re: Confused about scale...

Postby Telarus » Mon Jun 06, 2011 1:25 am

Oh, gotcha. :wink:
Telarus
Doyen
 
Posts: 112
Joined: Mon Jun 01, 2009 12:34 am

Re: Confused about scale...

Postby Aaron » Mon Jun 06, 2011 8:57 pm

Hi Wolfsong,

Wolfsong wrote:I didn't use any erosion on it, as that would result in losing the steepness of the cliffs..


If you erode the areas with cliffs on them there should still be cliffs. The cliffs effect is added after most of the erosion is done, and so the cliffs won't be un-done by erosion (there is a slight effect, but not as much as you might think). Here's an example of an eroded cliff (note how it's still all cliffy):

ErodedCliffs.jpg
ErodedCliffs.jpg (115.21 KiB) Viewed 36170 times


In addition to erosion, I would also add some peak and fractal noise, as these would help to remove the sawtooth steps on the cliffs in your map.

telarus wrote:You could then paint a map and even have 20%eroded in the cliff areas, and 80% eroded near the shorelines.


Nice idea. Do you find this a better workflow than directly painting the erosion level on the design map before you generate the terrain? Just curious of your opinion.

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

Re: Confused about scale...

Postby Telarus » Tue Jun 07, 2011 8:20 am

Have to be honest with you Aaron, the Design map features are the probably the least understood feature for me right now. (Heh, and I even got decent result with the RainMaker script and v2.9 last week for some texture splatting work in Photoshop to edit into the final Attribute Map with the custom Climate I'm working on this week...Salinity..wow, that was an esoteric adventure). :o :lol: Design Map painting is the next adventure. :mrgreen:

The current workflow I'm investigating has involved editing a few mountain ranges into the Volga River Basin/Black Sea area for an RPG universe (Earthdawn, Fasa/RedBrick).

I'm working at a near 1km/px scale (although I actually have used my-scale/10 with the original vertical range in L3DT to get good results on certain passes/iterations, see below). I should cross post some of my work-in-progress to a new thread. Most of the editing and blending I've been doing with PS and Mudbox (mainly for the visualization possible with Mudbox, where you have PS like visibility layers you can pant on, and toggle visibility for). Oh, the Wacom Intuos 4 really helps bring out the best in those, also.

So, because I'm working close to a 1km scale (733m) I clipped out a lot of the sea floor depth, and would use the Adjustments> Curves function in PS to "push" (or stretch, I guess) the lowland detail into more of the image's 'range' (losing details in the upper altitudes). There is a "blend-if" option in Photoshop that let me apply this only to ranges above sea level(that was an interesting bit of math). This is now my "Res-Bumped" layer (I adapted the concept from Tom Patterson over @ shadedrelief.com). Then, the highland detail in the ResBumped layer get a custom smoothing pass, with a lot of brushwork, and then blended with a copy (on another layer) of the original DEM. See, with the raw ResBumped layer just blending with the original Dem (at about a 3:5 ratio) you get visually "noisy" artifacts in the upper altitudes. Once that has been smoothed out by the brush-work, you're basically projecting the original DEM onto a "bubbled" version of itself. This visual exaggeration of features that would normally dwarf our own personal human scale leads to "mountains that look like mountains", which is something some dead cartographer said which is now lodged in my head. (Thanks Eduard Imhof!)

Then, in Mudbox & PS, I setup a physical material with a red mask where I wanted the Mts to go. I used this to sculpt up the ridge-lines and peaks following the natural ridges on my DEM data in the other layer. Lots of slow brush work (I did some rough-outs of the same process in L3DT but the lack of brush-tip falloff, easy brush 'opacity' changes and layered visualization with the ability to export individual layers made more detailed work possible in the other tools).

What I found L3DT essential for was adding realistic visual complexity to the forms that I had added in PS/Mudbox (which, by themselves looked doughy or lumpy compared to the DEM data). I think I generated 3-4 various peak and ridge maps from PS/Mudbox, and then (this is when it got exciting for me, no srsly) I would import those into L3DT as 512x512 or 1024/1024 Design Maps, and change the Wizard Setting over a few iterations to get the feel I wanted. Armed with these, it was back into Mudbox so I could blend them with a high degree of control, and then layer them onto the ResBumped+Dem version of the original HF.

Here's two shot with a very basic color-by-height&climate texture, rendered in the UDK/Unreal3 Engine as a 2017x207 heightfield, with 4 adaptable LOD levels which blend intelligently between each other (I know, right?). Screenshot is from the Editor, with Game-Mode & Real-Time effects setup and enabled (depth-of-field, atmospheric fall-off). The vertical range has been scaled up by an arbitrary amount based on my artistic sense.

In the first shot, the mountains on the left are DEM data, and the center are edited in. In the second, the Mts on the right are DEM and all the ridges in the center are edited in. You can see the difference, but they're visually similar, which helps the immersion and suspension of disbelief.

Image

Image

I would NOT have been able to do this without L3DT.
Last edited by Telarus on Mon Jun 13, 2011 5:15 am, edited 1 time in total.
Telarus
Doyen
 
Posts: 112
Joined: Mon Jun 01, 2009 12:34 am

Re: Confused about scale...

Postby Aaron » Thu Jun 09, 2011 12:23 pm

Wow Telarus!

Thanks for the insight into your workflow. I can certainly see the advantage of using PS for its superior brush and layer support. It sounds quite fiddly, but the results speak for themselves. Bravo.

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


Return to General discussion

Who is online

Users browsing this forum: No registered users and 6 guests

cron