Jump to content

HOT variants ("Drew vs Christian" :))


riviera

Recommended Posts

Hi,

Right now I'm checking out what's going on with the various variants of HOT available (since we need to have to have it working -- and having identical results! -- both in Maya and Houdini).

Okay, so I'm still looking at the available Houdini variants, and there's the original one by Drew Whitehouse, and the multithreaded one by Chris Schnellhammer. I compiled both and found the following so far:

- The two variants don't give the same results (Chris's version has an additional parameter called "Largest Wavelength", and I'm only getting _almost_ identical waveforms if I set that to about ~91.75 or something)

- Chris's version is somewhat faster, but not that much overall, at least on our machines (gives a ~2x speedup on 16m points in multithreaded mode, the speed difference is negligible on light geometry), but this might be due to other issues (*)

Obviously I'd like to use the same version in Houdini and Maya, and the one that is the most up-to-date and gives identical results. (This is more preferred than threading performance.)

So, does anyone know which version is more up-to-date? (I'd bet on Drew's but not 100% sure -- although the Maya version doesn't have the Largest Wavelength parameter, either)

Imre

* : We're testing this on a windows and an ubuntu box (both 64 bits) with 4 cores and getting 40-50% CPU usage at most on both machines (but only with quite large point counts, i.e. in the millions), but for some reason we can't get any multithreading in VEX either for some time (on both platforms, too), so it could be something Houdini-related. I just checked out the Maya version and it runs on ~70% usage.

Link to comment
Share on other sites

Hello Imre,

Chris's version should be faster, as he's added multi-threading. I peeked at his update to get my SOP_Ocean working again for H12's new geometry library (thanks Chris), but didn't bring in the multithreading.

The lastest version of the HOT is now hosted on github and only has support for building on osx/linux with a simple script "compile.sh". You'll need to do the equivalent things to build on windows, although the third party tools are included pre-compiled.

I don't have much time to spend on the HOT anymore, so I don't plan to bring Chris's multithreading into the distribution any time soon. If I did I'd be trying to do it in a way that didn't make Ocean.h application specific, and that could take quite a bit of fiddling. I think one of the reasons the HOT has been so widely ported to other platforms is that I kept the math part of the code as clean as possible and completely independent from the application integration. That's also why you can't get the VEX code to multithread.

Keep in mind that one way to work with the code is to output the displacement and other quantities as image maps using the VEX function in a COP network. Then you just use the images in shaders and can take advantage of filtering for anti-aliasing, pass the maps between Maya and Houdini as OpenEXRs as well as save memory for the large layered displacements you typically use to hide tiling.

https://github.com/eloop/hot

BTW Nicholas Yue has commit access to the github repo and is probably available for consultation if you needed more support.

Good luck,

Drew

Edited by eloop
  • Like 1
Link to comment
Share on other sites

Hey Drew,

Thanks for the quick answer... I saw your previous discussion with Chris about the multithreading details of the code (and glanced into his code as well -- it seems he used the "usual" Houdini threading-util classes to implement multithreading), but my question was basically which codebase is more up-to-date.

I (we) needed to have the exact results in both Houdini and in Maya on both linux and windows platforms -- and it works! I compiled these plugins:

https://github.com/eloop/hot -- this is your repo, I compiled this on linux right now

http://www.nico-rehberg.de/shader.html -- this is Nico Rehberg's Maya plugin, I compiled this on both linux and windows

...and these two give the exact same results for the exact same input parameters (we had problems with different versions before, but didn't dig deeper as it wasn't necessary at the time). Exact same results in Houdini and Maya, on both platforms.

(I had to make a few cosmetics & cleanups to Nico's code -- it was MSVC++-only and probably wouldn't build in debug mode even there --, I'll probably put the results up on github and/or send it back to him. I also added a multi-platform waf build script.)

On the multithreading side of things, I agree with you completely on not wanting the "abstract" code to get app-specific.

Right now I don't really care about multithreading (we can always substitute a low-res mesh for interactive purposes and crank up the resolution when running batch sims). I was thinking of using an OpenMP-style multithreaded loop for the processing of geometry points somehow (I gave it a quick try but the regular GA_FOR_ALL_GPOINTS stuff is too object-oriented for OpenMP's taste :))

Thanks for the COP idea, it sounds interesting... And thanks the the plugin in the first place, it rocks :)

Imre

Link to comment
Share on other sites

Not sure about the details (I'm not following Maya and/or its api for good reasons), but I think both apps' devkits come with a version of TBB (the SideFX guys don't seem to waste time over including any open-source library they find useful :)). In other words, TBB is also included with Maya, but I doubt the version number will match the one in Houdini.

Btw, I uploaded two new repos:

- https://github.com/johnnyquest/hot -- this is the same as Drew's repo but it has some "semi-automatic" build scripts for Windows (I might try to add some multithreading to this later)

- https://github.com/j...t/hotOcean_Maya -- this is Nico Rehberg's code a bit cleaned up, and a cross-platform waf build script is also provided (should work on both linux and windows)

Edited by riviera
Link to comment
Share on other sites

Btw, in H11 the mineigvec attribute was of type vector, but in H12 it seems to be a scalar (I suppose this might be a minor bug or typo when porting to the new geo architecture?). Just sayin' :) (I'll try to fix this in my repo and push it back...)

Hello Imre,

Chris's version should be faster, as he's added multi-threading. I peeked at his update to get my SOP_Ocean working again for H12's new geometry library (thanks Chris), but didn't bring in the multithreading.

The lastest version of the HOT is now hosted on github and only has support for building on osx/linux with a simple script "compile.sh". You'll need to do the equivalent things to build on windows, although the third party tools are included pre-compiled.

I don't have much time to spend on the HOT anymore, so I don't plan to bring Chris's multithreading into the distribution any time soon. If I did I'd be trying to do it in a way that didn't make Ocean.h application specific, and that could take quite a bit of fiddling. I think one of the reasons the HOT has been so widely ported to other platforms is that I kept the math part of the code as clean as possible and completely independent from the application integration. That's also why you can't get the VEX code to multithread.

Keep in mind that one way to work with the code is to output the displacement and other quantities as image maps using the VEX function in a COP network. Then you just use the images in shaders and can take advantage of filtering for anti-aliasing, pass the maps between Maya and Houdini as OpenEXRs as well as save memory for the large layered displacements you typically use to hide tiling.

https://github.com/eloop/hot

BTW Nicholas Yue has commit access to the github repo and is probably available for consultation if you needed more support.

Good luck,

Drew

Link to comment
Share on other sites

  • 2 weeks later...

Hi eloop,

I want to ask you about this workflow:

Keep in mind that one way to work with the code is to output the displacement and other quantities as image maps using the VEX function in a COP network. Then you just use the images in shaders and can take advantage of filtering for anti-aliasing, pass the maps between Maya and Houdini as OpenEXRs as well as save memory for the large layered displacements you typically use to hide tiling.

Is there any chance to share some scene example for this?

Thanks

Igor

Link to comment
Share on other sites

You'll need to compile the latest version from gitub, turned out there was a small bug in VEX_Ocean.C's implementation of ocean_eval_ij. Then have a look at the vex code implemented in the COP operator in the .otl file included here.

It's just the skeleton of an implementation of an asset to generate the various ocean exports as images.

hotimages.zip

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