Coming out of hibernation

Started by blattacker, September 14, 2023, 04:07:27 PM

Previous topic - Next topic

blattacker

Got a little frustrated at my day job this week and decided to do my first Terragen render in....over a year? It's nothing special, just trying to get back into the flow of things with a basic snowy mountain with some clouds, but I ended up really happy with how it turned out! 
I have a couple variants as I also tested out a Terragen to Lightroom Classic workflow, and couldn't (and still haven't) settle on a look for the final image. Let me know what you think!

Hetzen

Good job.

I like the rock texture. Have you smoothed and displaced the snow in the surface layer? Might want to give that a try if not.

blattacker

Thank you!

Quote from: Hetzen on September 14, 2023, 05:56:59 PMHave you smoothed and displaced the snow in the surface layer? Might want to give that a try if not.

I have not yet. The terrain was generated in World Machine and I am still woefully inept at adjusting/displacing an imported heightfield. It's something I hope to get better at though! Thanks for the suggestion!

Dune

I actually don't know if these heightmaps can be smoothed. Unless WM has smoothed the snowy parts to begin with, you may not get smooth snow.

blattacker

Quote from: Dune on September 17, 2023, 02:22:04 AMUnless WM has smoothed the snowy parts to begin with, you may not get smooth snow.
I could absolutely add snow in World Machine if it can't be added in Terragen. If being a heightmap does indeed prevent me from smoothing the terrain in Terragen, that would certainly explain why I've never been able to figure it out!

Dune

The only thing that comes to mind in such a case is to try smoothing the heightmap in Photoshop, and import both, masked/separeted by the WM snowmask.

Hetzen

The compute terrain does the smoothing, by giving it a larger gradient patch than the resolution of the heightfield. If 1 pixel in your HF is 10m, then a gradient patch in the compute terrain could be 20m or more to be a smoother version.

Dune

Are you sure it works that way with an imported terrain? I mean, using a displaced tiff doesn't give any difference between using a computed patch or not using a compute terrain at all, so I guess you mean a ter file? I never work with those, so I don't know.


Dune

I've just imported a tiff, displaced it, but I don't see any difference with or without the compute terrain. But I haven't got a fine WM terrain file to test it properly, I must say.

Hetzen

Have you tried using a SL with the smoothing effect on? That's how I've been doing snow recently. I used it on an exported TIFF elevation as well.

This is the part I'm referring to in the help link:

"Smoothed texture coordinates"

The Compute Terrain node performs both of the above functions (surface normal and texture coordinates). However, when it calculates the texture coordinates it actually generates a slightly modified version of the coordinates which are later used for special effects in the Surface Layer, and these are the "smoothed texture coordinates".

The smoothed texture coordinates serve as a smoother version of the terrain that can be utilised by the "Smooth effect" in the Surface Layer shader. These smoothed texture coordinates are also essential to the correct functioning of the "Intersect Underlying" feature in the Surface Layer. This is broken in the current public release (build 1.8.76.0) but has been fixed and improved for the next update.

The scale over which the smoothing effect operates is controlled by the "patch size" in the Compute Terrain, and this therefore affects the results of the "Intersect Underlying" feature. I intend to provide some documentation on this upcoming feature when we release the update.

Dune

Sorry to hijack the thread guys, but...

This is what I mean; it doesn't completely smooth the snow, like it would procedurally. I often see that bumpiness in renders that have snow, with terrains coming from WM or Gaea. Not noticable on distance but up close.

I added a tgd, but no tiff, fill in any tiff for that. I set displacement to convert to lineair to exaggerate the effect.

The smoothing filter doesn't work on a tiff either.

blattacker

To be fair, I'm importing a .ter file and using the Heightfield shader, not the Image Map shader.
That being said, my issue with changing the gradient patch size is that it smooths all of the terrain, so (unless I'm mistaken), I would have smoother snow at the expense of losing detail in the terrain itself.
I could theoretically do a heightfield smooth operation on a duplicated copy of the heightfield, and then merge using the snow mask as the mask, but that seems like a lot of effort to go through when I can pretty easily just adjust the heightmap in World Machine and re-export it.

Hetzen

If you look in the 4th top tab in a surface layer, you'll see the smoothing tab. Check the smoothing effect box. Then set your altitude and slope constraints as you would snow, and where the snow is in your existing scene, the surface should be the smoother.

Dune I'll have a close look at your scene tomorrow, I'll have a bit more time then.

Hetzen

I'm sorry for hijacking as well, but as we're talking here it sort of makes sense to continue here.

I did a load of tests, and it looks like we're both right. What I found was that the smoothing in the compute terrain doesn't really get rid of high frequency noise, though it does push/pull the terrain shape towards the patch size you set. I think when I was using it, there wasn't that much noise in the areas I wanted snow.

The .tgd I used to create these two samples is linked below.

Without the smoothing effect
Without.jpg

And with
With.jpg

Which creates a nice snow drift effect.

If you want to try the .tgd below, it uses a Generate Heightfield node, which you need to click on 'Use Shader' tab to generate. This essentially creates a .ter of what ever you input. You can adjust how many points you want to sample, so you can experiment with different versions of the input terrain.

Settings.JPG

You could potentially mix between a sharp and soft version, but that could get complicated with how you mask that to a slope. Probably best to stick with what you know and do in WM. But to be fair, your mountain looks really good, getting some of those erosion masks out of WM might help get some variation in where your snow accumulates.

Sorry again for taking things off on a tangent.