FSS and render times

Started by sboerner, February 21, 2020, 11:49:04 am

Previous topic - Next topic

sboerner

As a test I substituted a layer of fake stones with several populations of high-poly imported stones in my Deep Cut scene. (I was looking for better control over the stone distributions.) The new stone pops use the same surface shader as the FSS. The rendering time dropped by 35 percent! (From more than 12 hours to less than 8.)

Can this be right? I'll be running another test tonight to make sure this wasn't a fluke.

Tangled-Universe

That does not surprise me as the fake stones shader are procedural displacement functions which need to be accessed multiple times by the legacy renderer, that's different for objects which are not procedural and don't need evaluation of surface displacement.

WAS

Objects simply handle faster in TG so long as they're not over-complicated. The FSS is a voronoi shader (which is not the fastest inherently) and has special properties such as elaborate masking and offsetting, and considering you can offset them without a compute terrain with normalized output, it must have some sort of internal computing as well.

More merges your stones have the more render time will be added too.

sboerner

QuoteMore merges your stones have the more render time will be added too.


There were three FSS nodes plus two merges, so as you say that would add to the rendering time. 


Quotethat's different for objects which are not procedural and don't need evaluation of surface displacement.


Yes, and so you lose the ability to easily add displacements to the rock surfaces. (You could use force displacement on the populated objects, I guess, but that would probably increase rendering time again.)

I'm still a little surprised at the difference. Might be something to consider for future projects. Done right, you need multiple populations for different rock shapes and size ranges. So they take some time to set up. But that may be a good investment given the time saved on rendering. (Or you can trade that time for higher quality settings elsewhere.)

Dune

If you need the better/finer displacements of fake stones, you could restrict them to front, and use pops further back.

WAS

You can use mesh displacer on imported objects, like a sphere for a rock pop that's more detailed. Hopefully one day the mesh displacer can sample at location for unique rocks.

Might even be able to fool the micro exported to export them for use later

sboerner

So this has taught me to be more careful when deciding to use fake stones.

Fake stones seem to work best in conventional scenes, those that don't have a lot of extreme displacements or surface shear. It's easy to quickly set up several layers of different sizes and avoid overlaps with merge/use highest. Surfaces are easy to shade, displace and randomize. They blend well with the surface and can look very natural. They don't, however, play well with altitude and slope constraints. Individual rocks either get chopped off (fuzzy zone = 0) or fade away (fuzzy zone > 0), and neither looks very good. Sometimes it can be a challenge to achieve perfect texture/displacement alignment. Sometimes the shapes can get pretty funky.

Populations of imported rock populations are harder to set up and blend with the surface. Unless they are very high-poly, force displacement is needed to avoid smooth silhouettes. When combining several layers collisions are inevitable (unless you are also very careful with masking). But individual rocks are either placed, or not. So they work well with constraints and PF masks. Errant instances can be moved or edited out. Aligning textures isn't even a consideration. Worldspaced shading nodes can be added to each stone's internal network to unify larger patterns across populations. And they render very quickly.

Populations of the native rock object are another category. I haven't had much luck with these. In looking through the forum the consensus seems to be that this is a legacy feature that is best avoided.


QuoteIf you need the better/finer displacements of fake stones, you could restrict them to front, and use pops further back.

Good idea.

QuoteYou can use mesh displacer on imported objects, like a sphere for a rock pop that's more detailed.
Yes, maybe do this for closeup objects.

WAS

I wonder if matt could program alt/slope limits into the shader itself, and use the "density" type effect to cut out rocks at fuzzy zones. Rather than fading them away, they just thin out to nothing. This means you'll need probably room in your fuzzy zones for it to look nice, but I think the effect would be 100% more real-world. There should be a way to isolate voronoi shapes just like the density function already in place, and use that along fuzzy.

Dune

Yes, the trick is to make hard maps, but still with small fuzzy zones, and try to cover up nasty parts where black meets white in the mask (or exploded stones). It's an amazing feature in TG, but does have its drawbacks. I also often have problems restricting stones to slopes, but still get them uniquely and completely colored/textured. But I am glad it's there anyway.

sboerner

QuoteBut I am glad it's there anyway.
Yes, absolutely. My point was that I've learned not to reach for the fake stones shader out of habit. Most of the time it works great. But it's not always the right answer. You have to weigh the pros and cons, and you can save a lot of time if you make thoughtful decisions early on. And that just comes with experience.