Ocean RND

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

Thread Tools Search this Thread Display Modes
  09 September 2009
Ocean RND

Hey,hello ppl from today i want to start dive inside Maya ocean.In this thread i want to start debate on Maya Ocean.So post ur question on Maya Ocean or give answer to another question on Maya ocean here.
Let's start with my first question:
Question 1>>How to make collide Maya Ocean To nurbs/Poly OBJ.
For this i have one idea but don't know how to do.Idea is generate texture
for ocean & OBJ interaction by closest point on surface,And then extract the displacement part within OBJ area.so answer this.Thank You
  09 September 2009
Well... I guess you can just convert the Ocean to polygon and keep the history on. Then you will be able to do the collision test between 2 normal polygon objects.

Deppends also on why you need that collision information.... When I need to emit particles from the "collision" of a boat with the ocean, I normally just use the toon shader (converting it to polygons too) and emit my particles from it.
  09 September 2009
Plz ,give in more detail to capture fast.And i need collision to get realistic output .i think in next version of Maya ocean will come with new feature like real wave in realflow.

Aim:-Ocean Wave Splash.
Reference 1
Reference 2
And here is My Starting Scene:Start_Ocean_1

Last edited by ruchitinfushion : 09 September 2009 at 04:06 PM.
  09 September 2009
There are a few threads here already with some good research on this subject. You can start reading this one .
  09 September 2009
See here:
Ocean and stone interaction :http://forums.cgsociety.org/showpos...25&postcount=24

how can i do this.

And Also tell me how can i emit particle from toon outline.
Here is test scene:Toon_Outline_interaction

Last edited by ruchitinfushion : 09 September 2009 at 02:41 PM.
  09 September 2009
Hello everyone plz say somethin...
  09 September 2009
Originally Posted by ruchitinfushion: Hello everyone plz say somethin...

  09 September 2009
Hey,ppl i m like tortoise but i know "slow and steady wins the race".
Here is my second Test scene file ,Start_Ocean_2
now help me further to get same output like IgorFX(Ocean and stone interaction).

And @ ucsuro thnx for giving health code.

And also tell me How Can i transfer Y velocity of the ocean on the intersection curve for birth of particles(by any script or simple expression).If this done then Maya is better then houdini

Last edited by ruchitinfushion : 09 September 2009 at 12:21 PM.
  09 September 2009
If you are using colorAtPoint to get the ocean height when creating a particle then you could initially emit a particle but keep it hidden for one frame. On the second frame in a runtime expression evaluate the ocean height again with colorAtPoint using the particle xz values. The difference of this position and the original particle position is the velocity of the ocean surface at that point.

I once implemented a "suction" force for particles based on wave motion. Large waves pull air around them up and down, which tends to keep low spray and mist moving up and down with the waves. For this I kept a previous ocean height value for each particle to track the motion (one would add a custom per particle attribute to hold this value). I then applied this velocity in a similar fashion to wind drag.

  09 September 2009
Thnx very much for ur reply Duncan..
  09 September 2009
try toon outline shader for poly to poly intersection!

Last edited by viki164 : 09 September 2009 at 05:52 PM.
  09 September 2009
Make Floating Using ColorAtPoint

Hey Duncan yesterday night was like Searching,RND,pain,etc.After reading some old material on "ColorAtPoint" i got little bit of controll on "ColorAtPoint".
And here is my test scene on ColorAtPoint rnd
Make Object Floating Using "ColorAtPoint"
 float $posu = nurbsSphere1.translateX;
 float $posv = nurbsSphere1.translateZ;
 float $posy[] = `colorAtPoint -o A -u $posu -v $posv oceanShader1`;
 nurbsSphere1.translateY = $posy[0]; 
 Make particle Floating Using "ColorAtPoint"
 vector $particlePosition = particleShape1.position;
 float $positionU = $particlePosition.x;
 float $positionV = $particlePosition.z;
 float $Ipoint[] = `colorAtPoint -output RGBA -u $positionU -v $positionV oceanShader1`;
 float $positionY = $Ipoint[3];
 particleShape1.position = <<$positionU, $positionY, $positionV>>;

But Duncan still i don't know how to translate ur language
to MEL.Because i m not master in scripting or in Expression,so if anybody can help me
then most welcome.Thank you.

Last edited by ruchitinfushion : 09 September 2009 at 02:39 PM.
  09 September 2009

Hello,all u Master Of scripting.plz help me to build expression/script for transferring velocity of ocean to particle @ intersecting point using "Idea Of Duncan".For testing purpose u can see my test scene and small and sweet expression for floating object and particle using "ColorAtPoint" cmd.Thank You

__________________________________________________ _________________
Secret Are Still Hidden........
  10 October 2009
Ok,here us my first test
  11 November 2009
Hello,ppl try to edit my expression and plz try to make it ready to run
Note:expression is for deforming nurbs plane with ocean shader.

int $nP;
int $dI=0;
int i,j;
float $minx = InteractionPlane.scaleX * -0.5 + InteractionPlane.translateX;
float $maxx = InteractionPlane.scaleX *  0.5 + InteractionPlane.translateX;
float $minz = InteractionPlane.scaleZ * -0.5 + InteractionPlane.translateZ;
float $maxz = InteractionPlane.scaleZ *  0.5 + InteractionPlane.translateZ;
float $disp[] = `colorAtPoint -o A -su 21 -sv 9 -mu $minx -mv $minz -xu $maxx -xv $maxz oceanShader1`;
for ($i=0; $i<21; $i++)
	$nP = 20 + ($i*9);
	for ($j=0; $j<9; $j++)
		   InteractionPlaneShape.controlPoints[$nP].yValue = $disp[$dI];

Error:// Error: Line 13.72: Invalid use of Maya object "InteractionPlaneShape.controlPoints[". //
Thread Closed share thread

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 09:33 PM.

Powered by vBulletin
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.