Adverti horiz upsell
Creating Shadows For Maya Paint Effects
Creating Shadows For Maya Paint Effects
Anuradha Jayathilaka, added 2008-06-27 20:29:09 UTC 29,993 views  Rating:
(2 ratings)
Page 1 of 1

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 https://maya-tutorials-4u.blogspot.com


Comments

  • stealth_kid

    stealth_kid said over 10 years ago:

    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.
  • carlos

    carlos said over 10 years ago:

    nice tutorial and nice comment!

Please sign up or sign in to post a comment.