Jump to content

Hot (houdini Ocean Toolkit)


Sean Lewkiw

Recommended Posts

Hi,

I've been using the HOT a bit, so first off, thanks to Drew. It looks great. However, I am having a few little problems.

I have created a VOP using the ocean_eval call, and everything seems to be more or less right, EXCEPT the noise scale is way off. It's a total mess. The whitecaps show up in the right place, (same as the compiled shader), but the Chop is all wrong. Anyone willing to look at my VOP network and see what's wrong? (Attached file, ocean.txt, just "source ocean.txt" in a houdini file.)

The reason I'm going to all this trouble is I want to paint attributes on my grid, to, for example, make the frequency of the waves less in some areas, (to paint "calming" on the water, much like you would see in a real ocean). I thought I could just paint colours on my grid, then rename them to be the name of the attribute used by the shader. This is the way all shaders work in Houdini. So, I've got a geo attribute called height_scale, which is what the shader uses. However, the shader seems to be taking the value of "height_scale" of the first micro-polygon and applying that to everything. So it does work, but not on a (interpolated) point by point basis.

Any help would be much appreciated.

Sean

ocean.txt

Link to comment
Share on other sites

Hi Sean,

I just took a quick look at your script, I couldn't get it displacing properly, not sure what was going on. However, rather than trying to debug it, I would suggest you install the HOT.otl that I put in the distribution which has a pre-made "HOT_Ocean_Eval" VOP that you can use instead of using inline source. This way you can be sure that you are getting the parameters right (assuming I haven't stuffed it up :-). Here's a picture (straight away I notice some parameter types differing).

hotvop.jpg

All except the s and t parameters are effectively detail parameters, ie you can't vary them via point attributes. This is pretty much dictated by the Tessendorf algorithm. To get the sort of effects you want I'd suggest that you paint an attribute and use that to scale the output displacement, and to have it effect different bands of the wave field you can add together displacement from multiple ocean_eval()s, with different sizes and associated parameters. I imagine you want the larger underlying waves to be less affected by wind the higher frequencies.

In general it's worth using SOP_Ocean on a suitably sized and detailed XZ grid to play with the various parameters interactively, then transfer them to shaders.

One of these days I hope to get around to packaging up a more fleshed out all-included Ocean system in the OTL, but Real Work TM keeps getting in the way. I'm currently off in the world of real-time graphics and C++.

-Drew

Link to comment
Share on other sites

Hi Drew,

Thanks for the response, I really appreciate it. Shortly after sending my post, I remembered seeing an OTL around, so I did indeed slap it in and tried again, and indeed I got exactly the same result. I wonder if it's the way I'm changing shading spaces or something.

I am also getting tiling problems.... you can definitely see the pattern repeating in a really large ocean. Have you seen this before?

Thanks again in advance,

Sean

Link to comment
Share on other sites

  • 5 months later...
  • 4 months later...

So far with HOT I've been using the surface shader included with the simpleshader file included by Drew in the HOT distribution and have been relatively happy with it.

However, I am interested in adding foamy whitecapping. Drew showed a nice HOT image with noise multipled by the exported eigenvalues.

Does anyone know of a good surface shader that includes this whitecapping/foam effect?

I've got a simple version of my own constructon but it's rather...simple.

If anyone has any leads I appreciate it (I did find an interesting discussion thread on foam behind boats and such here on odforum but that's not what I'm needing right now).

Thanks.

Link to comment
Share on other sites

Speaking of the above HOT otl, I can't seem to construct a VOP network that will correctly displace the ocean surface.

Just wiring the HOT_Ocean_Eval VOP to the displacement output makes my surface vanish.

I've tried Sean's variant but that doesn't create a correct surface either.

Is there anything else that would be expected in the network to make it work?

Thanks for any ideas.

Addendum: Just figured it out, I think. The ocean_eval VOP is using s/t parameters whereas the vex code is using an ocean_eval with Px/Pz.

If you use a grid of 1x1 it works fine. So I used a UV Space Change VOP with world space P to get to s/t and it seems to be behaving now. I'll go with it.

-Len

Edited by len
Link to comment
Share on other sites

You may have run into a bug I discovered recently. If chop is off the x and z components of the displacement aren't being initialised to zero. I'd missed it because I was using hand coded vex shaders instead of VOPs. It's now fixed and I should get a new release out for H9 in the next few weeks. The new H9 VOP SOP is a great way to play with the Ocean VOP, and I was surprised to find that it's not that much slower than the native c++ SOP. It also allows people an easier way to play with the eigenvalues for generating foam and spray.

-Drew

Speaking of the above HOT otl, I can't seem to construct a VOP network that will correctly displace the ocean surface.

Just wiring the HOT_Ocean_Eval VOP to the displacement output makes my surface vanish.

I've tried Sean's variant but that doesn't create a correct surface either.

Is there anything else that would be expected in the network to make it work?

Thanks for any ideas.

Addendum: Just figured it out, I think. The ocean_eval VOP is using s/t parameters whereas the vex code is using an ocean_eval with Px/Pz.

If you use a grid of 1x1 it works fine. So I used a UV Space Change VOP with world space P to get to s/t and it seems to be behaving now. I'll go with it.

-Len

Link to comment
Share on other sites

Interesting. I'll keep an eye out for that bug, thanks.

Speaking of foam, do you know of any shaders that are out there that take the eigenvalues and process them into foam or other effects? I'm building one now but I'm new to VOPs.

And you talk of the "new H9 VOP SOP". Maybe I'm just getting confused by Houdinclature but I know of only one SOP: the Ocean SOP that displaces grid geometry directly. Then there's the ocean_eval VOP that was contained in the HOT.otl. Is there something else I haven't found, or perhaps don't have?

Oh, yeah, I'm still on Houdini 8.2 and you mentioned H9. I guess I probably don't have it yet, huh?

You may have run into a bug I discovered recently. If chop is off the x and z components of the displacement aren't being initialised to zero. I'd missed it because I was using hand coded vex shaders instead of VOPs. It's now fixed and I should get a new release out for H9 in the next few weeks. The new H9 VOP SOP is a great way to play with the Ocean VOP, and I was surprised to find that it's not that much slower than the native c++ SOP. It also allows people an easier way to play with the eigenvalues for generating foam and spray.

-Drew

Link to comment
Share on other sites

Sorry, I'm not going to get a chance to make a proper release for a few weeks, so I've made a few builds for the keen to have a play with. Things would be easier if I had a licensed houdini at home ...

The only changes are the bug fix I mentioned as well as a simple example of using the minimum eigenvalue for generating foam and particles, see OTL/foam_parts_vop.hip (H9 only). I've done it all in a single geometry network for simplicity (no need to pass attributes between surface and displacement shaders). No attempt has been made to make it look pretty :blink:

foamtest.jpg

HOT_8_2_154_1.0a0_win32.zip

HOT_9_0_725_1.0a0_win32.zip

http://sf.anu.edu.au/~drw900/houdini/ocean..._src_v1.0a0.zip

-Drew

Edited by eloop
Link to comment
Share on other sites

Guest xionmark
Sorry, I'm not going to get a chance to make a proper release for a few weeks, so I've made a few builds for the keen to have a play with. Things would be easier if I had a licensed houdini at home ...

I'm really surprised they haven't provided a license for you.

Your plugins are used quite a bit, SESI should be supporting your hard work.

Mark

Link to comment
Share on other sites

Thanks Mark, to be fair though I haven't asked for one either. So if any of the sidefx guys are listening, a non-commercial license to facilitate supporting the HOT, how'bout it ? :rolleyes:

-Drew

I'm really surprised they haven't provided a license for you.

Your plugins are used quite a bit, SESI should be supporting your hard work.

Mark

Link to comment
Share on other sites

Hi Drew and everyone,

Drew, thanks again for all of your hard work and making this available. I have just downloaded the new version and will compile and have a play.

I still get noticeable tiling artifacts though, and no matter what I do I can't get rid of them. No one else has mentioned it, so I wonder if it's only me? So far, I have tried the following, (and each helps a tiny bit):

- turn off micropoly rendering

- increase detail in water surface, (denser mesh)

- randomize the point position of the surface

Anyone have any hints, would be much appreciated.

post-476-1192034564_thumb.jpg

Sean

Link to comment
Share on other sites

Guest xionmark
But the HDK is available on the Apprentice.

Oh don't I know ...

But there's just so much joy in having to deal with .hipnc files ... for someone who's in production, and/or teaches, it's a pain in the rear to have to deal with Apprentice files. A license key for anyone contributing code to the community is not a lot to ask (assuming one is following the rules and not making a profit from the keys, as is the case with training licenses).

Just makes life easier.

Come on SESI, give Drew a little love here! :wub:

Link to comment
Share on other sites

Hi Sean,

Unfortunately the Tessendorf algorithm is always going to tile. There are things you can do to get better results though. One thing is to use multiple wave sources where the second wave source is evaluated at offset coordinates. Here is an example off a 1km square piece of geometry with 200 m square wave sources. The right hand example has added into it a second HOT_Ocean with it's input coordinates rotated by 45 degrees and translated 10m. You could also do something like add the two fields together using a non-repeating but slowly varying noise field something like noise*hot1 + (1-noise)*hot2 where in this example the noise would have something like 300m between hotspots. Fogging, reflections and foam algorithms can also be used to break up the repeats. (it's cool that png's with alpha are honored, at least in firefox).

two_hots.png

two_ocean_sources.hip

BTW I hope everyone realizes that using VOP's and displacement shaders is the way to use the HOT for production rendering as it's much faster than working with large geometries. It should be straight forward to translate from the VOP SOP examples I'm posting to equivalent displacement shaders.

Mark - you've hit the nail on the head, I'm not keen to use .hipnc's which aren't any use for real work.

-Drew

Edited by eloop
Link to comment
Share on other sites

  • 1 month later...

Just a note to point out that there is a new version of the HOT available on odWiki with win32 binaries available for the two latest production releases (H9.0.782 and H9.0.768). Linux users should have less problems compiling, the Makefiles have been updated for H9. And a note to the Ubuntu users - fftw3-dev is available via Synaptic, so you only need to compile blitz++ now.

There's still work to do before I release a v1.0, mostly cleaning up the examples.

Finally if anyone actually uses the HOT I'd love to see some user produced images ... the image Sean posted above was the first evidence of someone actually playing with it. It would be nice if we could put a few up on the odForce gallery or on the odWiki page.

-Drew

Link to comment
Share on other sites

  • 3 months later...

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...