Friday 25 March 2011

Maya Tasks Week 22 - Dynamics and Mental Ray

First is the dynamics.

The first tutorial was on creating lots arrows and then fire them across the screen. To do this, one arrow was instanced on particles that were emitted. The aim rotation was set to velocity, so that the arrows aimed in the direction they are going.


The same thing was done to these rockets, except a secondary particle system was used to emit smoke from the particle rockets.


This scene demonstrates how one particle system can have its particle rotations based on several different calculations. ie some arrows point at a fixed location, some are born with a random rotation in X axis, and some aim in the direction they are going. At birth, one of these options is chosen.


The last example shows a way of creating masses of randomly placed trees using particle instancing. In the tutorial, we were shown a way of placing trees in specific areas based on a texture map on the surface, then using the particle emission texture rate to emit from only the white areas from the black and white image map. Rather annoyingly, that bit didn't work for me. The same thing happened in lesson too, and the suggested fix, (restarting Maya) didn't work for me either. Although I have seen other people have managed to get it to work, so I'm can only assume that it is a Maya on Mac problem. I'm sure that if it came to it, there is probably a way to get it to work, but at least I know that this is a feature that exists to use.


Here is a video of the above effects.






_______________________

This week for rendering we looked a motion blur and depth of field.


Motion Blur

With the software renderer you can use two kinds of motion blur, 2D and 3D.

In this scene we have an example of 2D movement, meaning that 2D motion blur can be used.
There are multiple ways of changing the amount of blurriness in a render.
You can either use the blur by frame or blur length to control the strength of the directional blur. Alternatively you can also use the shutter open and close controls, which are similar to actual cameras.
They all do much the same thing.


Then there is the smoothing value, which basically blurs all the pixels a bit.
And there is also blur sharpness, which also does exactly what it says.

After tweaking all the attributes I got a result like this.


One other thing to note. I'm missing the '2D blur memory limit' options. Don't know what's happened to them.


_________________________


In this next example we looked at 3D motion blur in software, with this wheel.

To illustrate, here is the problem of using 2D motion blur for a 3D movement.

All the bars are blurring in one direction, and not in a curved direction.

Here's what the wheel looks like without blur, and with default motion blur.


And again. we can control the amount of directional blurring by adjusting most of the same attributes. Although there is also a way of adjusting the blur, directly on the cameras themselves in Maya.


___________________________

Lastly there's mental ray's motion blur. (which is 3D)

Default settings will give this result. It looks familiar. (like 2D motion blur)


By increasing the motion steps, it is looking at the movement in minor increments, to smooth out the curve of the blur.
Unfortunately, mental rays motion blur, is very slow by default.

A speedier way is to use mental rays 'rasterizer' renderer. This happens to be better a dealing with motion blur. and offers quicker results.


The only way to remove grain in the image is to up the samples, which will always slow the render down, but then, who's going to notice any grain if its moving fast!
It is still considerably faster than the scanline renderer (mental rays default).

__________________________


Depth of Field

Both Software and Mental Ray can do depth of field.

First lets see what Software can do.
By adjusting the focal distance, the focus can be tweaked to the distance of the subject.
The F stop controls the amount of blurring, while keeping the subject in focus.
Maya Software isn't very accurate though, and doesn't handle edges very well.
This is what comes of adding blurring as a post effect.



The way fix this is to use mental ray.

This renders it correctly, although by default, it will appear very grainy. By lowering the anti aliasing contrast, the render will come out smoother.
Any more smoothing required turning the sampling up (as usual).




Mental Ray also comes with some specific lens nodes.

One of them is the Bokeh lens node.
With it, you can achieve far more realistic depth of field.
It has much the same controls as the other depth of field.


After some tweaking I got this result.



A Flock of Pixels

No comments:

Post a Comment