Jump to content
MisterP

oceanfx reduce tiling pattern

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
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?

Share this post


Link to post
Share on other sites

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.  

Share this post


Link to post
Share on other sites

Is the Ocean Map Math VOP an otl you created?  I don't see it in houdini or in the help anywhere... Thanks

Share this post


Link to post
Share on other sites

The simply way is to paint point mask little bit there and there on your plane add some vops sop noise with mask from points and thats all. Diffferent reflection do the rest.

Share this post


Link to post
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. 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×