Monday, 21 March 2011

Maya Tasks Week 21 - Dynamics and Mental Ray

In this weeks dynamic tutorials we looked at particle instancing.

The first example is of a crowd of robots moving forward in one direction.


The robot cycle animation is controlled by scripts and the robot itself is instanced on particles that move forward.


The next example uses particles instancing to create bubbles. The sale of the bubble geometry is controlled by the particles.



Then we come to meteors. In this, the instanced meteors rotation are also being controlled.


In this example, an attribute called object index is used, so that the particles emitted, choose between a selection of instanced shapes.


In this final example all above attributes have been applied. The rotation, scale and object index has been applied to a selection of people, generating a crowd.


Here's the video of the above effects.




___________________________________


Now on to some mental ray stuff.

In this task we were shown how to take depth map shadows rendered in software, to Mental Ray by converting the shadows to their depth map equivalent.

Software Shadows



Although the switch is not perfect as shadows won't appear to render in mental ray, until you tweak the softness attribute. So I take the softness right down.

As you can see, when the softness is decreased you can begin to see the shadows again.

After tweaking the softness you can get a result similar to software, in the mental ray renderer.




In the second exercise, we were using mental ray to render this scene and using its diagnostics tools to understand and tweak settings for optimum performance and speed.

Although to be quite honest, I didn't have much luck as far as tweaking went.

The main focus of the tutorial was on something called BSP, which stands for Binary Space Partition. Although I'm not about to have a long discussion about what that is right now, but for what we were doing, we had to tweak the BSP size and BSP depth under the 'Regular BSP' setting in the render settings. It was just the depth actually, but the idea is to try and find a balance between the two and in theory, quicker render times.

Lets just say that my results after about 4 renders were kind of exactly the same.

In terms of speed, Regular BSP was slightly faster than BSP2, although changing the BSP Depth, or size seemed to have no effect. Although to be honest, I can't really complain about in rendering in 43 seconds, because that's actually pretty fast anyway.

Render 1
45 seconds
BSP2

Render 2
43 seconds
Regular BSP
BSP Size 10
BSP Depth 40

Render 3
43 seconds
Regular BSP
BSP Size 10
BSP Depth 50

Render 4
Regular BSP
43 seconds
BSP Size 10
BSP Depth 60

Render 5
43 seconds
Regular BSP
BSP Size 5
BSP Depth 60

I finally got a result that increased render time by 1 second

Render 6
44 seconds
BSP Size 1
BSP Depth 50
These were its detailed results
RCI 0.3 info : max depth : 50
RCI 0.3 info : max leaf size : 66
RCI 0.3 info : average depth : 38
RCI 0.3 info : average leaf size : 4
RCI 0.3 info : leafnodes : 2089268
RCI 0.3 info : bsp size (Kb) : 114652

…and if you compare that with the second render…

RCI 0.3 info : max depth : 40
RCI 0.3 info : max leaf size : 191
RCI 0.3 info : average depth : 34
RCI 0.3 info : average leaf size : 7
RCI 0.3 info : leafnodes : 531119
RCI 0.3 info : bsp size (Kb) : 31804

Here is a comparison of the BSP depth size
40


50



This is the actual result of the render.



More Maya tasks soon!

A Flock of Pixels

No comments:

Post a Comment