colt Posted August 8, 2009 Share Posted August 8, 2009 Hi, nice Toolkit. I'm fooling around a little trying to get HOT working in a mental ray shader. It looks good so far. Except for a big memory leak everything seems to be generated just fine. The shader is really fast. movie I compiled it with VS 2008 under Vista64 using the latest fftw. So it seems 64 bit windows works fine. There's only one little problem. Since Mental Ray does the displacement first and calls the surface shader later, the normals and eigenvalues don't end up at their displaced position but instead at the original place, which makes them unusable. I could do everything in uv space, since the uvs get displaced correctly, but I'd prefer world space, to be indepent of the underlying geometry. Is there a way to get the displacement backwards? Like giving a point and finding out where it was before being displaced? Or does anyone have any other ideas how to solve this? Quote Link to comment Share on other sites More sharing options...
CodeBreak Posted August 17, 2009 Share Posted August 17, 2009 Hi, nice Toolkit. I'm fooling around a little trying to get HOT working in a mental ray shader. It looks good so far. Except for a big memory leak everything seems to be generated just fine. The shader is really fast. movie I compiled it with VS 2008 under Vista64 using the latest fftw. So it seems 64 bit windows works fine. There's only one little problem. Since Mental Ray does the displacement first and calls the surface shader later, the normals and eigenvalues don't end up at their displaced position but instead at the original place, which makes them unusable. I could do everything in uv space, since the uvs get displaced correctly, but I'd prefer world space, to be indepent of the underlying geometry. Is there a way to get the displacement backwards? Like giving a point and finding out where it was before being displaced? Or does anyone have any other ideas how to solve this? This is interesting, and very good. I'm wondering if you could maybe do this for a Regular Maya Shader that can be used across different Maya renderers (ie Mental Ray, Renderman...and so on). That would be REALLY great because, being mainly apart of the Maya community, we're always looking for an alternative to the Maya Ocean Shader (that doesn't render in Renderman because it's "Obsolete"). Quote Link to comment Share on other sites More sharing options...
colt Posted October 22, 2009 Author Share Posted October 22, 2009 (edited) It's been some time but I didn't forget you. Basically there is no such thing as a "Regular" Maya Shader. Shaders have to be written and compiled differently for each renderer. The standard maya shaders are implemented for each renderer and under the hood maya(or the renderer plugin) uses the appropiate version, depending on what your rendering with. And I wouldn't call mayas ocean shader obsolete. In fact I quite like it. Just like the Tessendorf Ocean it's got a unique look wich sometimes fits better. Anyway, I finished a version of HOT for Maya, so tada here it is: download Maya 2008 32/64 bit Maya 2009 32/64 bit 2010 64bit, 2011-13 64bit .. all windows only It consists of a mental ray shader and a maya deformer. This way you can setup your waves in the viewport with the deformer on a small plane and render them as displacement with the shader. Thanks again to you Drew for the wonderful tool. I included the source. If you have any objections don't hesitate to inform me and I'll take this thing down. Else I'd like to spread it a little around the maya community. Cheers, Nico Edited January 6, 2013 by colt Quote Link to comment Share on other sites More sharing options...
CeeGee Posted October 22, 2009 Share Posted October 22, 2009 (edited) colt great work, Very good and realy fast plugin i just test it in maya grid divade 750*750 frame/second thanks alot... Edited October 22, 2009 by CeeGee Quote Link to comment Share on other sites More sharing options...
eloop Posted October 23, 2009 Share Posted October 23, 2009 (edited) Great work Nico, and I like the name of your tool As long as the source stays open I have no objection at all, in fact even if I hated the idea you are free to share your work, that's the beauty of open source! Did you find any problems with the code ? I purposefully made Ocean.h completely independant of Houdini so that it would be straight forward to port to other renderers. -Drew ..... Thanks again to you Drew for the wonderful tool. I included the source. If you have any objections don't hesitate to inform me and I'll take this thing down. Else I'd like to spread it a little around the maya community. Edited October 23, 2009 by eloop Quote Link to comment Share on other sites More sharing options...
colt Posted October 24, 2009 Author Share Posted October 24, 2009 Did you find any problems with the code ? I purposefully made Ocean.h completely independant of Houdini so that it would be straight forward to port to other renderers. Except for the one stated above (mental ray displaces first and then calls the shader again for coloration) just some small compiler issues. Using ocean.h is really easy, good work. Too bad it's not reentrant safe, I had to thread lock the actual evaluation. Maybe giving the result right back when calling eval2_xz would be nicer. Quote Link to comment Share on other sites More sharing options...
CodeBreak Posted October 26, 2009 Share Posted October 26, 2009 Thank you so much for this. Exactly what I needed to take things to the next level in Maya. CHEERS! Quote Link to comment Share on other sites More sharing options...
CodeBreak Posted October 26, 2009 Share Posted October 26, 2009 It consists of a mental ray shader and a maya deformer. This way you can setup your waves in the viewport with the deformer on a small plane and render them as displacement with the shader. I understand that the plane is already generating a displacement...but is it possible to create an object level collision displacement based on certain objects being buoyant in the ocean? (ie a ball floating o the surface, and making SLIGHT ripples as it bounces) Quote Link to comment Share on other sites More sharing options...
colt Posted October 27, 2009 Author Share Posted October 27, 2009 I understand that the plane is already generating a displacement...but is it possible to create an object level collision displacement based on certain objects being buoyant in the ocean? (ie a ball floating o the surface, and making SLIGHT ripples as it bounces) The tessendorf ocean doesn't provide any tools for interactions, it's just a procedural system to generate wavelike surfaces. So you'll need to use Mayas tools on top of the ocean to get the desired effects. The floating part should be doable using a constraint or some other Maya tool on the deformed ocean mesh. The interaction of the water could be done with a wave deformer, or even simulated using a fluid, which then further displaces the ocean (for this I plan on changing the shader so you can use multiple displacements) Quote Link to comment Share on other sites More sharing options...
Starrider Posted November 4, 2009 Share Posted November 4, 2009 (edited) Hey! I'd be really interested to try it but the download link is not working anymore. Is it still available? Thanks Ohohoh. I just realized it's working now. Sorry for wasting posts. Edited November 4, 2009 by Starrider Quote Link to comment Share on other sites More sharing options...
djwarder Posted November 4, 2009 Share Posted November 4, 2009 (edited) Great news, can't wait to play with HOT in Maya!! Any chance it could be recompiled for Linux tho? No matter, I just took the Loki & Windows-specific bits out and it compiles fine!! Edited November 5, 2009 by djwarder Quote Link to comment Share on other sites More sharing options...
donGuzzini Posted November 12, 2009 Share Posted November 12, 2009 Hello, i have a porblem with wave tiling in maya. Give me advice. ----------------------- best regards Yegor, Russia, Saint-Petersburg 2 Quote Link to comment Share on other sites More sharing options...
colt Posted November 12, 2009 Author Share Posted November 12, 2009 Hi. I made a little update based one some suggestions and fixed some bugs. You can now layer multiple oceans/displacements. But since I had to reorder some attributes your old files may not work anymore after the update, especially if you connected some inputs of the hotShader. And I added compiles for 2008. Same link as before: download Maya 2008/9 32/64 bit donGuzzi : You need a bigger sized ocean. The algorithm creates a wave pattern as big as the Size attribute and the repeats this. So if Size is only 10 meter in your scene scale you will see the tiles. Don't forget to also increase the resolution to get enough detail into the bigger ocean. 1 Quote Link to comment Share on other sites More sharing options...
haggi Posted November 12, 2009 Share Posted November 12, 2009 (edited) But since I had to reorder some attributes your old files may not work anymore after the update, especially if you connected some inputs of the hotShader. To avoid problems by reordering mr shader attributes it it always a good way to name the attributes with shortNames. e.g. scalar "time" default 0, #: softmin 0 softmax 100 shortname time # connect to time This way maya saves a connection like connectAttr time1.outTime hotShader.time; instead of connectAttr time1.outTime hotShader.S6; -- or S1 or S0 or whatever With named attributes you can later reorder and modify your mi interface file without problems. Edited November 12, 2009 by haggi Quote Link to comment Share on other sites More sharing options...
donGuzzini Posted November 13, 2009 Share Posted November 13, 2009 donGuzzi : You need a bigger sized ocean. The algorithm creates a wave pattern as big as the Size attribute and the repeats this. So if Size is only 10 meter in your scene scale you will see the tiles. Don't forget to also increase the resolution to get enough detail into the bigger ocean. ---------------------------------------------------------------------------------------------------------- still need help I took a scene from hotOcean_Maya\example\ ,and tried to tuned it. this ocean was scaled to 1 000 000 in maya 2009 tnx sceneMaya2009.rar Quote Link to comment Share on other sites More sharing options...
colt Posted November 13, 2009 Author Share Posted November 13, 2009 Thanks Haggi. I always wondered what those were for. I updated the mi files and examples accordingly, so everyone who downloaded last night please re-download. donGuzzi: I was referring to the size parameter on the shader/deformer. For your scene try something like this: Resolution 11 Size 15000 This will slowdown the scene and increase the needed memory but you are trying to fill a huge space. Quote Link to comment Share on other sites More sharing options...
ruchitinfushion Posted December 1, 2009 Share Posted December 1, 2009 Hello,ppl using this i want to make ocean having spray,mist,foam,etc.So,plz help me to do this.In default maya ocean it's easy to do using colorAtPoint cmd.But tell me here how to find velocity of particle in y axis emitting from hotOcean surface. Method for Maya ocean Velocity=currentParticleY position - colorAtPointAlpha Quote Link to comment Share on other sites More sharing options...
ruchitinfushion Posted December 19, 2009 Share Posted December 19, 2009 Hello,1 more question.In scene ocean is looking good but when i render it looks like repeat UV in texture.. Hello,ppl using this i want to make ocean having spray,mist,foam,etc.So,plz help me to do this.In default maya ocean it's easy to do using colorAtPoint cmd.But tell me here how to find velocity of particle in y axis emitting from hotOcean surface. Method for Maya ocean Velocity=currentParticleY position - colorAtPointAlpha Quote Link to comment Share on other sites More sharing options...
arkanoiz Posted March 19, 2010 Share Posted March 19, 2010 Hi Nico. I've got some issues with installation: don't understand where I'm doing wrong. I put hotOcean.mi and hotOcean.dll in my custom lib and include folders (toghether with other shaders). Then I put hotOceanDeformer.mll and libfftw3f-3.dll in a HOT subfolder inside my custom MAYA_PLUG_IN_PATH dir. My .env file points to MAYA_PLUG_IN_PATH = D:\Maya\2009\plug-ins; D:\Maya\2009\plug-ins\HOT; MI_CUSTOM_SHADER_PATH = D:\Maya\mentalray_Custom\include; MI_LIBRARY_PATH = D:\Maya\mentalray_Custom\lib Then I made a user PATH environment OS variable that points to; D:\Maya\mentalray_Custom\lib;D:\Maya\2009\plug-ins\HOT Then for the source, I really don't know what to do with those .cpp files.. I really look forward to use this awesome shader. Quote Link to comment Share on other sites More sharing options...
colt Posted March 21, 2010 Author Share Posted March 21, 2010 Hi, did you try loading the deformer plugin? Is it in the plugin manager? What is the error message? And do you see the shader in the hypershade? Is there an error when you try to render it? Those source code files are for people who want to modify or recompile the shader for a different maya/ linux etc. You don't need them to run the shader. So just ignore them. Nico 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.