Exporting Motion Vectors out of nParticles

Become a member of the CGSociety

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

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
  10 October 2009
Exporting Motion Vectors out of nParticles

Hello Folks,

Hope all is well

I am trying to export motion blur vectors out of Maya 2009 in Mental Ray sicne there is an option to export motion vectors. But I need them to work for nParticles, Fluids and Sprites
and then use RSMB(ReelSmart Motion Blur in Fusion) to apply motion blur in post.

I always thought that motion vectors can only be generated for geometry and not particles
so the only easiet way I can think of is to instance geometry to particles matching the radiusPP
and generating motion vectors on those to use on particles in post.

I really need to be able to figure this out so any and all help will be much appreciated.

Thanks for the help in advance, have a good one!

Cheers,
SD
 
  10 October 2009
particles yeah you got the right idea. instance spheres or use geometry and this will generate the motion vectors.

fluids though... not going to work. since they are "stationary" in world space and your stuff is flying "through" them.

I suppose you can emit nparticles through your fluids and use the fluid as a field, the motion of the nparticles should approximate the fluids and then you could get motion vectors out of them using the instancing trick.


Originally Posted by RhythmOfLine: Hello Folks,

Hope all is well

I am trying to export motion blur vectors out of Maya 2009 in Mental Ray sicne there is an option to export motion vectors. But I need them to work for nParticles, Fluids and Sprites
and then use RSMB(ReelSmart Motion Blur in Fusion) to apply motion blur in post.

I always thought that motion vectors can only be generated for geometry and not particles
so the only easiet way I can think of is to instance geometry to particles matching the radiusPP
and generating motion vectors on those to use on particles in post.

I really need to be able to figure this out so any and all help will be much appreciated.

Thanks for the help in advance, have a good one!

Cheers,
SD
__________________
From Russia, with love @ stooch.tv
 
  10 October 2009
thanks Stooch, I appreciate it. how about exporting motion vectors out of velocity vectors in a fluid? how would one write those out as a motion vector pass?
 
  10 October 2009
Im just trying to do the same thing, apparently there is some script you can use that does it for you. I havent checked Highend yet but Im sure google can help us out too.
__________________
Vimeo
 
  10 October 2009
Aikiman, attached is a script that exports velocity vectors in fluids. you can also export other stuff liek density, fuel etc. You can read more about it here - http://www.hosok2.com/project/cloud/cloud.htm

I still can't get any motion vectors out of Maya from regular particles in Maya 2009. Not sure about the process. Anyone done this before?
Attached Files
File Type: zip ho_fluidExport.zip (1.2 KB, 14 views)

Last edited by RhythmOfLine : 10 October 2009 at 10:23 PM.
 
  10 October 2009
I just picked that one up myself but Im having usability issues with it, for some reason it wont save out the files. have you used it?
__________________
Vimeo
 
  10 October 2009
Nah, didn't work here either.

I am still trying to figure out a way to export motion vectors directly from fluids and cloud type particles. Basically volume type particles.

Cheers,
SD

Last edited by RhythmOfLine : 10 October 2009 at 05:27 PM.
 
  10 October 2009
so, the following snippets of code color my fluid red and green based on where they are going. red in X and green in Y. the only issue now is that first of all they need to go from 50% green to 100% green and 50% red to 100% red instead of being full on red and green hues.

my second issue is that these are in container space but if the camera rotated or the container rotated, they wouldn't work since the axis would be all flipped. how would one go about resolving this issue? i am guessing it needs some sort of matrix multiplication with the camera space and world space.

 
 
float $resX = 30;

float $resY = 30;

float $resZ = 30;

string $fn = "fluidShape1";

   for($x=0; $x<$resX; $x++)

	 for($y=0; $y<$resY; $y++)

	   for($z=0; $z<$resZ; $z++)

	   {

			  float $den[] = `getFluidAttr -at "density" -xi $x -yi $y -zi $z $fn`;

			  float $vel[];clear $vel;

			  if($den[0] > 0)

				{

				 $vel = `getFluidAttr -at "velocity" -xi $x -yi $y -zi $z $fn`;

				 float $cor[] = <<$vel[0], $vel[1], $vel[2]>>;

				 setFluidAttr -at "color" -vv ($vel[0]) ($vel[1]) 0 -xi $x -yi $y -zi $z $fn;

				 } 

		}
 
  10 October 2009
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
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
CGSociety
Society of Digital Artists
www.cgsociety.org

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

All times are GMT. The time now is 07:38 PM.


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