PDA

View Full Version : motion blur fluids


Aikiman
10-10-2009, 09:20 AM
Anyone succeed with this? I tried and failed.

viki164
10-10-2009, 10:43 AM
Yo Aiki!
Its wrkin fine here. just giv a quick try with 2d windtunnel with particles & see the difference. U might need to cahce ur fluid & set ur motion blur to "Full" instead of "No deformation".
hope it shuld wrk fine :)
best
Vik

Aikiman
10-10-2009, 08:31 PM
Hey Vik,

Yeah I did all of the above. Ill have a look at a 2D fluid and see whats going on, cant think of what the problem is, I thought maybe there was a switch under the fluid shape I had to turn on. Will let you know if i find a solution.

cheers :)

jupiterjazz
10-10-2009, 11:31 PM
Hey Vik,

Yeah I did all of the above. Ill have a look at a 2D fluid and see whats going on, cant think of what the problem is, I thought maybe there was a switch under the fluid shape I had to turn on. Will let you know if i find a solution.

cheers :)

mental ray motion blurred fluids - unsurprisingly - leads to almost certain crashing. And fluids don't provide motion vectors information, so no post blur of fluids either... ahh... productivity...

P.

stooch
10-11-2009, 12:54 AM
mental ray motion blurred fluids - unsurprisingly - leads to almost certain crashing. And fluids don't provide motion vectors information, so no post blur of fluids either... ahh... productivity...

P.

hmm. last time i checked, you can actually color your fluids by speed. i suppose one could extract the fluid direction from the fluid boxes and multiplied that against the speed amount to get vector blur information for post. problem is that fluids could be going in one direction on top but a completely opposite direction on a layer directly under... one other idea is to shoot nparticles using the fluids box as a forcefield into the fluid sim and using instanced transparent geometry force maya to blur the encased fluids via the movement of nparticles.

I havent tried this personally but it might be worth trying.

After doing motion blur tests on fluids i can tell yuo that the cached fluid DOES reverse with motion blur subsampling and steps back when you increase time samples. maybe one needs to increase fluid samples? theoretically if you offset fluid cache and blend them over a few substeps it should APPEAR motion blurred. although that may take quite a few time samples... fluids render pretty fast though so it might be doable.

RingoStar
10-12-2009, 09:17 AM
Hi guys,

as far that I know there is no working motion blur for fluids in MR or Maya renderer. I heard that MR can handle object MB (Blur for transformations of the container) but not the actual fluid. So for a cloud fly through it might work. Your explosions, etc. will have no blur.

The only way to do MB is to convert the velocity field into a colour field. This can be done using MEL or using a plugin. This method works definitely:

1. Cache your sim.
2. Set your colour grid to static or dynamic grid.
3. Execute your MEL code or plugin that does transform each voxels velocity from object space into camera space. (I don't have the math for that here but it's no rocket science)
4. Create an ambientlight and switch of any shadowing.
5. Render your motion pass. You have to convert the velocity field each frame.

This method works. As fluids are often transparent it works obviously better on "thick" fluids.

Aikiman
10-12-2009, 10:08 AM
Is that a method to adding motion blur in 2d is it by creating 2D motion vectors?
That would require something like ReelSmart Motion Blur?

Don3Don
10-12-2009, 10:31 AM
ReelSmart Motion Blur will do if ur motion blur is not really big/long. but since this is fake, convert velocity to motion vector pass should be the way to go....

I didn't try this yet thru...

and maya should support and aware this issue.. anyone sent this to autodesk yet?.

RingoStar
10-12-2009, 10:45 AM
Of course this is a fake to get 2d Blur vectors. Yes, reelsmart is necessary or vector blur like in Fusion or nuke built in.

Don3Don
10-12-2009, 11:27 AM
my sentense may be confusing. sorry for my english.

I mean the "cheapest auto motion blur function" from reelsmart will do if u just need small motion blur. It is zero cost, the plug-in will guess from thre image seq, frame to frame, pixel to pixel. But u can't set the value too much, it will give u some strange pattern, something looks like fur. I call this as fake motion blur.

viki164
10-12-2009, 05:59 PM
hey Aiki!
I m lil confused here..wt kind of motion blur u looking for ?? I apologize If I hav misunderstood u here, coz I have been a little pipeline guy for last few years (using properiatary renderers )& I rarely deal with m-ray so My reply wuld be lil dumb.
I did few quick test with m-ray using primary renderer "rasterizer rapid motion" instead of scanline. & I kinda got some linear blur on my 3d fluids. here u can see as 1st fluid container is static & the second has some translate keyed in X. SO the second fluid guy seems to have a good motion blur. i tried with very poor quality settings & its wrkin. So is it just bcoz I m on Maya 2010 & the rest are on old maya & finding hard to get it work?
though MR motion blur its little expensive to render but it does render transform of fluids. So am I missing here something of which I am not clear/confused? OR is it motion blur within fluids u mean? I tried with 2d fluid though & it did smear my result.
So let me know If I m not on the same page :)
Best
Vik
http://i463.photobucket.com/albums/qq359/viki164/mr-fluid.jpg

http://i463.photobucket.com/albums/qq359/viki164/mr-fluid2.jpg

Aikiman
10-12-2009, 07:00 PM
Hey Vik, yeah I mean MB of the velocity within the fluid as opposed to the transform of the fluidShape. Thanks for the tests anyway bro.

Okay so once I find the mel to convert my velocity to a motion vector pass, what node do i use in the compositing packing to convert that to MB? If any of you guys have used Shake and know the specific plug that would be cool, if not then rattle off whatever you use and some helpful tips for your method please.

Info has been great so far, cheers all.

@ Ringo, I appreciate your info dude, in fact you have virtually explained the process, its just a matter for me to use the software I have to achieve the same thing.

cheers

[EDIT]

I thought this script from Hosuk's website might work, have a look here...
http://www.hosok2.com/project/cloud/cloud.htm

further down is a mel script to bake out any attr you want including velocity vectors but for some reason I couldnt get it to write out the files for me. It looks as though its trying to open a file with fopen so I create a text doc but the code still cant do anything with it.

RingoStar
10-13-2009, 09:58 AM
Well, if you are bound to use Shake there is a couple of ways. The basic input for the motion blur is your beauty render and an image containing the velocity in screen space. So Red channel could be X motion and green channel is Y motion. Blue channel can be used for something else but I'd recommend to put in solid 1 (use a full blue incandescence for example). In the days of non-floating point images one would normalize the velocity to be centred around 0.5 and be in between 0 and 1. The Blue channel contained a scaling factor to scale the velocity back. Note that the length of your 2d Blur vector is always dependant on the render resolution ! Your fluid travels the double distance in pixels in a 2k render than in a 1k render.
Reelsmart is one option to read the motion image. Most bigger companies have their own shake plugin to apply the blur. As I said Fusion and Nuke have a built in vector blur node that can be fed with the motion image. I remember that there was a macro somebody built to do something like reelsmart. I don't remember the name but it was around for Shakle 2.51. It would mimic vector blur using iterations of displaceX. This is by the way a nice thing about a motion pass. If you feed it into a displaceX node you can add some nice detail to your render in comp.
Regarding the math: Converting into other spaces usually is done by multiplying the matrix. So your voxels velocity should be multiplied with the containers transform matrix (in case it's transformed at all). our Voxel is now in World space. Now you multiply it with the camera's transform matrix and you are in camera(3d) space. Then you mul it again with the projection matrix. At this point the Z component of the vector can be disregarded because it is facing the camera. Last thing would be to figure out the correct length of your velocity in pixels depending on film back and render resolution. If anybody has a clue how to do that please post it. I hope this helps you along. I only developed the concept of this and never programmed it myself but the TDs at my company did.

apoc519
10-14-2009, 01:11 AM
motion blur never worked with fluids. You could put a bunch of instanced spheres inside using the fluid as a field and then get the 2d moblur vectors. Might not be awful

untelon
10-15-2009, 01:32 AM
You can motion blur fluids to some degree.

You can blur fluid translation blurred (like Vika's example above).
You can blur a fluid when you have camera translation (I.e., a turntable around a puff ball).

An actual fluid sim, as far as I know cannot be moBlurred... except (there's always an except)...

I had tremendous success using a plugin for Nuke named Furnace that has a very (I mean very) impressive solver for motion blur. It blurred a long cloud fly-through sequence. It is a post process that analyzes you rendered image.

See examples:

1. Rendered frame, 2. Output out of Nuke (setup, static camera, static container, only the texture is animated).

;)

CGTalk Moderation
10-15-2009, 01:32 AM
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.