Need to resize Heightfield-Solved

Started by PabloMack, January 15, 2014, 09:11:10 PM

Previous topic - Next topic

PabloMack

I am disappointed with the limitations on the Heightfield via image load shader. Its scale is fixed at 1m per pixel so that I get a really rocky texture to the surface. Instead I just want to gently lift the terrain and let the fractal generator create the surface texture. I am trying to create a heightfield that is 6km X 4km at its base but I only need to have an image resolution of 384 X 256 pixels that would be scaled to that size. Terrain should be linearly interpolated between pixels of the image defining the heightfield and I also need to scale how much altitude is added to the terrain by the brightest pixel (white). I remember that someone did some sort of displacement thing but I don't know how to do that. Could someone please point me in the right direction?

In this render, you can see how the texture changes about half way up the picture due to the heightfield pixelation.

Oshyan

It sounds like you need to do a lot of heightfield-specific stuff. You should probably be using a heightfield load node then and not an image map shader. You can still load image formats. Then use a Heightfield Resize and/or Adjust Vertical operator to accomplish your adjustments.


Edit: now seeing your example, I have to wonder if this is an 8-bit (per channel) image format you're importing. If so that probably has a lot more to do with the problem than scaling issues. The limited accuracy is going to cause "stepping" artifacts, and depending on the format (e.g. JPG), can also cause noise.

- Oshyan

PabloMack

#2
The node I am using is indeed called a "heightfield load" and it is fed into another node that is called a "heightfield shader". I have created a ter file using "Terresculptor" from the same source object but what it produces is even rockier looking than when I use the image and has little resemblance to the source mesh it came from. The heightfield produced the rocky stuff on the far side of the lake.

[attach=1]

This is what the heightfield should look like:

[attach=2]

I have figured out how to resize it using a "heightfield resize" which seems to work but the basic result seems to be wrong.
These are the options for export from Terresculptor:

[attach=3]

Oshyan

The result in Terrasculpt already looks quite banded and rough. Is that intentional? I presume you're exporting as Terragen TER? I think the problem is in the source program, as evidenced by your screenshot (it may be exaggerated in Terragen, but it's coming from the original file).

- Oshyan

Dune

Aren't these bands kind of smoothly interpolated in TG? And can't you convert this object into a vector displacement map and use that to displace? Although it doesn't seem to have overhangs, so a basic gray image of 16bit (paint these hills in PS) would give a smooth terrain as well.

PabloMack

#5
My fault. I had "Add Fractal Detail" enabled in the heightfield shader. The thing that confused me is that fractal detail looked completely different when using the ter file. But I am sure that this accounts for the roughness I was seeing before.  Dune was correct in that it seems to be interpolating between heights. The ter file was built from low-res at only 384 X 256 which works out to about 15m per point. After disabling "Add Factal Detail" the surface texture now seems to be derived only from the fractal terrain node as expected. Now I think I understand why this Fractal Detail looked so extreme after starting to use the ter file. After loading the ter file with a new heightfield loader, I had to scale it up using a heightfield resizing node which then scaled the fractal noise up with the geometry. Interesting.

Now I am left with the problem of a floating pine forest. "Sit on terrain" is enabled for the population. The place where my camera is sitting is about 16km away from the origin of the coordinate system. Does the curvature of the planet cause the terrain to peel away from the plane that the vegetation is sitting on or should the trees still sit on the actual terrain even when getting far away from the origin?

TheBadger

I rather like the terrain in Pablo's second post (image1), the mistake terrain. I can't really tell for sure because of the size, but it looks interesting to me. I guess we shouldn't forget about happy accidents when we work hard to be precise.
It has been eaten.

PabloMack

#7
Quote from: TheBadger on January 16, 2014, 12:11:22 PMI rather like the terrain in Pablo's second post (image1), the mistake terrain.

The same thought entered my mind (Serendipity!). When I saw it I was reminded of the "stone forests" in Madagascar. My wife and I are planning to visit the island (though possibly not a locality with these formations) in November if the trip doesn't fall through.

http://www.dailymail.co.uk/news/article-2126941/Life-edge-Inside-worlds-largest-STONE-forest-tropical-rain-eroded-rocks-300ft-razor-sharp-spikes.html

UPDATE: The floating Pine Population is also solved. I had "Use Y for Altitude" checked which would have made the spherical horizontal diverge from a fixed Y as your distance from the origin of the coordinate system increased.