Large cloud layers and voxels... imrovements possible?

Started by pokoy, September 03, 2019, 08:37:09 am

Previous topic - Next topic

pokoy

The nature of my work often forces me to show quite large cloud layers. However, even when using the highest possible voxel resolution the layer often ends up with way too few voxels to look convincing, sometimes a cloud layer only has 6 or 7 voxel rows in Y-direction, way too few over a span of 200 or more meters too look realistic.

What if voxel resolution could be higher in proximity to the camera... This may have side effects in animations I guess but for stills it would make quite a difference - if it's technically possible in the first place, of course.

Matt

I'd like to try implementing this, but I'm unclear how often it would be useful, because (1) it only affects lighting (2) lighting operates in world scales and depends mostly on cloud density, so if you don't have enough voxels in the foreground you probably don't have enough in the background either. The denser the cloud, the more voxels you need. If your background clouds are as dense as your foreground, the only solution that works realistically is to increase resolution across the whole cloud.

Can you show some examples where more voxels would help the foreground but not the background?

I suppose you could taper down the density in the background so that it doesn't need as many voxels, then you could benefit from more in the foreground. Do you have a setup like that?

Just because milk is white doesn't mean that clouds are made of milk.

Matt

Or are you talking about exported VDBs? In that case, yes, I am thinking about multi-resolution capabilites.
Just because milk is white doesn't mean that clouds are made of milk.

pokoy

Not VDBs, cloud v3 layers.
Hmm I want to cloud to look better, it lacks definition. Let's say a cloud layer set to 60km radius looks 'milky' and dull compared to the same layer with a 20km radius, which I assume is because the voxel resolution is higher leading to a more 'defined' cloud look.
If I increase density closer to the camera - probably by using the distance node? - I'd also change the look of the cloud, correct? That's not exactly what I want, I'm looking for a better defined clouds closer to the camera.

I could be missing something... I'll try to render some image examples of what I mean.
Thanks!

Tangled-Universe

Only practical suggestion I have at this stage, but it might indeed affect animations negatively, is to feed your cloud fractal into 2 cloud v3 layers, one very large one for distance and one smaller one with higher voxel number and blend those using the masking function using a simple shape shader.
However, as Matt pointed out, lighting may not match or look inferior for the large cloud layer.

cyphyr

You say you are using the highest possible resolution; I may be miss-understanding but I was not aware that there is a "highest resolution" for voxels in clouds.

Can you not just type in a higher number into the "Millions of voxels" field, maybe a 100 or so?
www.richardfraser.co.uk
https://www.facebook.com/RichardFraserVFX/
/|\

Ryzen 9 3900X @3.79Ghz, 64Gb (TG4 benchmark 6:20)
i7 5930K @3.5Ghz, 32Gb (TG4 benchmark 13.44)

Oshyan

Currently the internal "hard" limit is, I believe, 1000 million (i.e. a billion voxels).

As far as the actual issue you're facing, I think it is premature to assume it results from a lack of voxels. As Matt said, the voxels influence the shading/lighting calculations, but they do not directly influence the detail, i.e. edge detail, definition, etc. It's a bit tricky because of course lighting detail is a part of all of that, but you can have very detailed clouds even with very non-detailed lighting calculations, for example.

Can you post an example of the problem you're seeing?

- Oshyan

Matt

No, that limit was increased in v4.3.21. The maximum voxel buffer size is now 32768 x 32768 x 32768, and the software limit on the number of voxels is 1 trillion.
Just because milk is white doesn't mean that clouds are made of milk.

Oshyan

Then it's definitely not a voxel count issue, unless you're running out of RAM, eh? :D

- Oshyan

N-drju

TBH I have never seen low-quality problem in either v2 or v3 clouds, unless I set their detail to below 0.7.

Quote from: Oshyan on September 05, 2019, 12:41:18 amAs Matt said, the voxels influence the shading/lighting calculations, but they do not directly influence the detail, i.e. edge detail, definition, etc.

I concur. Detail in clouds, density shader resolution (# of octaves?), edge hardness and the detail of the render node is what I mostly use to get clouds "HD". Not to mention that "Defer atmo" itself can salvage even the crappiest skies...

On the other hand, my needs may be way different from pokoy's. Still, I don't quite understand how voxel number could be linked to low detail in clouds...
"This year - a factory of semiconductors. Next year - a factory of whole conductors!"

pokoy

Thanks for all the thoughts, guys.

So - of course a lower voxel resolution will affect how defined a cloud looks. Fair enough, I could have been more specific in that I should have pointed out that the lighting and shadows lack definition, not the noise detail. I thought this was obvious when I mention voxels.

Here's a quick animation that shows this, voxel resolution goes from 0.001 to 1000:


Clouds_Voxel_Resolution_animated.gif

Also attaching the individual frames.

Clouds start looking nicely once the voxel resolution is high enough. For this cloud, voxel count at 0.1 or 1 is already good. However, once the cloud layer is way bigger, say 50 kms across, voxel resolution is too low and the resulting cloud lacks enough lighting detail, it starts to look flat.

I'm glad I posted this, otherwise I wouldn't have learned that the voxel maximum count has been increased - thanks for this Matt! I need to try now but I guess this will help a lot in the kind of stuff I am trying to achieve.

BTW, any progress on exporting VDBs on Windows? I would love to get some of the cloud out of TG, this would help a lot with some projects.

N-drju

Thanks for these pics pokoy. Very interesting to see these changes.

Now that I can see it, I'd say that the problem you have on mind revolves more around the accuracy of shading rather than a cloud form itself. What I would suggest however, to dig a little bit more into this, is that you share a render of a huge cloud you mention with us. This way we can further analyze.

But rest assured, I have also produced some rather large clouds in my renders. Some 40 x 25 kilometers across. To be honest, I have never got any results that I would call unsatisfactory.
"This year - a factory of semiconductors. Next year - a factory of whole conductors!"

pokoy

I tried to show this on my original scene with the large cloud layer but when changing the layer's size to compare between the sparse and the dense voxel cloud, it would also change the layer's coverage for some reason which made it impossible to do a 1:1 comparison. It was easier and faster to render to do this on the small cloud above, and it shows the behavior perfectly.

Now that I know that the limit of 100 millions has been lifted I'll try to increase the voxel count and see how far I get. The difference between, let's say, 10 and 50 voxels is already very visible in terms of lighting definition so I guess it will help now that I can use higher numbers.

Thanks for the help.

I still think that the original request makes sense. If it's possible to balance the voxel resolution towards the camera you practically end up with something that looks good even if the voxel count isn't exceedingly high, which also saves RAM and renders faster. Still not sure if it's possible since, if done right, it would need to take into account the size of the cloud in the frame as well which then needs some analyzing of the final frame which probably isn't too easy to achieve. Then again, it would be similar to photon caching in screen space which has been done for various renderers so it's not completely out of reach... who knows.

D.A. Bentley

Quote from: pokoy on September 05, 2019, 08:33:33 amBTW, any progress on exporting VDBs on Windows? I would love to get some of the cloud out of TG, this would help a lot with some projects.

@pokoy - You can use the VDB Export pretty easily under Windows within Linux using the Windows Subsystem for Linux as shown here:
https://planetside.co.uk/forums/index.php/topic,26130.msg259725.html#msg259725

I's a little bit of work to get set up but worth it.  ;)

-Derek

pokoy

Totally missed this one, already thought of installing Linux on another machine as a parallel OS but this is a good option as well.

Many thanks, much appreciated!