Maya dynamic tutorial

Page 1

Maya Dynamics

Software Manual (Maya 2016) by Aleksandar Bursać

Soomeen Hahm

http: //soomeenhahm .com/ Flat 38, Vesage Court, 8a Leather Ln, London, UK, EC1N 7RE +44.75.9529.0322 s.hahm@soomeenhahm.com


4

5


nParticles Basics

[nParticle Simulation] by Dylan Browne

6

(2013, 21st of November). Abstract Images With Maya nParticles and Arnold Renderer https://www.youtube.com/watch?v=Tcd3CUDMjaM

7


NPARTICLES 001_Basics

STEP7 Provided you managed to set everything correctly, upon playing you should be seeing something like the screenshot on the right. STEP1 Navigate to your FX tab > nParticles

HINT! It’s fine if it’s not exactly the same. Turbulence Fields are designed to, well, introduce turbulence and disturbance to the nParticles forces so you may end up with something a bit different. STEP8

STEP2

Change the Shading of the particles in order to increase visibility.

Create a basic emitter by clicking Create Emitter

Select nParticleShape1 > Attribute Editor > Shading > Choose Spheres from dropdown menu.

HINT! Make sure you click on the square next to Create Emitter so you can choose options. STEP3

HINT! There are various shading methods in Maya. They are renderable instances that come into the place of the particle, but are not actual poly geometry.

Emission Type > Select Volume from dropdown menu Rate > Type in 5000 HINT! The rate will depend on your scene, it doesn’t matter what it is, as soon as you play the animation you’ll see whether it’s necessary to turn it down. Also, obviously the bigger the rate the heavier the sim. STEP4 One you create the emitter you should have something like this (see below) in the scene. Playing the scene should give you the results visible in the second screenshot. STEP5 Select nParticleShape1 from your outliner. Go to the Attribute Editor > Collisions un-tick Self Collide and Collide Go to the Attribute Editor > Dynamic Properties > tick Ignore Gravity HINT! Self Collide means that nParticles will not intersect when they come close to one another. Ignoring gravity is pretty selfexplanatory. You can untick collisions for now because they’re not necessary and they make the simulation a lot heavier. STEP6 In order to see particles do something interesting we will introduce a Turbulence Field. Select nParticleShape1 Navigate to Fields/Solvers > Turbulence Use setting from last box bellow. HINT! To add Turbulence properly an nParticle object must be selected. Otherwise the Turbulence won’t affect the nParticles. 8

[Maya nParticle Simulation] by Aleksandar Bursać

(2016, December 19th). SoomeenHahmDesign Ltd.

9


STEP1 Navigate to your FX tab > nParticles

STEP2 Create a basic emitter by clicking Create Emitter HINT! Make sure you click on the square next to Create Emitter so you can choose options.

10

11


STEP3 Emission Type > Select Volume from dropdown menu Rate > Type in 5000 HINT! The rate will depend on your scene, it doesn’t matter what it is, as soon as you play the animation you’ll see whether it’s necessary to turn it down. Also, obviously the bigger the rate the heavier the sim.

STEP4 One you create the emitter you should have something like this (see below) in the scene. Playing the scene should give you the results visible in the second screenshot.

12

13


STEP5 Select nParticleShape1 from your outliner. Go to the Attribute Editor > Collisions un-tick Self Collide and Collide Go to the Attribute Editor > Dynamic Properties > tick Ignore Gravity HINT! Self Collide means that nParticles will not intersect when they come close to one another. Ignoring gravity is pretty self-explanatory. You can untick collisions for now because they’re not necessary and they make the simulation a lot heavier.

STEP6 In order to see particles do something interesting we will introduce a Turbulence Field. Select nParticleShape1 Navigate to Fields/Solvers > Turbulence Use setting from last box bellow. HINT! To add Turbulence properly an nParticle object must be selected. Otherwise the Turbulence won’t affect the nParticles.

14

15


STEP7 Provided you managed to set everything correctly, upon playing you should be seeing something like the screenshot on the right. HINT! It’s fine if it’s not exactly the same. Turbulence Fields are designed to, well, introduce turbulence and disturbance to the nParticles forces so you may end up with something a bit different.

STEP8 Change the Shading of the particles in order to increase visibility. Select nParticleShape1 > Attribute Editor > Shading > Choose Spheres from dropdown menu. HINT! There are various shading methods in Maya. They are renderable instances that come into the place of the particle, but are not actual poly geometry.

16

17


NPARTICLE

002_nParticle Per Particle Attributes In particular this exercise will be focused on rgbPP (color per particle) and radiusPP (radius per particle).

Your particles now have unique colours based on their age.

We will be using the cloud that we previously created in the nParticle “Bascis” chapter.

HINT! You can access the ramp that is used to remap age to colour in your Hypershade > Textures. Adding noise to it or editing it otherwise by introducing new colours will update the particle colours.

STEP1

STEP7

Navigate to your Attribute Editor after you select your particles and find a tab that is called Per Particle Array Atributes.

Now for example we can link colour to another attribute.

Undertneath it is the tab called Add Per Particle Attribute. Expand this tab as well. HINT! There are many different ppAttributess that you can use but in order for them to be acessible to you you must load them up first.

GO to Attribute Editor under Add Dynamic Attributes and click General HINT! This option enables you to get many other types of information a particle can store, but are note readily available just from the default Maya settings. STEP8

STEP2

Navigate to Particle tab and click it.

In the Add tab there is an option that says Color.

It should open a list of options to choose from.

Click it and tick the PerParticleAttribute box.

STEP9

STEP3

On the list find radiusPP.

Navigate to your Attribute Editor under Per particle (Array) Attributes.

Click and Add.

Right-click the tab that says rgbPP. Choose the Create Ramp Option.

HINT! When looking for attributes you can type in the first letter and Maya should place you to the first attribute with that letter because the list is alphabetical.

STEP4

STEP10

Then a dialogue box will open allowing you to choose which characteristic of the particle will used to remap the colour.

To set up a basic nCloth simulation you will need a polygonal mesh with quad tessellation with a decent amount of subdivisions.

Choose Particle Age as input V

HINT! Make sure you avoid n-gons and triangles, they confuse Maya’s solvers. Also avoid low poly meshes. Maya need more subdivs to calculate the deformations with accuarcy.

This essentially creates a simple ramp map that uses numeric input from the particle age to shade the said particle. HINT! There are many other inputs not just age, you can even cross-reference them by usin both the U and the V input. STEP5 Once you replay the sim you might notice that your particles just randomly disappear and cut off pretty fast. This happens because you’re using age of the particle so Maya automatically assigns them a fixed lifespan of 1.

STEP11 In the same way the Ramp was added to the rgbPP attribute you should add a Creation Expression to your radiusPP which will ow be available from your Dynamic Attribute Arrays in the Attribute Editor. Right click and choose Creation Expression. STEP12 Type in the following line of code into your expession editor

Change it to something bigger like 100.

nParticleShape1.radiusPP=npParticleShape1.rgbPP*0.4+0.1;

HINT! This occurs because particles that live forever don’t possess a bound of age that the ramp can remap. STEP6

You might need to tweak numbers 0,4 and 0.1 depending on the scale of your scene. they are just multipliers.

When you replay you should be getting something like the picture bellow. 18

Confirm expression and turn Self Collision on and replay sim.

[Maya nParticle PP Attributes] by Aleksandar Bursać

(2016, December 19th). courtesy of SoomeenHahmDesign Ltd.

19


STEP1 Navigate to your Attribute Editor after you select your particles and find a tab that is called Per Particle Array Atributes. Undertneath it is the tab called Add Per Particle Attribute. Expand this tab as well. HINT! There are many different ppAttributess that you can use but in order for them to be acessible to you you must load them up first.

STEP2 In the Add tab there is an option that says Color. Click it and tick the PerParticleAttribute box.

20

21


STEP3 Navigate to your Attribute Editor under Per particle (Array) Attributes. Right-click the tab that says rgbPP. Choose the Create Ramp Option.

STEP4 Then a dialogue box will open allowing you to choose which characteristic of the particle will used to remap the colour. Choose Particle Age as input V This essentially creates a simple ramp map that uses numeric input from the particle age to shade the said particle. HINT! There are many other inputs not just age, you can even crossreference them by usin both the U and the V input.

22

23


STEP5 Once you replay the sim you might notice that your particles just randomly disappear and cut off pretty fast. This happens because you’re using age of the particle so Maya automatically assigns them a fixed lifespan of 1. Change it to something bigger like 100. HINT! This occurs because particles that live forever don’t possess a bound of age that the ramp can remap.

STEP6 When you replay you should be getting something like the picture bellow. Your particles now have unique colours based on their age. HINT! You can access the ramp that is used to remap age to colour in your Hypershade > Textures. Adding noise to it or editing it otherwise by introducing new colours will update the particle colours.

24

25


STEP7 Now for example we can link colour to another attribute. GO to Attribute Editor under Add Dynamic Attributes and click General HINT! This option enables you to get many other types of information a particle can store, but are note readily available just from the default Maya settings.

STEP8 Navigate to Particle tab and click it. It should open a list of options to choose from.

26

27


STEP9 On the list find radiusPP. Click and Add. HINT! When looking for attributes you can type in the first letter and Maya should place you to the first attribute with that letter because the list is alphabetical.

STEP10 To set up a basic nCloth simulation you will need a polygonal mesh with quad tessellation with a decent amount of subdivisions. HINT! Make sure you avoid n-gons and triangles, they confuse Maya’s solvers. Also avoid low poly meshes. Maya need more subdivs to calculate the deformations with accuarcy.

28

29


STEP11 In the same way the Ramp was added to the rgbPP attribute you should add a Creation Expression to your radiusPP which will ow be available from your Dynamic Attribute Arrays in the Attribute Editor. Right click and choose Creation Expression.

STEP12 Type in the following line of code into your expession editor nParticleShape1.radiusPP=npParticleShape1.rgbPP*0.4+0.1; You might need to tweak numbers 0,4 and 0.1 depending on the scale of your scene. they are just multipliers. Confirm expression and turn Self Collision on and replay sim. HINT! 0.1 is added at the end to ensure that no particles will have the radius of zero, since the darkest particle would one mapped from colour to number be read as 0. Conversely white particles will be multiplied by 1.

30

31


NPARTICLES

003_Emit From Object + Inherit Color + nParticle To Mesh nParticle Clouds can inherit properties from their corresponding emitters if those are polys with texture maps for example. The aim of this exercise is to show you how to achieve this and how to exploit it. STEP1 Create a cube. Add subdivisions to the cube. Assign a Lambert to it. HINT! Finer subdivision creates more vertices and therefore more emission points when you’re using objects as emitters. STEP2

STEP6 In Attribute Editor navigate to your emitter1 tab. Scroll down until you find a tab named Texture Emission Attributes There you will find Texture Rate and Particle Colour Middle Click your ramp from Hypershade and drop it on these tabs. Tick Inherit Colour, Enable for Rate and Emit From Dark. STEP7 Before you can see changes you need to add Colour as a PerParticle attribute which was discussed in the previous chapter. Also for better visibility change Shading from Point to Sphere.

Create a ramp map linked to the Lambert material.

Once you’ve done that and play your simulation you should be seeing changes.

Edit it however you want. I simply introduced Noise.

STEP8

HINT! This texture map will be our source of colour information that our particles need to inherit. Assigning it to a Lambert and shading your object with it will give you a visual representation of the emission points. However the texture itself doesn’t really need to be liked to the object’s material. It’s simply easier to view this way..

As an added feature, building upon what we’ve already covered, you can add radiusPP to your particles as well and you these colours for scaling.

STEP3

At this point it should be clear why we are using Texture Rate as well. Since white particles will be bigger we want to emit fewer of them on light areas.

If your emitting object looks like this you can proceed.

Hence the “Emit From Dark” option which controls the numbers of big particles so that they don’t clog up the scene.

Select the object and go to nParticles.

STEP9

Choose the Emit From Object category.

If you’re happy with the results you can transform there particle to a mesh.

STEP4

Go to Output mesh and match the Properties from the screenshot.

Emitter Type should be Surface.

Hold down Spacebar > Modify > Convert > nParticle to Polygon

Rate can be whatever you want.

HINT! Check out the video for a more in-depth explanation of how these properties affect the mesh that gets generated.

HINT! It is the same process as the one we’ve encountered before with the emitter that is created as a location. If you’re unsure go back to the Basics chapter.

STEP10

STEP5 This step is similar to the one in the Basics chapter Turn off Gravity, set Conserve to 0 and turn Self Collision on. HINT! When something is explained in the previous chapter it will be less in depth in the following ones. Make sure you learn chronologically.

32

If you’ve correctly set the properties for the mesh with Color Per Vertex checked, you will get a mesh that has the particle’s colours saved into it. You can display it by clicking the resulting Polygon and navigating to PolygonShape tab in Attribute editor > Mesh Component Display > Display Colour (under vertex Colour) HINT! Savng these perVertex Colours can make it easier for you to render them using the mantalRayPerVertex component in Hypershade.

[Maya nParticle Simulation] by Aleksandar Bursać

(2016, December 19th). courtesy of SoomeenHahmDesign Ltd.

33


STEP1 Create a cube. Add subdivisions to the cube. Assign a Lambert to it. HINT! Finer subdivision creates more vertices and therefore more emission points when you’re using objects as emitters.

STEP2 Create a ramp map linked to the Lambert material. Edit it however you want. I simply introduced Noise. HINT! This texture map will be our source of colour information that our particles need to inherit. Assigning it to a Lambert and shading your object with it will give you a visual representation of the emission points. However the texture itself doesn’t really need to be liked to the object’s material. It’s simply easier to view this way..

34

35


STEP3 If your emitting object looks like this you can proceed. Select the object and go to nParticles. Choose the Emit From Object category.

STEP4 Emitter Type should be Surface. Rate can be whatever you want. HINT! It is the same process as the one we’ve encountered before with the emitter that is created as a location. If you’re unsure go back to the Basics chapter.

36

37


STEP5 This step is similar to the one in the Basics chapter Turn off Gravity, set Conserve to 0 and turn Self Collision on. HINT! When something is explained in the previous chapter it will be less in depth in the following ones. Make sure you learn chronologically.

STEP6 In Attribute Editor navigate to your emitter1 tab. Scroll down until you find a tab named Texture Emission Attributes There you will find Texture Rate and Particle Colour Middle Click your ramp from Hypershade and drop it on these tabs. Tick Inherit Colour, Enable for Rate and Emit From Dark.

38

39


STEP7 Before you can see changes you need to add Colour as a PerParticle attribute which was discussed in the previous chapter. Also for better visibility change Shading from Point to Sphere. Once you’ve done that and play your simulation you should be seeing changes.

STEP8 As an added feature, building upon what we’ve already covered, you can add radiusPP to your particles as well and you these colours for scaling. At this point it should be clear why we are using Texture Rate as well. Since white particles will be bigger we want to emit fewer of them on light areas. Hence the “Emit From Dark” option which controls the numbers of big particles so that they don’t clog up the scene.

40

41


STEP9 If you’re happy with the results you can transform there particle to a mesh. Go to Output mesh and match the Properties from the screenshot. Hold down Spacebar > Modify > Convert > nParticle to Polygon HINT! Check out the video for a more in-depth explanation of how these properties affect the mesh that gets generated.

STEP10 If you’ve correctly set the properties for the mesh with Color Per Vertex checked, you will get a mesh that has the particle’s colours saved into it. You can display it by clicking the resulting Polygon and navigating to PolygonShape tab in Attribute editor > Mesh Component Display > Display Colour (under vertex Colour) HINT! Savng these perVertex Colours can make it easier for you to render them using the mantalRayPerVertex component in Hypershade.

42

43


NPARTICLES

004_Growth Simulation nParticles can be used to create growth like simulations by using a parent particle cloud in conjunction with a secondary trail cloud that is being emitted from the parent cloud per particle.

STEP1 Using the same logic that was presented in Basics chapter, create a particle cloud controlled by a turbulence filed with a lower emission rate (ie. 50). Emitter type Volume. Work until you have something like the screenshot. STEP2 Once this is completed select your particle cloud and use it as an emitter. It works in the same was as emitting from a polygon. Emitter type should be Omni. This particle cloud will be for notational use only so turn off all collisions, bring Conserve to 0, Ignore All Forces. HINT! Turning off all of these properties basically makes particles completely passive. they just stay wherever it is that they get generated. STEP3 Change the shading to Spheres for better visibility. Your second particle cloud should essentially trace out the trails of the first particle cloud. The simulation will appear as if it is growing. STEP4 You can change the radius of the leading particle cloud to easily follow the trajectories of the parent cloud. Then you can convert the second particle cloud to a polygon mesh and export the animation to Alembic Cache and play with keyframing the growth in a separate scene. HINT! Alembic Cache saves data about polygons rather than nDynamic objects like nParticles, nnCloths and Fluids. It is quite useful if you want to separately tweak and keyframe a developing mesh. Also even though it becomes inert and doesn’t react with fields anymore it is very fast.

[Maya nParticle Trails] by Aleksandar Bursać

44

(2016, December 19th). courtesy of SoomeenHahmDesign Ltd.

45


STEP1 Using the same logic that was presented in Basics chapter, create a particle cloud controlled by a turbulence filed with a lower emission rate (ie. 50). Emitter type Volume. Work until you have something like the screenshot.

STEP2 Once this is completed select your particle cloud and use it as an emitter. It works in the same was as emitting from a polygon. Emitter type should be Omni. This particle cloud will be for notational use only so turn off all collisions, bring Conserve to 0, Ignore All Forces. HINT! Turning off all of these properties basically makes particles completely passive. they just stay wherever it is that they get generated.

46

47


STEP3 Change the shading to Spheres for better visibility. Your second particle cloud should essentially trace out the trails of the first particle cloud. The simulation will appear as if it is growing.

STEP4 You can change the radius of the leading particle cloud to easily follow the trajectories of the parent cloud. Then you can convert the second particle cloud to a polygon mesh and export the animation to Alembic Cache and play with keyframing the growth in a separate scene. HINT! Alembic Cache saves data about polygons rather than nDynamic objects like nParticles, nnCloths and Fluids. It is quite useful if you want to separately tweak and keyframe a developing mesh. Also even though it becomes inert and doesn’t react with fields anymore it is very fast.

48

49


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.