Open emaber opened 3 years ago
Hi there, yeah its an issue with our stuff.
The CPU option excludes too many Ocean features
Which features out of interest? The CPU should be a valid option, but is rarely used and probably way out of date
The trouble is that the dynamic waves are simulated at multiple resolutions/cascades, and these are copied into the displacement textures, and then a 'combine' pass integrates the data from all the cascades together. It's all mixed up together. See our siggraph talk from last year for more info about the combine pass.
I think an approach to this might be:
This separates the dynamic waves from the displacement textures. They would be combined separately, and sampled from the ocean shader. This means that the dynamic wave data wont be in the displacement textures that the queries sample.
The CPU option excludes too many Ocean features
Which features out of interest? The CPU should be a valid option, but is rarely used and probably way out of date
Multiple Gerstner Inputs and attenuation.
[...]
Lot of information that we need to work on before we can provide a proper feedback on the rest!
Our understanding was that the _LD_TexArray_AnimatedWaves contains both the AnimWaves and DynWaves, while _LD_TexArray_DynamicWaves contains only the DynWaves.
So we just tried to do the following in "QueryDisplacements.compute":
return (wt_0 * _LD_TexArray_AnimatedWaves.SampleLevel(LODData_linear_clamp_sampler, uv0, 0).xyz + wt_1 * _LD_TexArray_AnimatedWaves.SampleLevel(LODData_linear_clamp_sampler, uv1, 0).xyz) - (wt_0 * _LD_TexArray_DynamicWaves.SampleLevel(LODData_linear_clamp_sampler, uv0, 0).xyz + wt_1 * _LD_TexArray_DynamicWaves.SampleLevel(LODData_linear_clamp_sampler, uv1, 0).xyz);
But it does not seem to work.
Thanks a lot for the quick answer for now. I'll update here once we work more on your proposed approach.
Two problems with naively subtrating dynamic waves from animated waves:
But i thought of an alternative approach that may work and be better:
This is probably better as it avoids messing with the animated waves (which are used for foam and stuff), and avoids messing with the ocean shader.
we are trying to use DynWaves as a cosmetic feature only, but we don't want the dynamic waves to impact my simulation which is based on Ocean queries using OceanRenderer.Instance.CollisionProvider.
Unfortunately there seems to be no way to exclude DynWaves from the query.
Things we already explored:
Is this something that can be achieved already, or planned in any way, or what would be the best approach to look into this?
Thank you