Planetside Software Forums

General => Terragen Discussion => Topic started by: PeanutMocha on May 02, 2011, 06:56:12 PM

Title: Heightfield Merge: High and Low Resolutions
Post by: PeanutMocha on May 02, 2011, 06:56:12 PM
I have two BMP's that are 1024x1024.

The first I load with a heightfield load node and georeference it to cover one degree.

I then create a heightfield merge node, which references a second heighfield load node that's georeferenced to cover 0.1 degrees (see screenshot below).

My intent is to provide a high-resolution heighfield covering the lower-left 0.1 degrees, with lower resolution for the remainder of the 1x1 degree area.  However, the second heightfield seems to be re-scaled to cover the full 1 degree as well.

Is this the expected behavior?  Is there a better way to accomplish what I'm looking for other than tiling the whole 1x1 degree area into 100 0.1x0.1 degree areas?

Title: Re: Heightfield Merge: High and Low Resolutions
Post by: Henry Blewer on May 03, 2011, 08:10:25 AM
You might try loading each heightfield separately. Render an orthographic camera view from directly over head. You can get a very high resolution image doing this. This image (greyscale) can be used to drive a displacement shader using an image map shader with the rendered heightfield images. You'll need to use two cameras to project these images onto the y axis. You will also have to setup the cameras in the proper locations for the image map projection. It's not too hard to figure the camera locations. Write down the location for the larger heightfield render.
Title: Re: Heightfield Merge: High and Low Resolutions
Post by: Tangled-Universe on May 03, 2011, 08:46:27 AM
You need to create 2 heightfield-shaders, each with a heightfield-load as input and set the desired sizes and coordinates.
Then use the output of the (red) heightfield-shaders as input for a normal merge shader (create shader -> other -> merge shader).
Title: Re: Heightfield Merge: High and Low Resolutions
Post by: Matt on May 03, 2011, 09:13:23 PM
Follow Tangled-Universe's steps, except there is no need for the Merge Shader. The Heightfield Shaders can be chained one after the other (this is done automatically if you add them using the Add Terrain button near the top left of the window in the Terrain list), making sure that the smaller heightfield comes after the larger one.
Title: Re: Heightfield Merge: High and Low Resolutions
Post by: Tangled-Universe on May 04, 2011, 03:22:49 AM
Oh indeed, duhhh :)
Title: Re: Heightfield Merge: High and Low Resolutions
Post by: bobbystahr on May 14, 2011, 03:09:39 PM
Great thread...answered a query I didn't even know to ask about...LOL.. ...