MisterP Posted May 29, 2014 Share Posted May 29, 2014 (edited) 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 oceanWaves_v004.hip Edited May 29, 2014 by MisterP Quote Link to comment Share on other sites More sharing options...
xray Posted June 12, 2014 Share Posted June 12, 2014 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. Quote Link to comment Share on other sites More sharing options...
JoshJ Posted June 13, 2014 Share Posted June 13, 2014 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? Quote Link to comment Share on other sites More sharing options...
xray Posted July 2, 2014 Share Posted July 2, 2014 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. Quote Link to comment Share on other sites More sharing options...
JoshJ Posted July 2, 2014 Share Posted July 2, 2014 Is the Ocean Map Math VOP an otl you created? I don't see it in houdini or in the help anywhere... Thanks Quote Link to comment Share on other sites More sharing options...
blackchicken Posted July 3, 2014 Share Posted July 3, 2014 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. Quote Link to comment Share on other sites More sharing options...
xray Posted July 8, 2014 Share Posted July 8, 2014 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.