HOT in MR for Maya
#1
Posted 08 August 2009 - 01:19 PM
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.
[img]http://http://www.gruppe-weimar.de/nico/temp/ocean01.jpg[/img]
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?
#2
Posted 17 August 2009 - 12:38 PM
colt, on 08 August 2009 - 01:19 PM, said:
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.
[img]http://http://www.gruppe-weimar.de/nico/temp/ocean01.jpg[/img]
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").
#3
Posted 22 October 2009 - 01:12 PM
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 by colt, 06 January 2013 - 01:40 PM.
#4
Posted 22 October 2009 - 02:01 PM
Very good and realy fast plugin i just test it in maya grid divade 750*750 frame/second
thanks alot...
Edited by CeeGee, 22 October 2009 - 02:16 PM.
#5
Posted 23 October 2009 - 02:48 AM
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
colt, on 22 October 2009 - 01:12 PM, said:
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 by eloop, 23 October 2009 - 02:49 AM.
#6
Posted 24 October 2009 - 09:48 AM
eloop, on 23 October 2009 - 02:48 AM, said:
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.
#7
Posted 26 October 2009 - 06:52 AM
#8
Posted 26 October 2009 - 09:38 AM
colt, on 22 October 2009 - 01:12 PM, said:
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)
#9
Posted 27 October 2009 - 10:36 AM
CodeBreak, on 26 October 2009 - 09:38 AM, said:
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)
#10
Posted 04 November 2009 - 06:00 AM
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 by Starrider, 04 November 2009 - 06:03 AM.
www.technicaldirector.de
#11
Posted 04 November 2009 - 08:15 AM
No matter, I just took the Loki & Windows-specific bits out and it compiles fine!!
Edited by djwarder, 05 November 2009 - 02:29 AM.
#12
Posted 12 November 2009 - 12:28 PM
i have a porblem with wave tiling in maya.
Give me advice.
-----------------------
best regards
Yegor, Russia, Saint-Petersburg
Attached Files
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users











