Fun With Heightfields

Started by Asterlil, May 05, 2019, 06:57:14 PM

Previous topic - Next topic

Asterlil

My scene is to be of a teahouse. I have created a heightfield map and dropped it onto terrain, then modified its verticalness a bit. On the top plateau I found a sort of irregular pockmark which I filled with water; it will make a nice koi pond with an arched footbridge. Here's the scene with just one base shader:



I decided the scene needs a few hillocks on the plateau, so I follow Vlad Chopine's instructions and create an inverted crater. I modify it on the terrain till I have something I like, ready for displacements.



Now I pick some coordinates on the plateau of my heightfield and paste them to the inverted crater, and ... it doesn't show up. Can I convert a heightfield to a terrain? I created that crater by right-clicking on the heightfield node to access displacement nodes, which I presumed would marry the two, but clearly I'm wrong. How do I get my crater hill to show up where I want it? Here are the relevant nodes.


Dune

This should work, as far as I can tell, if you put in the right location, picked up from the preview. But I never work with heightfields and prefer drawing my heightfields as a greyscale map (16-bit) to be imported as an image map.
What if you rightclick in preview, copy location and make a new (circular if you like) simple shape of say 20x20m and paste in those locations there, then use that mask to displace, just to see what happens...

Asterlil

Well, the simple shape shader comes up, and the node is inline after the heightfield but before "compute terrain", i.e., not a mask. It didn't show up at first because I hadn't enabled displacement, but after I clicked that and played with the numbers I got this:



On adding the crater, I got no change in the heightfield: there is no displacement tab. I need to go back and review the geekatplay tutorial to see how Vlad achieved displacements on his inverted crater.

If I attached the crater node directly to the heightfield mask input, the heightfield disappears entirely! What you see here is the underlying terrain.


Dune

The crater shader doesn't work as a mask, it's a displacement shader, so the previous way you linked should be okay, not this one. Maybe you should try raise some values, see if it turns up. Perhaps the values (height/width/depth of crater or so) are just too insignificant for the scene scale. Or perhaps the mask input of the crater shader is checked, with no mask there. That may sometimes occur with some shaders.
And if you really can't figure it out, zip up the scene and post here. There's bound to be someone fixing it.