Creating Shadows For Maya Paint Effects

Report this File

Missing

Views:

16,975

Updated:

Jun 27, 2008

Readership Level:

Intermediate

Tags:

Maya Versions:

5.x, 6.x, 7.x, 8.x, 2008

Platforms:

irix, linux, mac, windows

Owner:

Language:

English

Creating Shadows For Maya Paint Effects

Maya paint effects is a very powerful feature in Maya which you can use to create animated plants and grass without useing any third party plug-in. However Maya paint effects has its own drawbacks. The main drawback is you cannot render shadows with paint effects.

So I found this nifty little trick that you can use to render shadows. This tutorial will show you how to do this in a couple of simple steps.

You can download the completed scene file by clicking here.



Start a new scene in Maya. Press F6 to reach the rendering menu set. On the paint effects menu select get brush to open the visor window.

Under the flowers folder select DaisyLarge.mel and close the visor window.

 

Draw the mesh on the view grid. Press a on your keyboard to zoom in. Now your screen should look something like this. Press q to return to the select tool and press 5 on the numeric pad to turn on shading.


There are not enough flowers in our stroke so we will increase the number of flowers by changing some of the attributes. Select the stroke for the flower. And press ctrl+a to open the attribute editor. On the node named strokeShapeDaisyLarge1 increase the sample density as shown below.


To cast the shadows we need a light and a surface. Create a polygon plane object by selecting create>polygon primitives>plane.



Use the scale tool (hot key r) to scale up the plane so it looks something like this.


Next well create a light. Select create>lights>directional light.



Press e and use the rotate tool to rotate the light so it lightens from the side as shown below. I have moved the light to a side so you can clearly see it. You dont need to move the light because its a directional light and where you place the light doesnt really matter.



Ok so now we have the light but we need to enable shadows. If your attribute editor is already open locate the depth map shadow attributes section and turn on turn on depth map shadows (otherwise you need to open the attribute editor to do this).



Lets do a test render. As you can see although you turn on shadows paint effects strokes doesnt cast shadows. Now for the best part.



Select the paint effects stroke again and select modify>convert>paint effects to polygons.



Now the paint effects strokes has been converted to polygons. And you can try rendering a frame and see for your self.

You can also try making the stroke animate and rendering a movie.

 

This and more tutorials at http://maya-tutorials-4u.blogspot.com

Comments

Dashboard_avatar
Jun 29, 2008
Post id: 4953
Report this comment to moderators [SPAM]

good tutorial. but you don\'t really need to convert pfx to polygons to get shadows. if you need a lot of pfx strokes, converting to polygons might increase poly count so much that it might break your renderer. depending on how much ram you have, even mental ray might choke. to avoid this, one can draw the strokes and create a light with depth map shadows, like you said, and in the attribute editor for the brush (in your example it would be daisyLarge1) under Shadow Effects enable Cast Shadow. render with the maya software renderer. the shadows need to be tweaked, the self shadowing will most likely make the strokes look too dark, but one could render a separate shadow pass and composite it later, thus having more control.

i hope my comment is usefull to you and others. thanks for your tutorial.

Dashboard_avatar
Jul 10, 2008
Post id: 4954
Report this comment to moderators [SPAM]

nice tutorial and nice comment!

Dashboard_avatar
Oct 17, 2009
Post id: 8794
Report this comment to moderators [SPAM]
Dashboard_avatar
Oct 23, 2009
Post id: 8853
Report this comment to moderators [SPAM]

Paint Effects do cast shadows! So this tutorial seems to me useless, sorry.

You have to turn shadows on in the Atribute editor.
When you make a stroke, go to the atribute editor. Dont'look for example: -strokeGrassCarpet1-, but the tab without stroke in front of it. So - grassCarpet - in this case.
Look for-Shadow Effects, there you can turn on 2d offset or 3d cast shadows....

Write a Comment

You must be logged in to leave a comment. Login or create an account

Related Marketplace Items

  • Abrams1

  • Opn-pri-1

  • Matt2

  • Thumb-bed-05-def

  • Scandocoffeetable01

  • Svalentine1

  • Falcon01

  • 05