Jump to content

oceanfx reduce tiling pattern


MisterP

Recommended Posts

Hi,

 

I would like to blend multple ocean spectra together to get rid of the visible tiling pattern, however merging/mixing different spectra together doesn't quite work, unless they have the same gridScale and resolution.

 

I would ideally like to keep the solution as upstream as possible, so ideally at volume/spectrum level, as this would allow to drive potential subsequent flip sims which rely on spectrum data neatly, but I'm not sure if this would be feasible.

 

Can you recommend a nice and tried workflow to add a low frequency noise to break up the pattern?

 

Thanks

MisterP

post-6884-0-95908700-1401378181_thumb.jpoceanWaves_v004.hip

Edited by MisterP
Link to comment
Share on other sites

  • 2 weeks later...

I've achieved this in the past by "notching" the ocean spectrum frequencies using multiple ocean spectrum SOPs to generate several discreet height maps of varying resolution. The default Ocean Spectrum SOP does not work well for this, however, since it only supports a "min wavelength" when you need both a min and a max wavelength. One may modify the VEX snippet inside of the calc_amplitude_for_normalize VOP SOP in the ocean spectrum to add a frequency clip for a max wavelength.

 

Once this is set up one can generate multiple wave height maps at varying resolutions, one per notched frequency, and then use a bespoke vex shader to combine the output height maps into a final displacement value.

Link to comment
Share on other sites

Sounds intriguing, I'd like to try "notching" the frequencies, but I would need more information to get started.  So I have some questions.

 

1) in your final vex shader to combine the height maps, do you just add them together?

 

2) How do you know the resolution to set and value to clip, so that you end up with the correct settings for one of the frequencies?

 

3) In which way do you set the UV for your "rendering grid"?  Usually I've just let the ocean evaluate set the size for me...  and since you have multiple ocean spectrums with different resolutions, will the maps generated all use the same UV set?

Link to comment
Share on other sites

  • 3 weeks later...

1) Each ocean map is read into the shader via an Ocean Map Math VOP. The _len output of each Ocean Map Math VOP is added together. The normalized result of the add becomes the displacement normal and the length of the add becomes the amount of the displacement. 

 

2) I set the resolution exponent the same for all the maps except the smallest. It should be high enough to resolve all but the smallest notched frequency. The smallest frequency gets a resolution exponent one greater than the rest. The scale and min/max wavelength values get eyballed in. 

 

3) The Ocean Map Math uses P as an input for S and T for the texture map. I transformed P from current to world before connecting it to Ocean Map Math.  

Link to comment
Share on other sites

Looks like "OceanMapMath" is a VOP SOP that I created. It's been a while. 

It's a wrapper for the texture VOP which transforms P into the proper space for each map using the grid size from each OceanSpectrum. 

It's a component of my displacement shader for combining the notched displacement maps. 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...