IntroductionWelcome| 00:00 | (music playing)
| | 00:04 | Hi there! My name is Brian Bradley, and welcome to
Creating Simulations in MassFX and 3ds Max.
| | 00:12 | To lead us into our exploration of this
toolset, we will take a look first of all
| | 00:16 | at some of the fundamental
concepts of dynamic simulations.
| | 00:21 | From there we will really dive into
the meat of MassFX and consider the
| | 00:26 | components that make up a rigid body
simulation, as well as looking at a
| | 00:30 | breakdown of how constraints can be
used to add an even wider range of effects.
| | 00:35 | mCloth is an extremely powerful
addition to the MassFX toolset, along with
| | 00:40 | other powerful pieces of the MassFX
puzzle such as ragdolls, forces, and
| | 00:47 | another newcomer mParticles.
| | 00:49 | As we have a lot of ground to cover,
let's go ahead and dive into Creating
| | 00:54 | Simulations in MassFX and 3ds Max.
| | Collapse this transcript |
| Working with the exercise files| 00:00 | If you are a premium member of the
lynda.com online training library, you have
| | 00:05 | access to the exercise files
used throughout this course.
| | 00:09 | The exercise files are in the
Exercise_Files folder, which I have placed on my
| | 00:13 | desktop for convenience. You can of
course place them wherever you like.
| | 00:17 | There are files from most of the
movies in this course. They reside in
| | 00:21 | subfolders inside the 3ds Max project
structure, each named for the relevant chapter.
| | 00:27 | It is not necessary for you to use
these files to benefit from this course; you
| | 00:32 | can use files of your own in
place of them if you like.
| | 00:35 | If you are a Monthly or Annual
subscriber to lynda.com, you don't have access
| | 00:40 | to the exercise files, but you can
follow along using files containing your own work.
| | Collapse this transcript |
| Setting up the 3ds Max project structure| 00:00 | We have set up the scene files for
this course using 3ds Max's built-in
| | 00:04 | file management tools--
| | 00:06 | namely, its use of a project folder
structure. This means you'll be able to
| | 00:11 | quickly and easily access each of
the scene files from inside the 3ds Max
| | 00:15 | application without running into any problems.
| | 00:18 | In this video we are going to quickly
walk you through correctly setting up your
| | 00:22 | 3ds Max project folder so as to take
advantage of this file management setup,
| | 00:26 | and thereby make using the
downloadable exercise files that much easier.
| | 00:31 | The first thing we need to do is perform a
quick check on our 3ds Max preferences.
| | 00:36 | To do this, let's come up to the
Customize menu at the top of our user
| | 00:39 | interface, left-mouse click, come
down, and select the Preferences option.
| | 00:44 | Inside the Preference Settings dialog
we need to make certain we are in the
| | 00:48 | Files tab and then we want to make
certain that we have a check in this Convert
| | 00:52 | local file paths to Relative option.
| | 00:55 | Once we have that, we can just select OK.
| | 00:58 | Now we are ready to quickly walk through the
process of setting our 3ds Max project path.
| | 01:03 | To do this let's come up to the
Quick Access Toolbar and click on the
| | 01:07 | Project folder icon.
| | 01:08 | In the Browse For Folder we need to
locate our exercise files. As we mentioned
| | 01:13 | we have these placed on the desktop, so
if we just close everything up here, you
| | 01:17 | can see our Exercise_
Files folder becomes visible.
| | 01:20 | Now, if we left mouse-click, just make
certain that that shows up inside the
| | 01:24 | project folder path. We can
click OK and we are now ready to go.
| | 01:28 | If we come and click on the Application
button and use the Open command now, you
| | 01:32 | can see we are taken straight into
our Exercise_Files and scenes folder.
| | 01:37 | Now all we need to do is select
the appropriate chapter and the
| | 01:41 | appropriate Start scene file.
| | Collapse this transcript |
|
|
1. Dynamics Simulation 101: Understanding the BasicsWhy simulate and not animate?| 00:00 | When it comes to adding motion to
objects in a 3D scene the question of whether
| | 00:04 | we should animate or simulate
may be one that we need to ask.
| | 00:08 | Not of course that getting the
answer will be simple or straightforward.
| | 00:11 | The correct approach for any given
project oftentimes comes down to the
| | 00:16 | questions of time versus cost, versus benefit.
| | 00:20 | One consideration, for instance, could
be the number of objects that need to be
| | 00:24 | animated in a particular scene or shot.
| | 00:27 | If we all need, say, a single child's
ball to come bouncing down the staircase
| | 00:32 | and then come quickly to rest at the bottom,
| | 00:34 | well a good animator should produce a
fairly decent and believable result in a
| | 00:38 | pretty short timeframe.
| | 00:39 | But if we need two hundred balls to
come bouncing down the staircase, all with
| | 00:45 | individual behaviors, all interacting
and colliding with each other and the
| | 00:50 | general environment, well, as you can
imagine, that would take an animator a
| | 00:54 | lot longer to create--if indeed it could be
done with the required level of complexity at all.
| | 01:00 | In such a case, simulation would probably
provide us with a more suitable option.
| | 01:05 | Another question that may well need
answering could be, how realistic does the
| | 01:10 | motion of my animated object or objects
need to be? We may for instance be given
| | 01:15 | a shot that involves a number of laundry items
| | 01:18 | hung on a clothesline
drying in a gentle breeze.
| | 01:20 | If this is designed as a
cartoon-looking shot it is more than likely that our
| | 01:25 | animators could pull this off quite
convincingly using standard animation tools
| | 01:30 | inside an acceptable timeframe.
| | 01:33 | If, however, these items are to be seen
in a photo-real setting, all of a sudden
| | 01:38 | the believability of the cloth
motion becomes supercritical. Given the
| | 01:42 | complex and oftentimes subtle nature
of cloth motion especially when affected
| | 01:47 | by wind and other elements,
| | 01:49 | the time required for an animator to
attempt such a re-creation would perhaps
| | 01:53 | once again make simulation a much more
attractive option and will most likely
| | 01:58 | give us a superior end result.
| | 02:01 | Time may also be a big factor when
it comes to the question of whether to
| | 02:05 | animate or simulate.
| | 02:07 | More often than not these days, shots
in production are given the shortest
| | 02:11 | possible completion time frames.
| | 02:13 | Because missing a deadline really isn't
an option, it may will be that we simply
| | 02:18 | don't have the time available to take
the manual animation route, even though we
| | 02:23 | may have the talent available to pull it off.
| | 02:26 | And finally, unfortunate as this may
seem to any artist who naturally wants to
| | 02:30 | produce work to the highest possible
standard, oftentimes it is the cost of a
| | 02:35 | particular shot that will be the major
consideration. Even if we do have the
| | 02:40 | time available to animate a shot, the
question of what it will cost in terms of
| | 02:44 | man hours to dedicate one or more
animate just to the production of a particular
| | 02:48 | effect may well be the
deciding factor in the end.
| | 02:52 | Time of course is money in the
commercial world, and the ability to shave perhaps
| | 02:57 | a number of days of the completion
time for a project could make a big
| | 03:01 | difference to its profitability.
| | 03:03 | So whilst the question of whether
to animate or simulate is, generally
| | 03:08 | speaking, not going to be as simple or
straightforward to answer as we would
| | 03:12 | like, hopefully some of the thoughts
in this video can just get us thinking
| | 03:16 | in the right direction.
| | 03:18 | If there are lots of objects in a shot
that need realistic or natural motions
| | 03:23 | and behaviors applied to them, or if we
have a limited time frame and/or limited
| | 03:26 | budget with which to work, well, we may
want to seriously consider the value that
| | 03:31 | can be added to a project if we use
the simulation tools available to us.
| | Collapse this transcript |
| A look at gravity and drag| 00:00 | As a technical artist, when it comes
to simulation work, we really do need to
| | 00:06 | understand the workings of the world around us.
| | 00:08 | This will naturally help us accurately
re-create a dynamic motion and behavior of
| | 00:13 | objects in a very believable way.
| | 00:15 | For this reason, over the next few
videos, we want to briefly touch on a number
| | 00:19 | of laws or principles that govern
objects in motion, laws and principles that
| | 00:24 | really anyone wanting to work on dynamic
simulations would need to have an understanding of.
| | 00:29 | In fact, figuring out how things work
in the real world would be an ongoing
| | 00:34 | field of study for any
serious simulation artist.
| | 00:37 | So, in this video let's give
consideration to a couple of extremely important
| | 00:41 | global environmental effects,
these being gravity and drag.
| | 00:46 | As we will tackle gravity first,
we just need to make a quick disclaimer as
| | 00:50 | neither Sir Isaac Newton nor Professor
Albert Einstein were able to fully answer
| | 00:54 | the questions of just what
gravity is and how it actually works.
| | 00:59 | We will be focusing in this instance on
a discussion of the effects of gravity
| | 01:03 | as we see them in a general sense here on earth.
| | 01:06 | This, after all, is the premise
upon which tools like MassFX work.
| | 01:09 | Gravity as a force determines that any
object having mass, if suspended in mid-
| | 01:15 | air and then released, will fall to the ground;
hence the old adage, what goes up must come down.
| | 01:22 | Objects come down at a fixed--that is,
unchanging--rate of 9.8 meters per second
| | 01:29 | squared. This is a constant value and
it is essentially irrespective of mass.
| | 01:34 | It is very true that when affected
only by gravity, any two objects, no matter
| | 01:41 | what their respective size and mass,
should fall to earth at exactly the same
| | 01:45 | constant speed, as we have
mentioned, of 9.8 meters per second.
| | 01:49 | So, unless we are creating very
unique or stylized situations, animations,
| | 01:54 | then really all the objects in our
dynamic simulation will need to be subject
| | 01:59 | to the law of gravity.
| | 02:01 | Getting this setting right is going
to be critical to the finished quality
| | 02:04 | of our simulations.
| | 02:06 | If, then, all objects irrespective of
mass should fall at the same speed under the
| | 02:11 | influence of gravity, we may well ask
why two very different objects, such as a
| | 02:15 | feather and a brick, appear to
fall at very different speeds.
| | 02:19 | Well, the answer is found in the second
effect we want to consider here, which
| | 02:24 | is drag, or air resistance.
| | 02:26 | Air, or the atmosphere around us, can be
thought of as an upward force of friction
| | 02:32 | that acts against gravity;
| | 02:33 | it slows down the rate at
which an object will fall.
| | 02:37 | If the structure or form of an object
creates a lot of friction, as it would
| | 02:42 | in our feather's case, then air resistance
will slow it down very noticeably indeed.
| | 02:47 | If an object's fall doesn't really
create friction, as in the case of a brick,
| | 02:51 | then air will have very little, if any, effect
on it and so it will appear to fall faster.
| | 02:58 | However, if the feather and brick
were dropped together in a vacuum--that is, an
| | 03:01 | environment from which all air or cause
of friction had been removed, but that
| | 03:06 | was still subject to the law of gravity--
they would in fact fall at the same rate
| | 03:10 | and hit the ground at the same time.
| | 03:12 | Now, as the 3D environments in which
our simulations will take place are, in
| | 03:17 | reality, virtual vacuums with gravity
enabled, we will need to use the tools
| | 03:22 | available to re-create this
atmospheric resistance, this drag. Again, this is
| | 03:26 | going to be critical to the
quality of our finished simulation.
| | 03:30 | Gravity and drag are two naturally
occurring environmental effects that play a
| | 03:34 | huge role in determining how
objects move and react in the real world.
| | 03:39 | We may, though, wonder about the objects
themselves: Does the way that they are made
| | 03:44 | or constructed affect their motion.
| | 03:46 | Well, in our next video we will get
an idea regarding the answer to that
| | 03:50 | question as we take a look
at volume, mass, and density.
| | Collapse this transcript |
| Understanding volume, mass, and density| 00:00 | If you've ever spent any time
working with a photographic camera--be that
| | 00:04 | film or digital--set in manual mode, you will
probably become aware of the exposure triangle--
| | 00:10 | that is, the shutter speed, ISO, or
film speed, and F-stop or F number values.
| | 00:17 | These three settings are all
interdependent, and any one of them can be used to
| | 00:21 | alter the exposure, or level of
light captured in a photograph.
| | 00:24 | In fact, if you've spent any time
lighting and rendering inside a 3D
| | 00:28 | application or render engine that uses
a physical camera model, you will also
| | 00:32 | have encountered this triangle.
| | 00:34 | Now, we mention this because when it
comes to creating believable dynamic
| | 00:38 | simulations, we do come across a very
similar triangle system, one that affects
| | 00:43 | how objects will behave inside the simulation.
| | 00:46 | These are the volume, mass, and
density parameters of an object.
| | 00:51 | These three measurements are
interdependent, and so a change to any one of
| | 00:55 | them will affect the makeup of the other two.
| | 00:57 | They are all used by a physics
simulation engine to determine how an object
| | 01:02 | ought to behave whilst it is
both at rest and in motion.
| | 01:06 | Now, the volume of an object is
already known to your 3D application.
| | 01:10 | It is based upon its size, or the amount of
space that it occupies inside the 3D environment.
| | 01:16 | If we want an object's volume to
be accurately calculated in a MassFX
| | 01:21 | simulation, we must create or
model our geometry at real-world scale.
| | 01:26 | This really is vital if we want
realistic behavior from our simulated objects.
| | 01:32 | Mass is a measurement that
is often confused with weight,
| | 01:35 | but the two are not,
strictly speaking, the same thing,
| | 01:39 | although it is true that here on Earth greater
mass does oftentimes equate to a heavier object.
| | 01:45 | Mass is, in reality, a measurement of
the amount of matter making up an object.
| | 01:52 | This of course never changes, regardless of
the environment that an object is placed in.
| | 01:57 | So for example, an object with a mass
of 1500 kg here on the earth still has a
| | 02:02 | mass of 1500 kg if it is placed on the moon.
| | 02:06 | The amount of matter making
up the object never alters.
| | 02:10 | Of course the change in environmental
gravity will mean that the object would
| | 02:15 | weigh less on the moon as weight is
really a measurement of gravity at work on
| | 02:19 | an object in a specific location.
| | 02:22 | In order for the simulator to know how
much mass our objects have, we generally
| | 02:27 | need to supply that information in a
setting of either grams or kilograms.
| | 02:31 | In MassFX, the Mass
parameter is set using kilograms.
| | 02:35 | Density is a measurement of an
object's mass based on the volume or area of
| | 02:40 | three-dimensional space that it is packed into.
| | 02:43 | The greater the mass packed into a fixed
volume, the denser a material is said to be.
| | 02:48 | Now, this could also be expressed as,
the smaller the volume a fixed mass is
| | 02:53 | packed into, the denser
the material is set to be.
| | 02:55 | Once our software knows the volume and
mass of an object, it can automatically
| | 03:00 | determine the correct density, as
this is calculated through the formula of
| | 03:05 | mass divided by volume.
| | 03:07 | Naturally, once you have all of that
information correctly piped into our
| | 03:11 | system, our objects are going to stand
a much better chance of behaving in a
| | 03:15 | realistic manner when they're simulated.
| | 03:17 | Now, whilst it is vital to understand
both the environmental--such as gravity
| | 03:21 | and drag--and object-specific properties--
such as volume, mass, and density that
| | 03:26 | affect our simulations--they are
naturally all the elements that we need to have
| | 03:30 | an understanding of, if we're going to
be able to fine-tune our simulations
| | 03:34 | and make them thoroughly
believable to our audiences.
| | 03:37 | These come in the form of Newton's
three basic laws of motion, which we will be
| | 03:42 | taking a brief look at in our next video.
| | Collapse this transcript |
| What are Newton's laws of motion?| 00:00 | Knowing how objects should be moving
in a given situation can go a long way
| | 00:06 | towards helping us create
believable dynamic simulations.
| | 00:09 | This would mean having at least a basic
grasp of the three laws of motion as set
| | 00:13 | down by Sir Isaac Newton.
| | 00:15 | According to Newton's first law, an
object at rest will remain at rest unless
| | 00:21 | acted on by an unbalanced or stronger force.
| | 00:25 | By the same criteria, an object in
motion continues in motion with the same
| | 00:29 | speed and in the same direction unless,
again, it is acted upon by an unbalanced force.
| | 00:36 | This law, often cited alongside
Galileo's concepts of inertia, reminds us that
| | 00:41 | there is a natural tendency of objects
to keep on doing what they are doing.
| | 00:46 | All objects exhibit natural
resistance to changes in their current state.
| | 00:51 | This means in our simulations we
will need to think in terms of forces,
| | 00:55 | forces to start an object moving
and then forces that will act upon it to
| | 01:01 | either alter its cause or behavior or
maybe even to slow it down, and eventually
| | 01:05 | to bring it to a stop.
| | 01:07 | According to Newton's second law,
acceleration is produced when an unbalanced
| | 01:11 | force acts on a mass.
| | 01:14 | The greater the mass of the object
being accelerated, the greater the amount of
| | 01:18 | force needed to accelerate it.
| | 01:20 | This of course means that everyone is
unconsciously aware of Newton's second law.
| | 01:25 | Everyone knows that a heavier object
will require more force to move as
| | 01:30 | compared to a lighter one.
| | 01:31 | Rather than being expressed simply as
an idea or concept, this second law can
| | 01:35 | provide us with an exact relationship
between force, mass, and acceleration.
| | 01:41 | In other words, it can be expressed as
a mathematical equation: F=M x A. Or in
| | 01:49 | English, force equals mass times acceleration.
| | 01:52 | Here is an example of how
Newton's second law might work.
| | 01:56 | Little Johnny's bicycle has a mass of 10 kg,
| | 01:59 | but it has a flat tire, so
he has to push it at home.
| | 02:03 | The bike is pushed at 0.1 m/s2.
| | 02:07 | By using Newton's second law, we
can compute how much force Johnny is
| | 02:12 | applying to his bicycle.
| | 02:13 | F=10x0.1 m/sec2 would give us an answer
of 1 Newton, or a force of 1 Newton being
| | 02:22 | applied to move the bicycle along.
| | 02:24 | According to Newton's third law,
| | 02:26 | for every action, there is an
equal and opposite reaction.
| | 02:30 | This means that for every force, there
receives a reactionary force that is equal
| | 02:34 | in size but opposite in direction.
| | 02:37 | The simple push or press-up as
used in physical exercise can nicely
| | 02:41 | demonstrate this law for us.
| | 02:43 | The action of the upper body muscles
would be to push down on the ground with a
| | 02:48 | particular amount of force.
| | 02:50 | The reaction is that the ground would
push the body upwards with an equal force,
| | 02:55 | action and then equal and opposite reaction.
| | 02:59 | Now, we of course won't need to become
renowned physicists in order to work with
| | 03:03 | simulation tools such as MassFX,
| | 03:05 | but it does become very clear that the
more we understand the workings of the
| | 03:09 | world around us, the more we understand
why objects behave as they do, the better
| | 03:15 | position we will be in to produce
believable, high-quality simulations.
| | Collapse this transcript |
| Finding believable frames per second and substeps| 00:00 | Along with the important concepts
we've discussed so far in this chapter, the
| | 00:05 | production of dynamic simulations that
fulfill the needs of our projects will
| | 00:10 | also require that we understand some
basic concepts regarding the way our
| | 00:14 | physics simulator is working.
| | 00:16 | One particularly essential piece of
information is that, like moving pictures,
| | 00:21 | animated sequences, and the like, the
production of a dynamic simulation--or, more
| | 00:26 | specifically, the collision
calculations in the simulation--will be
| | 00:30 | dependent on a frames-per-second setting.
| | 00:33 | This and related settings will
greatly influence the final outcome of the
| | 00:38 | quality of any dynamic simulation we produce.
| | 00:41 | To explain: if for instance, we are
working in our 3Ds Max scene with an
| | 00:46 | animation frame rate of 30 frames per
second set, then our simulation engine
| | 00:51 | will take 30 collision
calculations, or simulation steps, per second.
| | 00:56 | If, however, we were to work at 24
frames per second, well, our collision
| | 01:01 | calculation rate would also
drop down to 24 per second.
| | 01:05 | This means our simulation would
naturally be faster due to the reduced number of
| | 01:09 | calculations per second required, but
also less accurate than the previous 30-
| | 01:14 | frames-per-second example.
| | 01:16 | Now, if with this were the only
method of controlling collision accuracy in
| | 01:20 | our simulation engine available, well, we
could find ourselves in a little bit of trouble.
| | 01:26 | Thankfully, in any good simulation
engine, we have other options available
| | 01:30 | to us, such as enabling subframe calculations.
| | 01:34 | This will allow the physics engine
to essentially subdivide each frame of
| | 01:39 | animation playback time into a smaller chunk.
| | 01:43 | So, if at an animation playback rate
of 24 frames per second, we were to
| | 01:47 | introduce a single subframe or
substep calculation into the simulation--
| | 01:52 | assuming of course that this option is
available in our physics engine, which it is in MassFX--
| | 01:58 | well, in this situation, our engine
would now be able to take 48 collision
| | 02:03 | calculations per second instead of the
original 24, which would naturally result
| | 02:08 | in a much more accurate simulation.
| | 02:10 | This increase in both the
number of calculations per second and
| | 02:14 | simulation accuracy will continue
as we add more subframe sampling, or
| | 02:19 | substeps to the process.
| | 02:21 | At 2 substeps, we would be
taking 72 calculations per second.
| | 02:25 | At 3, we would be getting 96, and so it goes on.
| | 02:29 | Of course, we do need to keep in mind
that these extra calculations and the
| | 02:33 | resulting increase in accuracy will
come at the cost of extra time required to
| | 02:38 | complete the calculation process.
| | 02:39 | Understanding how this division of time
and calculation steps works really
| | 02:45 | is extremely important when it comes
to effectively managing the quality and
| | 02:50 | completion times of our simulations.
| | 02:53 | In our next video, we'll move on to a
consideration of the different object
| | 02:56 | types we can work with in our dynamics
simulations, specifically the difference
| | 03:01 | between rigid and soft body object types.
| | Collapse this transcript |
| Understanding the difference between rigid and soft bodies| 00:00 | When it comes to creating dynamic
simulations, there are two object types that
| | 00:04 | you'll probably hear mentioned on a
regular basis: rigid bodies and soft bodies.
| | 00:10 | These labels, or descriptions, refer to
the type of objects that a particular
| | 00:14 | simulation has been designed to work
with, or, more accurately, to re-create.
| | 00:19 | The term rigid bodies refers to the
simulation of solid unyielding objects
| | 00:24 | whose subcomponents--that is, vertices,
faces, and edges of the object--do not
| | 00:28 | deform in any way during
the course of the simulation.
| | 00:32 | Now, in the real world
very few such objects exist.
| | 00:36 | Crash a large solid truck into a solid
brick wall and even at relatively low
| | 00:41 | speeds, some parts of both objects
will deform, probably even break.
| | 00:46 | However, in order to create a
predictable and repeatable simulation environment,
| | 00:50 | such effects are not allowed to
occur inside a rigid body simulation.
| | 00:54 | If we wanted to see rigid body dynamics
at work, all we would need to do would
| | 00:59 | be to look at pretty much any action-
adventure film, game, or TV show these days
| | 01:03 | and we would probably see an
example of rigid body dynamics at work.
| | 01:07 | One often-seen use is the destruction
and collapse of solid objects such as
| | 01:12 | buildings and walls.
| | 01:13 | These objects are first broken, or
fractured, into multiple pieces and then their
| | 01:18 | motion is simulated using rigid body dynamics.
| | 01:20 | Artists can, just as easily though, use
rigid body simulation tools for much less
| | 01:25 | spectacular but equally important
production tasks such as setting up otherwise
| | 01:30 | time-consuming aspects of a 3D scene: a
jar full of coins or sweets, a toy chest
| | 01:35 | full of cars or spaceships, an
alleyway strewn with debris and litter.
| | 01:40 | These are processes that could take
considerable time to work through manually,
| | 01:43 | but that can be handled very
easily with rigid body simulation tools.
| | 01:48 | Soft body objects, by contrast, behave in
a very different manner--very different
| | 01:52 | that is as compared to
their rigid body counterparts.
| | 01:55 | In a soft body simulation, the shape of an
object is actually required to change over time.
| | 02:01 | This can be accomplished because the
relative distance of any two points on a
| | 02:06 | soft body object are not considered
to be fixed as they are in a rigid body
| | 02:10 | simulation. While it's deforming though,
| | 02:12 | a soft body object is usually expected
to retain its general shape and volume to
| | 02:17 | some degree, so as to keep
it recognizable to the viewer.
| | 02:20 | Now, the scope of, or uses of, our soft body
dynamics, again, really is quite broad-ranging.
| | 02:26 | This could be the simulation of soft
organic materials, and here we might think
| | 02:30 | of muscle and fat, even hair and
vegetation, to other parts more obvious
| | 02:36 | deformable object types, such as
clothing and fabric in general.
| | 02:39 | Which of these simulation types--that
is, rigid body or soft body--we choose to
| | 02:43 | work with will naturally depend
entirely upon the type of object and the motion
| | 02:48 | that we are trying to emulate.
| | 02:49 | The good news with the MassFX system
in 3ds Max is that we can use both rigid
| | 02:54 | and soft body objects inside the same
simulation, even having them interact very
| | 02:59 | nicely indeed with one another.
| | 03:01 | One thing we do need to keep in mind
as we produce our simulations though, is
| | 03:05 | that, typically speaking, the idea
behind tool such as MassFX is to provide a
| | 03:10 | visually plausible emulation rather
than a super-accurate scientific or
| | 03:15 | engineering simulation.
| | 03:16 | In our next video, we will look a
little more closely at rigid body objects
| | 03:20 | and consider three rigid body types
that are available to work with inside our
| | 03:26 | simulations.
| | Collapse this transcript |
| More about rigid body types| 00:00 | In this video, we just want to spend a
minute or two digging a little deeper
| | 00:04 | into the rigid body type itself.
| | 00:06 | We want to have a look at the
differences found in the three typical rigid body
| | 00:10 | options that are generally made available to us.
| | 00:13 | These are the dynamic, static,
and kinematic rigid body types.
| | 00:18 | Sometimes, depending on the software
that we are actually using, we may
| | 00:21 | come across slightly different terms such
as active, passive, and animated rigid bodies.
| | 00:26 | A dynamic, or active, rigid body object
is much like an object in the real world.
| | 00:32 | It is subject to gravity and
other forces present in the scene.
| | 00:37 | It bumps into or collides with objects,
effectively pushing them around the 3D
| | 00:41 | environment and it itself can be
pushed by these other objects in turn.
| | 00:46 | To create this object interaction,
simulation software will assign a piece
| | 00:51 | of geometry in the scene a physical shape or
mesh upon its creation as a rigid body type.
| | 00:56 | This in itself is an option that's
generally configurable, something that we
| | 01:00 | have a measure of control over.
| | 01:02 | In MassFX, as in or the systems,
the simulation moves this physical
| | 01:07 | representation of the object, the
physical shape, and the graphical mesh in the
| | 01:11 | scene--in other words, the geometry
that we see in the viewport will be updated
| | 01:14 | or driven from that.
| | 01:17 | A kinematic, or animated rigid body
object, is a somewhat different entity.
| | 01:21 | It is not subject to gravity, or indeed
any other force that can be found in the
| | 01:27 | scene, although it can collide with
and push any dynamic rigid body objects
| | 01:32 | that it encounters.
| | 01:33 | It, in turn however, cannot
be pushed or affected by them.
| | 01:37 | In this particular instance, the
graphical mesh--remember, that it is the object
| | 01:41 | that we see in the viewport--is
left onto the control of the actual 3D
| | 01:45 | application rather than the simulation engine.
| | 01:48 | Now, this is true whether a Kinematic
rigid body is actually animated or not.
| | 01:53 | And so it is the 3D application that
will control the transforms of the physical
| | 01:58 | or collision shape or mesh.
| | 02:00 | And remember, that is what calculates
the collisions inside the simulation.
| | 02:05 | The brilliant thing about MassFX in 3ds
Max is that an object can start out as
| | 02:10 | a Kinematic rigid body and then switch over
to dynamic at any point in the simulation.
| | 02:16 | The object will then behave just
like any other dynamic rigid body.
| | 02:20 | It will be subject to the gravity
setup in the scene and indeed any of the
| | 02:24 | forces that we may have
present in the environment.
| | 02:27 | The Static or Passive rigid body type
is somewhat similar to Kinematic, except
| | 02:32 | that it cannot be animated.
| | 02:34 | A Dynamic object can bump
into a Static rigid body.
| | 02:38 | It can bounce off it. But the static
rigid body itself will never react in any way.
| | 02:43 | Now static rigid body type is
extremely useful for performance optimization,
| | 02:48 | as really all it needs to do is sit in the
scene and have other objects collide with it.
| | 02:54 | There is no need to calculate the
transforms of that particular object as it is
| | 02:58 | not going to be moving anywhere at all.
| | 03:01 | It is also extremely valuable because
it supports concave physical shapes.
| | 03:06 | The fact that we have three different
rigid body types to work with in our scenes
| | 03:10 | means that we should fairly easily be
able to find a combination to for pretty
| | 03:14 | much any rigid body dynamic
scenario that we can come up with.
| | 03:19 | Sometimes a little careful planning is
required to determine which objects need
| | 03:23 | which rigid body type applied to them,
| | 03:25 | but once we've taken a bit of time to
get that all figured out, our simulations
| | 03:29 | should turn out very nicely indeed.
| | Collapse this transcript |
| How collisions are calculated| 00:00 | In a typical 3d scene we refer to the
objects we view and manipulate in the
| | 00:05 | viewport as pieces of geometry, or meshes.
| | 00:08 | In a dynamic simulation, however, we
need to understand that there is a
| | 00:12 | distinction made between what we see
in the viewport, which you refer to as
| | 00:16 | graphical mesh, and what we simulate
or calculate collisions with, which is
| | 00:21 | referred to as a physical
mesh or a physical shape.
| | 00:24 | Very rarely are the two identical in
makeup. In fact, for the sake of speed, we
| | 00:30 | will oftentimes prefer them not to be.
| | 00:32 | This physical shape or mesh is a
nonrendering representation of the graphical
| | 00:36 | mesh and is created when we set a piece
of geometry in a scene to be either a
| | 00:40 | rigid or soft body object.
| | 00:42 | The physical mesh is what is
used as a collision object.
| | 00:46 | We cannot stress that
very important point enough.
| | 00:49 | It is this that will collide or
interact with other objects in the simulation
| | 00:54 | and thereby create the simulated
motion that we are looking for.
| | 00:58 | The fact that these physical meshes have
to be specifically added or attached to
| | 01:02 | objects in the scene means that, well,
only elements that we deem required are
| | 01:06 | actually added into the simulation,
of course ensuring that the number of
| | 01:10 | calculations required to produce the
simulated effect are kept to a minimum.
| | 01:15 | Now, to optimize a graphical mesh, or what
we think of as a 3D model--maybe for
| | 01:20 | something like a real-time game engine
or possibly just to get faster render
| | 01:23 | time from our scene--we would edit the
number of vertices and polygons making up
| | 01:28 | the geometry. Most likely, we would
reduce the overall count wherever possible.
| | 01:32 | Well, in a similar way, when it comes to
a dynamic simulation, we really want--in
| | 01:37 | fact need--to control the amount of
information in our physical meshes.
| | 01:42 | The lighter the physical mesh, in
terms of vertices and faces, the easer the
| | 01:46 | collision detection process for the
simulation engine and so the faster our
| | 01:50 | simulation will calculate.
| | 01:52 | Typically speaking, the amount of
information needed in a mesh for accurate
| | 01:56 | dynamic simulation purposes really is
far less than that needed for an accurate
| | 02:01 | or pleasing graphical representation.
| | 02:04 | For example, to render a perfectly
smooth sphere we may need to have
| | 02:08 | somewhere in the region of two hundred
vertices on our object before we would stop
| | 02:13 | seeing any surface faceting.
| | 02:14 | But to create a reasonably accurate
simulation using the same sphere, we would
| | 02:19 | really only need our collision mesh to
have something like thirty-six vertices, which
| | 02:23 | is a considerable reduction and would
make all the difference in the world to
| | 02:28 | our simulation speed.
| | 02:29 | Typically, simulation software will have
a number of simplified primitive shapes
| | 02:34 | available for use as physical meshes or shapes.
| | 02:38 | In MassFX, for instance, we have
primitives such as Sphere, Box, and Capsule.
| | 02:43 | Whenever possible, we will want to
use these shapes simply because they are
| | 02:47 | typically both smoother and faster
inside the simulation than a polygonal
| | 02:52 | representation such as a
concave or a convex hole.
| | 02:55 | To use the example found in the 3ds Max
help file, a beachball using a faceted
| | 03:00 | convex hole for its physical shape will
roll unevenly on the ground, resulting
| | 03:04 | of course in an unrealistic-looking simulation.
| | 03:07 | Using the built-in sphere physical shape
to represent the ball, however, would let
| | 03:11 | it roll smoothly across the ground
and would yield much-improved collision
| | 03:15 | detection performance.
| | 03:17 | Of course primitive shapes we only be
useful in a certain, and possibly limited,
| | 03:22 | number of situations,
| | 03:23 | so we may find that we need to use
more complex collision shapes such as
| | 03:28 | convex and concave holes.
| | 03:30 | In fact, under certain circumstances we
may even need to generate a physical mesh
| | 03:34 | from the actual graphical
mesh we have in the scene.
| | 03:37 | Typically though, this only works for
the static or passive rigid body type, and
| | 03:42 | of course it has the potential to
impact performance quite significantly,
| | 03:45 | particularly if our mesh is a complex one.
| | 03:50 | The more complex our physical or a
collision mesh becomes, the higher the
| | 03:53 | number of calculations required to
track its interaction with other physical
| | 03:57 | shapes in the scene.
| | 03:58 | This in turn will most likely result
in our simulations becoming slower and
| | 04:02 | slower as collisions increase
in complexity and/or frequency.
| | 04:06 | Of course, now that we understand how
our simulation tools are calculating
| | 04:10 | collisions--that is, these physical
representations are being used--we are in a
| | 04:16 | much better position to be able to
tweak and fine-tune the setup so as to get
| | 04:19 | the best possible
performance from a given simulation.
| | 04:22 | Keeping an eye on which physical shapes
we're using and where possible, using the
| | 04:26 | simple shapes available, we'll go a
long way towards keeping our dynamic
| | 04:30 | simulations as speedy and
interactive as possible.
| | Collapse this transcript |
| Learning the difference between concave and convex meshes| 00:00 | We have already discussed the vital role
that collision meshes or shapes play in
| | 00:05 | a dynamic simulation.
| | 00:07 | We have also mentioned in passing two
very important physical shape types that
| | 00:11 | are available to us:
| | 00:13 | convex and concave holes.
| | 00:16 | If the simple primitive shapes we
have access to are not suitable for our
| | 00:20 | particular simulation needs, we may
well need to use one of these options.
| | 00:24 | The question is, in any given
situation, which one should we choose?
| | 00:29 | Well to make the right choice, we
need to first of all understand the
| | 00:32 | difference between the two.
| | 00:34 | Once we grasp that, we will be able to
figure out which of them will fit our
| | 00:38 | current simulation needs.
| | 00:40 | According to one definition, a
concave object is something that is hollow
| | 00:44 | or rounded inward with respect to its
surface, such as a soup bowl, whereas
| | 00:50 | a convex object surface curves outward or
is rounded like the exterior of a sphere.
| | 00:56 | Actually, a flat surface is also
counted as a convex surface inside a dynamic
| | 01:01 | simulation, which is a good piece
of information to just keep in mind.
| | 01:05 | To get the concepts of concave and
convex clear in our minds, let's take a look
| | 01:11 | at some visual examples, along with a
very simple test we can perform that will
| | 01:15 | show us which surface or
object type we are dealing with.
| | 01:19 | To test which of our two object types
-- that is, convex or concave--we are
| | 01:24 | looking at, all we need to do is simply
draw a straight line through one of our shapes.
| | 01:30 | If, no matter what angle we draw the
line from, all we see is a single entry and
| | 01:35 | exit point, then we have a convex shape.
| | 01:39 | However, if at any point we cross more
than two edges of our outline--that is,
| | 01:44 | we have more than a single entry and
exit point--that would indicate to us that
| | 01:49 | we have a concave shape, one that at
some point has a surface indentation.
| | 01:55 | This same simple test can
also be applied to 3D geometry.
| | 01:59 | The test criteria of course remains unchanged.
| | 02:02 | If we can draw a line through our
object from any angle and have only one entry
| | 02:08 | and one exit point from the volume of
our object, then we have a convex mesh.
| | 02:13 | More than a single entry and exit
point would naturally indicate to us that
| | 02:18 | we're looking at a concave mesh.
| | 02:20 | Being able to identify which object type
we are working with really is important.
| | 02:26 | There are often limitations on where
simulation software like MassFX will allow
| | 02:31 | a particular option or object type to
be used, especially is this the case with
| | 02:36 | any concave geometry we
may have in the simulation.
| | 02:39 | For instance in MassFX, concave geometry
cannot be used as a dynamic rigid body.
| | 02:46 | It simply will not simulate accurately.
| | 02:49 | Concave geometry only behaves
correctly when set as a static rigid body.
| | 02:53 | Now, this of course initially could
appear to limit our simulation options.
| | 02:58 | To show that this is not case, let's take a look
at a very simple scene consisting of a torus and teapot.
| | 03:06 | By default, 3ds Max does not have the
MassFX Toolbar enabled as we have it here.
| | 03:12 | Although we do cover this in the
chapter two video entitled MassFX and the 3ds
| | 03:17 | Max UI, if you want to quickly grab
this toolbar for yourselves right now,
| | 03:21 | simply find an empty area up on the
main toolbar, right-click, and select the
| | 03:25 | MassFX Toolbar option.
| | 03:28 | Getting back to our torus and teapot,
if these were real-world objects
| | 03:32 | suspended in the air as they are,
dropping them together would see the teapot
| | 03:36 | drop through the center of the torus,
and both objects would naturally come to
| | 03:40 | rest on the ground.
| | 03:41 | But if we just set these two objects
to be dynamic rigid bodies inside MassFX
| | 03:47 | and then run a simulation, you can see
that actually doesn't appear to happen.
| | 03:51 | Rather than falling through the torus,
the teapot appears to sit on top of it.
| | 03:58 | The torus, as we can clearly
see, has a concave surface.
| | 04:02 | It rounds inward on itself.
| | 04:04 | The dynamic rigid body modifier, however,
defaults to creating a convex physical
| | 04:09 | or collision mesh that cannot
recognize an inward-curving surface.
| | 04:13 | Technically speaking, our torus object cannot be
used as a dynamic rigid body in the simulation.
| | 04:20 | What though, if we set a
physical shape to concave?
| | 04:23 | After all, it does appear to be
an option that is available to us.
| | 04:27 | Well, when we do, and run the
simulation again, as you can see, we run into a
| | 04:32 | fairly serious problem.
| | 04:34 | The torus does allow the teapot to
pass through its center but it itself is no
| | 04:39 | longer a dynamic object.
| | 04:41 | It doesn't react at all to the
gravity set in the simulation.
| | 04:45 | Thankfully, we can use the tools given to us
in MassFX to work around these limitations.
| | 04:51 | Down in the Physical Mesh Parameters
rollout, once we switch our shape type over
| | 04:55 | to concave, we get a number of
previously unavailable options come to life, one
| | 05:01 | of which is this Generate button.
| | 05:03 | If we click this, MassFX will now
create a number of convex holes that are
| | 05:08 | stitched together to encompass
the surface of our concave object.
| | 05:13 | Now, when we run the simulation,
we do get the desired end result:
| | 05:17 | the teapot falls through the torus;
| | 05:19 | both objects come to rest on the ground plane.
| | 05:23 | To prove that our objects can indeed
interact very nicely, let's reset the
| | 05:27 | simulation, just reposition the
teapot a little bit, and then run the
| | 05:32 | simulation once again.
| | 05:33 | As you can see, no problems at all.
| | 05:36 | We can indeed get an even better fit
for our convex holes by checking this
| | 05:41 | Improve Fitting checkbox.
| | 05:43 | Then we just need to click
the Generate button once again.
| | 05:46 | Understanding the difference between
Concave and Convex surface types is clearly
| | 05:51 | an important piece of the
learning-to-create-simulations puzzle.
| | 05:54 | Equally important of course is an
understanding of which simulation situations
| | 05:59 | we can and cannot use these mesh
types in, although we have seen that with
| | 06:04 | some careful planning and
judicious use of the tools available to
| | 06:07 | us--particularly in MassFX--we should be
able to deal with most any rigid body
| | 06:12 | simulation setting that comes our way.
| | 06:15 | In our next video, we are going to
take a look at the concepts behind another
| | 06:19 | extremely important set of rigid body
simulation tools--these being constraints.
| | Collapse this transcript |
| What is a constraint and how do we use it?| 00:00 | Whenever we add a dynamic rigid body
modifier to an object or objects in our
| | 00:05 | scene, they become
subject to the law of gravity.
| | 00:07 | This should mean of course it is
enable in our global options.
| | 00:11 | However having all free-floating
objects in the scene automatically fall to the
| | 00:16 | floor may not be the desired end result.
| | 00:19 | We may, for instance, find ourselves
needing to fix certain objects in places, it
| | 00:23 | were, locking them to a
specific point in 3D space.
| | 00:27 | Alternatively, we may need to create
complex relationships between two objects in
| | 00:31 | the scene, such as having them
dynamically slide against one another within a
| | 00:35 | fixed set of boundaries or revolve
around one another on a fixed axis.
| | 00:40 | In these and other such situations,
we will want to make use of a set of
| | 00:44 | tools called constraints.
| | 00:45 | As you can probably surmise from
the name, a constraint inside a dynamic
| | 00:49 | simulation restricts the movement of
particular objects that are part of the
| | 00:54 | rigid body simulation.
| | 00:56 | The idea of a constraint is that
it creates hierarchical parent-child
| | 01:00 | relationship between two entities.
| | 01:03 | Some examples of constraints in the
real world would include hinges, nails,
| | 01:07 | curtain rails, and axles, to name just a few.
| | 01:10 | Now in MassFX in 3ds Max, all of the
constraint types that we will mention here
| | 01:14 | are available as preset options,
| | 01:17 | although it is probably worth noting
that they're all just variations of the
| | 01:21 | universal constraint but that have
particular settings already applied to them.
| | 01:26 | Of course, all good dynamic
simulation tools will have these or similar
| | 01:30 | constraint options available.
| | 01:33 | The simplest constraint type we can
use in a rigid body simulation is often
| | 01:36 | referred to as a rigid or fixed
constraint, and really, its name tells us exactly
| | 01:41 | what it is designed to do.
| | 01:43 | By default, a rigid constraint will
have all of its transform options locked.
| | 01:47 | This means there can be no movement,
rotation, or twist action at all once
| | 01:52 | a simulation starts.
| | 01:54 | It really does lock an object in
position. It can also be used to lock two objects
| | 01:59 | together so that they move and
behave as one inside the simulation.
| | 02:04 | Another typical constraint type we
may come across could be the Slide
| | 02:08 | constraint--very similar in construct to
a rigid constraint, except in this case
| | 02:13 | we do have a limited
single-axis translation enabled.
| | 02:18 | In MassFX this is the Y axis by
default, but of course this can be altered.
| | 02:23 | We might also find we have a
Hinge constraint available.
| | 02:25 | This usually has a single swing axis
enabled that has a limited swing range set
| | 02:31 | in degrees. We might also find a twist
constraint, which will probably have a
| | 02:35 | single axis twist value that has
been set to unlimited or unconstraint.
| | 02:39 | This would allow an object to twist, or
as I prefer to think of it, spin freely.
| | 02:44 | In MassFX we also get two other preset
constraint types that we can work with,
| | 02:49 | these being the universal constraint
that has two swing axes set to a limited
| | 02:54 | value, such as 45 degrees, and a
ball-and-socket constraint that uses two
| | 02:59 | separate swing axes limited this
time to 80 degrees, but also with a twist
| | 03:03 | amount set to unlimited.
| | 03:05 | In a rigid body simulation any
objects that have been set as dynamic rigid
| | 03:10 | bodies will be subject to the laws
of gravity, motion, and collision,
| | 03:15 | meaning they will start to react in
a fairly random manner as soon as a
| | 03:19 | simulation is enabled--
| | 03:20 | unless, that is, we
introduce constraints into the mix.
| | 03:25 | With our constraint tools, we can start
to craft very specific behaviors from
| | 03:30 | dynamic objects, creating complex
motions and interactions that would be
| | 03:35 | otherwise impossible to achieve.
| | Collapse this transcript |
|
|
2. The MassFX ApproachA look at the MassFX and the 3ds Max user interfaces| 00:00 | As with all feature sets in 3ds Max,
understanding how to locate and work with
| | 00:06 | the various user interface elements
that make up our MassFX toolset is going to
| | 00:11 | be a critical factor with regard to our
ability to work quickly, efficiently, and
| | 00:15 | to a high standard in our MassFX simulations.
| | 00:19 | In this video we are going to take a
few minutes to become familiar with the
| | 00:23 | variety of ways that we can access
MassFX tools inside the 3ds Max UI.
| | 00:28 | The first interface element that we want
to take a look at is the MassFX toolbar.
| | 00:32 | By default, this toolbar may be
turned off in 3ds Max and 3ds Max Design,
| | 00:37 | so our first goal will be to make it visible.
| | 00:40 | We can do this by coming up to the main
toolbar at the top of the 3ds Max user
| | 00:45 | interface and then in an empty area of the
toolbar--so not on the bottom or the UI element--
| | 00:51 | we want to right-mouse-click and then select
the MassFX toolbar option from the dropdown list.
| | 00:57 | This brings up a floating toolbar that we
can now dock anyplace in the user interface.
| | 01:02 | We can go to the top, bottom, left, or right.
| | 01:06 | I am just going to place
it here underneath the main toolbar.
| | 01:10 | From this toolbar we can perform a
number of important tasks, such as setting up
| | 01:16 | scene geometry as rigid body or mCloth
objects, we can set up Constraints and
| | 01:22 | Ragdolls, as well as run, step
through, and reset our simulations.
| | 01:27 | You will notice that a number of icons
on the toolbar have a little downward-
| | 01:31 | pointing triangle in the lower-right
corner. As it does elsewhere in the 3ds Max UI,
| | 01:36 | this denotes a flyout as opposed
to just a single clickable button.
| | 01:41 | This will appear if we
left-mouse-click and hold.
| | 01:46 | The very first button found on the
MassFX toolbar can itself be used to access
| | 01:51 | a much more extensive and
much deeper set of MassFX tools.
| | 01:55 | If we simply left-mouse-click on the
button, you'll see that we launched the
| | 01:59 | MassFX Tools dialog.
| | 02:01 | This, as with the MassFX toolbar, comes
up as a floating window that, again, can
| | 02:06 | easily be docked in the 3ds Max UI.
| | 02:09 | The difference here is that we have to
keep this dialog in a vertical alignment.
| | 02:14 | So unlike the toolbox, we can only dock to
the right or left of the user interface.
| | 02:19 | In the Tools dialog, as you can see, we
have four tabs, each housing controls that
| | 02:24 | govern particular
aspects of a MassFX simulation.
| | 02:28 | Just note the name of each
tab as I hover over them.
| | 02:31 | Because if I just close this dialog for
a second and then go back to the MassFX
| | 02:36 | toolbar, you'll see, if we access the
flyout, that we actually have the ability
| | 02:40 | to open the Tools dialog
straight to any one of those four tabs.
| | 02:45 | Our first tab, World Parameters,
provides a number of important global settings
| | 02:51 | and controls that will affect all
objects inside the MassFX simulation.
| | 02:56 | The Simulation tools tab houses
options and buttons that not only control
| | 03:00 | the simulations themselves, but that
also provide access to utilities such as
| | 03:05 | the MassFX Explorer.
| | 03:07 | The MassFX Explorer itself is an
interface element that gives us the ability to
| | 03:13 | quickly review and, in a limited and yet
still extremely useful way, edit MassFX
| | 03:19 | elements in our scenes.
| | 03:20 | The Multi-Object Editor tab lets us
specify local dynamic settings for objects--
| | 03:28 | that is, rigid bodies and
constraints--found in the simulation.
| | 03:32 | The main difference between editing
here and over in the Modify panel is that
| | 03:37 | the Multi-Object Editor lets us
set properties for a group of selected
| | 03:41 | objects simultaneously, regardless of whether
or not we are working with Instance modifiers.
| | 03:47 | Whereas over in the Modify panel, we
only get to work on a single object's
| | 03:52 | properties at a time, unless of course
we are working with Instance modifiers.
| | 03:57 | Now do note that although we can alter
the settings for any number of selected
| | 04:01 | rigid bodies or constraints in the
Multi-Object Editor, we cannot edit both
| | 04:06 | object types at the same time.
| | 04:08 | If a selection consists of different
types of objects or even no objects at all,
| | 04:14 | then an appropriate message will
appear in the Multi-Object Editor panel.
| | 04:19 | The Display options tab includes
controls for toggling viewport display
| | 04:23 | of physical meshes, as well as for
enabling and working with the MassFX Visualizer.
| | 04:28 | This is a very powerful tool that can
help us visually debug our simulations.
| | 04:34 | In fact, this particular tool is one we
would do well to develop a habit of using
| | 04:38 | each time we set up and work
with a new simulation scene.
| | 04:42 | As always, the 3ds Max menu system
found at the top of the user interface
| | 04:47 | provides an alternative method for
accessing tools available when working
| | 04:51 | with the MassFX system.
| | 04:53 | To get to these we need to go come
up to our Animation menu, down to the
| | 04:57 | Simulation - MassFX section, and then
as you can see from the flyouts, we gain
| | 05:02 | access to a wide range off MassFX tools.
| | 05:06 | Alternatively, if we just need to
quickly access some of the more commonly used
| | 05:11 | tools when working with our MassFX
simulations then 3ds Max's Quad menu system
| | 05:16 | could be a great help to us.
| | 05:19 | To access a MassFX-specific Quad menu
set, all we need to do is hold down the
| | 05:24 | Shift and Alt modifier keys on the
keyboard whilst right-clicking anywhere in
| | 05:29 | the 3ds Max viewport.
| | 05:31 | Clearly then, as with all major tool
sets, 3ds Max gives us plenty of options
| | 05:36 | when it comes to
accessing and working with MassFX.
| | 05:39 | So now that we are somewhat familiar
with the user interface elements, let's move
| | 05:44 | on to understanding the actual workflow,
or steps involved in creating a
| | 05:48 | MassFX simulation in 3ds Max.
| | Collapse this transcript |
| Exploring the MassFX workflow| 00:00 | For anyone accustomed to the workflow
of 3ds Max's previous dynamic simulation
| | 00:05 | tool Reactor, which of course has been
replaced by MassFX since 3ds Max 2012,
| | 00:11 | working with MassFX may seem a little
odd at first, as the workflows are quite
| | 00:16 | different in a number of respects.
| | 00:18 | The first big difference is that
everything in our simulation now takes place, or
| | 00:23 | is viewable, inside the 3ds Max viewport
rather than in a dedicated viewer window,
| | 00:28 | as was the case with reactor.
| | 00:31 | This could create a little initial
confusion as, with our MassFX toolbar
| | 00:36 | enabled, we now have two sets of
controls in the 3ds Max interface that use
| | 00:40 | standard VCR-type button icons.
| | 00:44 | One set of course can be found on the
MassFX toolbar itself; the other would be
| | 00:48 | our standard 3ds Max Animation
Playback controls, found in the bottom-right
| | 00:53 | corner off the Max UI.
| | 00:55 | Of course we can easily dispel any
confusion by taking a look at a simple
| | 01:00 | demonstration scene designed to
show us the difference between the two.
| | 01:03 | As you can see, we have a sphere set up
as a MassFX rigid body object ready to be
| | 01:09 | simulated and we have a keyframe
animated object in the form of a teapot.
| | 01:14 | Now, if we come down and use the play
button on our animation controls, we see the
| | 01:20 | motion of playback of our
animated teapot in the viewport.
| | 01:23 | Notice though, that
nothing happens to our sphere.
| | 01:27 | This is exactly the behavior we would
expect, as only the teapot object in the
| | 01:31 | scene has been animated and is
therefore the only object controlled by the
| | 01:36 | Animation Playback options.
| | 01:38 | In contrast, if we come up and use the
Start Simulation control on our MassFX
| | 01:43 | toolbar, by default we will now see both
the animated teapot and the stimulated
| | 01:49 | sphere reacting or moving in the scene.
| | 01:52 | Just as a side note, you will notice
throughout this course that I will refer to
| | 01:56 | this particular button on the MassFX
toolbar as the Start Simulation control
| | 02:02 | rather than calling it a play button.
| | 02:03 | Now, whilst this is not a hugely
important point to get stuck on, the difference
| | 02:08 | in this choice of words is deliberate.
| | 02:11 | Hopefully, it will help reinforce in
our minds the difference regarding
| | 02:15 | animation playback and the running
of a live simulation in the viewport.
| | 02:20 | Going back to our scene, the cool thing
here of course with this default behavior
| | 02:25 | is that we can quickly and easily
create very precise interaction between
| | 02:30 | animated and dynamic
objects live in the viewport.
| | 02:34 | Of course we can, if we need to, modify
this default behavior in our start button
| | 02:40 | a little. If you will closely, you
will notice that it is indeed a flyout.
| | 02:44 | And if we click and hold, you can
see we have two options available.
| | 02:49 | One is Start Simulation. The other
Start Simulation Without Animation.
| | 02:55 | If we choose the second option, as you
might expect, the sphere simulates and
| | 03:01 | drops to the floor, but we
get no motion from our teapot.
| | 03:05 | This of course means we could focus
our attention on just the simulated
| | 03:09 | objects in the scene without any
potentially distracting keyframe-animated
| | 03:13 | objects moving around.
| | 03:15 | One thing we do need to remember is
that animation will only play for the
| | 03:19 | duration set in our animation
timeline options, whist of course our MassFX
| | 03:24 | simulation because it is running live
in the viewport, will continue to run and
| | 03:29 | simulate even after timeline playback has ended.
| | 03:32 | We will need to click the MassFX start button
a second time to specifically end a simulation.
| | 03:39 | To have our simulation stop
automatically once the timeline limit has been
| | 03:43 | reached, we can come into the
Simulation tools top of our MassFX tools dialog,
| | 03:48 | come to the Simulation Settings rollout,
and set the required behavior using this
| | 03:53 | On Last Frame option.
| | 03:55 | Another big difference between MassFX
and the old Reactor tools comes in the way
| | 04:00 | that objects are added to a simulation.
| | 04:03 | In Reactor, geometry had to be add into
very specific collections such as rigid
| | 04:08 | body collection, a cloth collection,
a rope collection, and so on before the
| | 04:12 | simulation could be run.
| | 04:14 | In MassFX things are much simpler.
| | 04:17 | If I just select our rigid body sphere
and come over to the Command panel in
| | 04:21 | the Modify tab, you can see the only thing
applied to sphere is a MassFX rigid body modifier.
| | 04:28 | This modifier houses all of the local
parameters that will determine how this
| | 04:33 | object behaves inside a simulation.
| | 04:36 | With the modifier applied, as soon as
we start a simulation from the MassFX
| | 04:40 | toolbar, everything works as it should.
| | 04:43 | Of course if we were working with soft
bodies rather than rigid bodies, we would
| | 04:47 | simply add the mCloth modifier as
opposed to a rigid body modifier.
| | 04:52 | Unlike Reactor then, working with
MassFX tools settings inside 3ds Max is a
| | 04:56 | streamlined process that
is very easy to work with.
| | 04:59 | The neat thing here is that rigid and
soft body objects can not only exist
| | 05:04 | inside the same simulation, but as
MassFX is a unified dynamics framework, they
| | 05:10 | have no problem at all
interacting with each other.
| | Collapse this transcript |
| Discovering ground collision and gravity| 00:00 | When working with a complex system
such as the MassFX simulation tools inside
| | 00:05 | 3ds Max, we have to remember that
there will always be a number of global
| | 00:09 | controls that exercise a great deal of
influence over how the system is working.
| | 00:13 | In MassFX these options will impact
speed, accuracy, and so ultimately the final
| | 00:18 | quality of our finished dynamics simulations.
| | 00:22 | As these options can be found inside
the MassFX Tools dialog, let's once again
| | 00:26 | enable that option from our MassFX
toolbar and then just the dock it to the
| | 00:31 | left-hand side of the 3ds Max UI, which
is pretty much where I would keep it for the
| | 00:36 | duration of this course.
| | 00:37 | One of the first choices we will want
to make with regard to our simulation
| | 00:41 | setup is whether or not we want to
use an object from our scene as a ground
| | 00:46 | collider or can we happily work with
the MassFX Use Ground Collision option.
| | 00:51 | This automated system uses an invisible
infinite planar static rigid body as a ground object.
| | 00:58 | This is set by default at the height
of the 3ds Max home grid, which would be
| | 01:02 | 0 on the world Z axis.
| | 01:05 | As you would expect from any well-
thought-out system however, this Height
| | 01:09 | value is indeed editable.
| | 01:11 | Because this Ground Collision option is
on by default, we do need to be careful
| | 01:17 | when working with our object setup.
| | 01:19 | We need to make certain that we don't
inadvertently place dynamic objects in
| | 01:23 | a way that causes them to intersect
with, or actually sets them below, this
| | 01:28 | ground level. We can undock with
our dynamic object behaving in a most
| | 01:33 | bizarre manner if we do.
| | 01:35 | In fact, whenever a simulation behaves in
an unexpected manner, this is one of the
| | 01:39 | first problems that I check for.
| | 01:41 | Another extremely important default
option in our MassFX simulations would be
| | 01:46 | the settings we use for gravity.
| | 01:49 | By default, Gravity is both enabled
and set to Earth actually MassFX.
| | 01:54 | Now as MassFX uses negative values,
this means our Acceleration value will be
| | 02:00 | set to -9.81 m/sec square, assuming
of course meters are the units we are
| | 02:06 | currently working with.
| | 02:07 | Don't worry if they are not, because if
we just come up to our Customize menu and
| | 02:11 | come down to our Unique setting option,
| | 02:14 | if we just switch over to working with
feet and inches for a moment or two, you
| | 02:18 | will notice over in the MassFX
controls that it automatically performs the
| | 02:23 | conversion for us; we don't need to
really worry about that at all.
| | 02:27 | Let's just go and set this
back to working with meters.
| | 02:32 | These gravity defaults mean that in
most simulation--that is, ones that require
| | 02:37 | real-world gravity settings--we really
don't need to perform any kind of setup
| | 02:40 | at all, as everything is ready
to go out of the box, as it were.
| | 02:44 | However, if our particular
simulation requires something other than
| | 02:48 | physically accurate gravity settings,
as you can see, we do indeed have options
| | 02:53 | available that will give us control of
both the direction and strength of MassFX
| | 02:58 | gravity in the simulation.
| | 03:00 | However, if our particular simulation
requires something other than physically
| | 03:05 | accurate gravity settings, well, as
you can see, we do indeed have options
| | 03:09 | available that will give us control
over both the direction and the strength of
| | 03:13 | MassFX gravity in the simulation.
| | 03:16 | One interesting and potentially very
useful option here is the ability given us
| | 03:20 | to control our global gravity by means
of any gravity force object or space warp
| | 03:26 | that we have in our scene.
| | 03:28 | Though if we do use this option, we need
to bear in mind that the gravity force
| | 03:32 | object doesn't currently use the
same strength, scale, or settings as the
| | 03:36 | default MassFX gravity.
| | 03:39 | To get the two to correspond--or to
match, as it were--we will need to
| | 03:43 | multiply the strength of our force
object by 10 and of course use positive
| | 03:47 | rather than negative values.
| | 03:49 | So to set Earth-real gravity in
force space warp or a gravity force space
| | 03:55 | warp, we would need to set the Strength value
to 98.1 rather than 9.81, as in the MassFX gravity.
| | 04:02 | One obvious benefit of using this
particular approach is that we can apply
| | 04:08 | gravity in absolutely
any direction that we like.
| | 04:12 | All we need to do is simply rotate our
space warp object in the scene accordingly.
| | 04:17 | We could even disable gravity
altogether in our global options and apply
| | 04:22 | different gravity settings to
individual objects in the scene by using a
| | 04:26 | number of gravity force objects and
applying those at the modifier level
| | 04:30 | rather then globally.
| | 04:31 | In our next video, we will move on from
the environmental globals we have looked
| | 04:36 | at here and examine some extremely
important options that go a long way towards
| | 04:40 | governing the accuracy of our rigid
body simulations, these being the substeps
| | 04:46 | and Solver Iterations options.
| | Collapse this transcript |
| Adjusting substeps and solver iterations| 00:00 | Depending on the complexity, of and/or
the level of realism required, for our
| | 00:05 | MassFX simulations, accuracy may be
an extremely important aspect of the
| | 00:09 | simulation that we want or
need to have control over.
| | 00:13 | In this video we will consider two
global options that will have a significant
| | 00:18 | impact on the accuracy of
our rigid body simulations.
| | 00:22 | Do keep in mind that as a general
rule, to increase the accuracy of a
| | 00:26 | simulation, the number of collision
calculations used to compute it also need to be increased.
| | 00:31 | As the computational requirements for
the calculations increase, so, too, does the
| | 00:36 | overall simulation time.
| | 00:38 | In simulations, as in rendering, cost
versus benefit will be an ongoing balancing
| | 00:43 | act that we need to look at.
| | 00:44 | We have already in this course
discussed the importance of understanding the
| | 00:48 | relationship between the animation
frame rate settings in our scene and the
| | 00:53 | number of collision calculations
taken for every second of simulation time.
| | 00:58 | If, as is the case in the scene, we are
working with a frames-per-second setting
| | 01:02 | of 24, MassFX will take 24 collision
calculations, or steps, per second itself.
| | 01:10 | If however, we were to increase the
substep value in our MassFX Tools dialog
| | 01:15 | up to 1, well, MassFX would now make
48 collision calculations per second
| | 01:21 | instead of the original 24.
| | 01:24 | The result of the increased computation
is of course a more accurate simulation.
| | 01:29 | This increase in both the number of
calculations per second and simulation
| | 01:33 | accuracy continues as we add more
subframe sampling, or substeps, to the process.
| | 01:40 | No,w our natural inclination given these
facts might be to start our simulations
| | 01:45 | with a high substep value.
| | 01:48 | This, however, would be a mistake for two reasons.
| | 01:51 | Firstly, as we have mentioned,
the cost of increased accuracy is
| | 01:54 | increased simulation time.
| | 01:56 | In a production environment, this
would also equate to increased cost, which
| | 02:01 | obviously is bad for everyone
expect maybe our electricity provider.
| | 02:05 | The second reason is that a more
accurate simulation does not always mean
| | 02:10 | a better-looking one.
| | 02:11 | We need to remember that as technical
artists our goal is to produce a simulation
| | 02:16 | that fits the needs off our current
project, one that looks good, not a
| | 02:21 | simulation that is more mathematically correct.
| | 02:25 | If it fits the bill using only a
limited number, of or maybe even no sub steps
| | 02:30 | at all, then we should be happy about
that and move on to the next task at hand.
| | 02:34 | Another global setting that can improve
the final quality or final accuracy of
| | 02:40 | our simulations is this Solver
Iterations values. Rather than affecting the
| | 02:45 | dynamic rigid bodies themselves, this
option controls the number of times a
| | 02:50 | constraint solver enforces
collisions in constraints during a simulation.
| | 02:56 | In some instances higher values than
default may be necessary, such as when a
| | 03:00 | simulation is making use of a
large number of constraints, or when the
| | 03:06 | tolerance for joint errors needs to be
very low, such as may be the case when
| | 03:11 | working with a ragdoll.
| | 03:12 | Again just to be clear: this value
works on constraints in the simulation not
| | 03:18 | the dynamic rigid bodies themselves, as
has sometimes erroneously been stated.
| | 03:23 | In our next video, we are going to
give consideration to a third option that
| | 03:27 | can help with accuracy in rigid body
simulations, this being the Generate Shape
| | 03:32 | Per Element control.
| | 03:33 | We will also look at an extremely
useful tool with which we can visually debug
| | 03:38 | our simulations--this being the
aptly named MassFX Visualizer.
| | Collapse this transcript |
| Using the Multi-Editor and the MassFX Visualizer| 00:00 | Having taken a look at substeps and
Solver Iterations already, the final
| | 00:05 | accuracy option that we want to take a
look at for now is this Generate Shape
| | 00:09 | Per Element checkbox.
| | 00:11 | This option, when on, lets us create a
separate physical shape for each element
| | 00:16 | in a geometric object--
| | 00:17 | that is, once we apply a
MassFX rigid body modifier to it.
| | 00:21 | When off, as it is by default, MassFX creates a
single physical shape for the entire object.
| | 00:28 | This option obviously is likely to be
less accurate, but it can stimulate faster,
| | 00:33 | hence it being the default.
| | 00:35 | To demonstrate how to Generate Shape
Per Element option works, let's again make
| | 00:39 | use of our old friend the
3ds Max teapot primitive.
| | 00:41 | Now, this particular object, as you
may know, consists of four elements.
| | 00:47 | If we just select a teapot, right-click,
and Convert to Editable Poly, we can enter
| | 00:52 | subobject element mode.
| | 00:54 | Now, as we click through our geometry,
you can see it consist of a body element,
| | 00:59 | a handle, a spout, and a lid. Four elements in total.
| | 01:04 | With that established, let's just come
out of subobject mode and apply now a
| | 01:09 | MassFX rigid body modifier.
| | 01:10 | As stated, by default we get a single
physical mesh that unfortunately leaves
| | 01:16 | quite a number of concave
areas on the object blocked.
| | 01:20 | Clearly, objects would not be able to
pass through out of this handle area, nor
| | 01:24 | over here or by the spout.
| | 01:27 | Naturally, these blockages could lead
to a potentially inaccurate simulation.
| | 01:32 | If, however, we now and able the Generate
Shape Per Element option and again apply
| | 01:37 | a rigid body modifier, well, this time
to our second teapot, you can see that
| | 01:42 | whilst we do still how some blocked-off
concave areas such as the inside of the
| | 01:48 | handle, we can nevertheless see that the
physical shape, or rather shapes, now conform
| | 01:53 | much more closely to the
actual or graphical mesh of to teapot,
| | 01:58 | particularly over by the spout area.
| | 02:01 | This naturally will give us a higher
level of accuracy in our simulations.
| | 02:06 | We just need to note that this switch
or checkbox applies only to subsequently
| | 02:10 | created rigid bodies. We cannot switch
this on and expect existing rigid bodies
| | 02:15 | to switch over to a shape-per-element mode.
| | 02:18 | That isn't how it works.
| | 02:20 | The other option we want to look at
here is found in the Display options tab
| | 02:24 | of the Tools dialog,
| | 02:25 | this being the MassFX Visualizer.
Its function is to help us as technical
| | 02:30 | artists visually debug what is
going on at any given moment inside a
| | 02:36 | dynamic simulation.
| | 02:37 | Essentially, we can use this set of
tools to display various properties or
| | 02:42 | aspects of a rigid body behavior
inside a simulation as it is in process.
| | 02:48 | If the simulation results we are
getting are in some way unexpected, being able
| | 02:52 | to see these nonrendering real-time
indicators could possibly help us determine
| | 02:58 | what might need to be adjusted
in order to remedy said problem.
| | 03:01 | To see it in action, let's just first of
all reposition our teapots in the scene.
| | 03:06 | We just want to give them the
opportunity to collide a little.
| | 03:09 | Let's just raise them up so
they have got a little more height.
| | 03:12 | And of course we do want to turn on
most of our Visualizer options. Clearly
| | 03:17 | there is no point turning joint
options on at this moment any time because we
| | 03:20 | have no joints in the
simulation with which to work.
| | 03:23 | Now, if we run the simulation,
you can see the MassFX Visualizer at work.
| | 03:28 | What we are seeing here of course is a
very simple set of readouts that really
| | 03:34 | are not giving those much more
information than we could already discern just
| | 03:38 | by watching the objects as they are simulated.
| | 03:41 | However, imagine a situation where
dozens, maybe even hundreds, of objects are
| | 03:46 | taking part in the simulation.
Being able, as we can, to step frame by frame
| | 03:51 | through the simulation and get
visual feedback on what each object in the
| | 03:55 | simulation is doing,
| | 03:56 | well, I am sure you will agree that that
could be a very powerful aid to finding
| | 04:01 | and fixing any problems that may be occurring.
| | 04:05 | Though by no means a look at all of
the global options available in MassFX,
| | 04:10 | hopefully the videos we've looked at up
to this point in our chapter have shown
| | 04:14 | that there are controls inside the
system that can and will have a significant
| | 04:18 | impact on the speed and
quality of our finished simulations.
| | 04:22 | Besides continuing to work with and
gain a deeper understanding of the ones
| | 04:27 | we have looked at here, I would
strongly recommend that you become familiar
| | 04:30 | with all of the global controls that
can be found inside the MassFX Tools
| | 04:35 | dialog, as all of them have the
potential to impact significantly on the
| | 04:39 | quality of our finished work.
| | Collapse this transcript |
|
|
3. Working with Rigid BodiesBreaking down the shot| 00:00 | As with all aspects of CG work, the
effort we put into the preproduction and
| | 00:05 | planning stages of a simulation
projects can either make or break the shot or
| | 00:09 | shots that we're working on.
| | 00:10 | Ideally, once we receive the scene
with which we will be working--be that the
| | 00:15 | final version or indeed a low-res stand-
in--we will want to examine the script or
| | 00:19 | brief and the scene itself so as to
determine what simulation effects are going
| | 00:24 | to be required or maybe even possible.
| | 00:26 | During this part of the process it
would probably be a good idea for us to be
| | 00:30 | making as many notes as possible,
| | 00:32 | including of course noting down some
ideas regarding the tools we could possibly
| | 00:36 | use to accomplish the desired end result.
| | 00:40 | In our case, as you can see, we have a
fairly well-developed version of a scene
| | 00:44 | that could easily be brought
up to final render standard.
| | 00:47 | So we're in fact ready now to plan out,
maybe even start to previz, the specific
| | 00:53 | effects required for our shot.
| | 00:54 | Let's imagine the premise here is that
our biped customer has come to watch our
| | 00:58 | ball launchers knock down the stacks of cans.
| | 01:01 | What we need to do now is figure out
which objects in the scene will need to be
| | 01:05 | a part of the simulation,
| | 01:07 | so we'll need rigid body modifiers
adding to them, as well as perhaps noting down
| | 01:11 | which rigid body type we think
will work best in each instance.
| | 01:16 | The first thing we want to do is just hit
the C key on our keyboard to bring up our
| | 01:21 | Select Camera dialog.
| | 01:23 | Once we have that, we can switch over
to our Launches camera for a closer view
| | 01:26 | of the launcher geometry.
| | 01:28 | Now, if I just press play down in our
animation controls, you can see we have a
| | 01:34 | very simple animation on the launcher geometry.
| | 01:37 | The idea is that these animated discs
will propel each of the colored spheres
| | 01:42 | out of the launcher tubes, across the open
space, and into our waiting stacks of cans.
| | 01:48 | With an understanding of what is
required then, it seems pretty clear that our
| | 01:52 | animated discs, the spheres in the
holding rack, the holding rack itself, and of
| | 01:58 | course the launcher geometry will all
need to be a part of the simulation,
| | 02:02 | so we'll need rigid body
modifiers applying to them.
| | 02:06 | Which rigid body type should we use?
| | 02:08 | Well, as our launcher tubes really
only need to hold our shoot or cannonballs
| | 02:13 | before they're launched, we can safely
assume that these really only need to be
| | 02:16 | set up as static rigid bodies.
| | 02:18 | As noted in chapter 1, static rigid
bodies can have dynamic objects such as
| | 02:23 | our spheres bump into and bounce off
them, but the static rigid body itself
| | 02:27 | won't react in any way.
| | 02:29 | That makes it perfect for what we need here.
| | 02:32 | In fact, the static rigid body type could
also be used for our holding racks as well,
| | 02:37 | so let's makes a note of those facts.
| | 02:40 | The balls or sphere themselves of
course are going to be doing the both of the
| | 02:44 | interesting work inside the simulation,
as they're going to be launched into the
| | 02:47 | air and hopefully collide
with our stacks of cans.
| | 02:51 | This means they really will need to be set
up as dynamic objects within the simulation--
| | 02:55 | that is, ones they can collide with and
affect and be affected by other dynamic
| | 03:00 | rigid bodies in the scene.
| | 03:02 | We also have the animated discs.
| | 03:03 | Now the fact that these are animated
pieces of geometry means we only really
| | 03:07 | have one rigid body choice available
to us, which would be to set these up as
| | 03:12 | kinematic rigid bodies.
| | 03:13 | This means they will be able to
interact with and affect the dynamic objects in
| | 03:17 | the simulation, but without actually
being affected in any way themselves.
| | 03:21 | Of course, we will also need to
devise some method for dropping each of the
| | 03:25 | balls into the launcher tubes.
| | 03:28 | Probably the best thing here would be
to use a feature of the kinematic rigid
| | 03:32 | body type that allows us to specify
a frame in the animation at which a
| | 03:36 | kinematic rigid body becomes a dynamic one.
| | 03:39 | This would mean we could very
specifically time each of the ball drops into
| | 03:43 | the launcher tubes.
| | 03:45 | So with our launcher assemblies taken
care of, let's once again use the C keyboard
| | 03:49 | shortcut and bring up over Select
Camera dialog, and this time we'll choose
| | 03:53 | Target camera option.
| | 03:55 | From here we can get a good view of
where our launched objects are our launched
| | 03:59 | phase will be traveling to in the scene.
| | 04:02 | As we want our balls to collide with
and knock our stacks of cans over and
| | 04:07 | because of course we want the cans to
interact with one another, it doesn't take
| | 04:11 | much to work out that once again we'll
need to make use of the dynamic rigid
| | 04:15 | body type for our can stacks.
| | 04:17 | Once the cans have been knocked down
of course we'll want those and the launch
| | 04:22 | spheres to collide with the shelves,
the concession stand body itself, and
| | 04:26 | probably even a ground object.
| | 04:27 | So once again, making use off the static
rigid body option would seem sensible.
| | 04:33 | Having taken then the time to figure out
what we need in terms of setup so as to
| | 04:37 | create the desired simulation effects
in our shot, we are ready to move on in
| | 04:42 | our next video to setting up or
applying the rigid body modifier to our
| | 04:45 | geometry and then setting up some of
the basic parameters that our simulation
| | 04:50 | objects will need.
| | Collapse this transcript |
| Setting up the launchers| 00:00 | Having already spend some time
reconnoitering our scene, determining which
| | 00:04 | modifiers need applying to our
geometry, it's time now to get into the
| | 00:09 | nitty-gritty of applying MassFX
modifiers and then setting up their basic
| | 00:13 | parameters so as to get our what
simulation moving in the right direction.
| | 00:17 | Once again I'm going to
switch to our Launcher camera.
| | 00:20 | I'm going to do this by using the C
keyword shortcut and then selecting that
| | 00:24 | particular camera from the list.
| | 00:26 | This really puts us in a good
position from which we can select most of the
| | 00:31 | required pieces of geometry for the
simulation of the launchers themselves.
| | 00:35 | Now just checking the notes we've made,
I'm thinking the launcher tubes would
| | 00:39 | probably make a good place to start.
| | 00:42 | As these can be selected without
orbiting the view, I'm just going to left-
| | 00:46 | mouse-click to select the first in line
and then holding down the Ctrl key, I'm
| | 00:49 | just going to click to add
the other three to my selection.
| | 00:54 | If you remember, we noted that as the
launchers are going to be just static
| | 00:58 | pieces of geometry in the scene, and
because the graphical meshes we see
| | 01:02 | here are clearly concave or hollowed,
the static rigid body type is going to
| | 01:07 | be perfect for them.
| | 01:08 | Now, there are a few ways that we could
go about adding the static rigid body
| | 01:13 | modifiers to our geometry.
| | 01:15 | We could, for instance, come up to the
Animation menu, come down to Simulation
| | 01:20 | MassFX, into Rigid Bodies, and then
choose Set Selected as Static Rigid Bodies.
| | 01:26 | We could also add the modifiers from
the Modifier List itself in the Command
| | 01:33 | panel, or we could use the MassFX tool
bar and add then from the rigid bodies
| | 01:39 | flyout, choosing the Static option.
| | 01:43 | In this particular case we can
actually save a little processing power in the
| | 01:48 | scene by using the same, or an instance,
modifier on each version of the launcher tubes.
| | 01:54 | In order to do this, we do need to add
the modifiers from the Modifier List
| | 01:59 | in the Command panel.
| | 02:00 | Any of the other methods mentioned will apply
a unique modifier to each piece of geometry.
| | 02:06 | So let's do just that.
| | 02:08 | With our launcher tube selected, we can
come over into the Command panel, make
| | 02:12 | certain we are in the Modify tab, and
then from the dropdown Modifier List, we
| | 02:17 | just need to scroll until we find the
MassFX RBody modifier and then click to apply it.
| | 02:22 | With that done, as you can see, if I
just select each of the launcher tubes in
| | 02:28 | turn, you can see the modifier has been
added to the top of the stack and also
| | 02:33 | the name of the modifier appears italicized.
| | 02:36 | This is 3ds Max's way of letting us
know that this is an instanced modifier.
| | 02:42 | As we need to set a rigid body type, we
do of course want to reselect each of our
| | 02:47 | launcher tubes. And then either in the
modify stack itself or we could use the
| | 02:52 | Multi-Object Editor in the MassFX tool
dialog, we need to just come into the
| | 02:57 | Rigid Body Property rollout and
set our Rigid Body Type to be Static.
| | 03:04 | We do also need to scroll down a little
way to the Physical Shapes rollout and
| | 03:08 | set our physical mesh type to be concave.
| | 03:12 | As we've already determined that
we're going to be adding the same modify
| | 03:15 | type to our holding racks, now would probably be a
good time to follow through on that procedure.
| | 03:21 | So again, holding down the Ctrl key,
let's select each of our holding rack
| | 03:26 | geometries, and then from the Modifier
List in the Command panel we can again add
| | 03:31 | the MassFX Rigid Body modifier.
| | 03:35 | The Rigid Body Type of course needs to
be set to Static, and we do want to set
| | 03:40 | our Physical Shape type to be Concave.
| | 03:46 | So with our launcher tubes and holding
racks taken care of, let's, in our next
| | 03:51 | video, move on to setting up the rest of
our launcher assembly, including setting
| | 03:56 | up a timed drop system for our spheres.
| | Collapse this transcript |
| Setting up the drop system| 00:00 | With the static rigid bodies on the
launcher assembly taking care of, we need
| | 00:04 | to work now with the nonstatic, or
moving, pieces of geometry in our simulation.
| | 00:10 | So let's first of all set up the
rigid body modifiers for our spheres.
| | 00:15 | Because we may well want to tweak the
properties for each ball individually
| | 00:18 | throughout the simulation, we really
need this time to add unique modifiers to
| | 00:23 | each of the geometry pieces.
| | 00:25 | Remember, according to our notes, we do
need to initially set these objects up as
| | 00:29 | kinematic rigid bodies.
| | 00:31 | To add the modifiers, because these are
not instanced objects, we will need all
| | 00:35 | of the spheres to be selected.
| | 00:37 | So let's hold down the Ctrl key and
then, using the left mouse button, we can
| | 00:41 | click to select each of them.
| | 00:44 | With the selection made, we can use
yet another option available for applying
| | 00:48 | rigid body modifiers:
| | 00:49 | this would be 3ds Max's Quad menu system.
| | 00:52 | To access a MassFX-specific set of
quad menus, we need to hold down the Shift
| | 00:57 | and Alt modifier keys and then
right-click anywhere in the viewport.
| | 01:02 | Then, from the pop-up quad menu, we can
select the Convert to Kinematic Rigid Body
| | 01:06 | option to apply our
kinematic rigid body modifiers.
| | 01:10 | Of course as each sphere now has a
unique modifier applied, with the object
| | 01:14 | still selecting, we have no access to the
modifier parameters inside the Command panel.
| | 01:20 | We can, however, still edit them all in
one go, as it were, by making use of the
| | 01:25 | Multi-Object Editor pane
in the MassFX Tools dialog.
| | 01:28 | From here, the first thing we will want
to do, down in the Physical Mesh rollout,
| | 01:33 | is set the Physical Mesh type to Sphere.
| | 01:36 | Setting this will really help MassFX
perform optimized collision detection on of
| | 01:41 | course spherical shapes.
| | 01:42 | With that done, we now need to create
the time drops for each of the spheres
| | 01:46 | into the launcher tubes.
| | 01:48 | This means we need to set them up so
that they switch over from kinematic to
| | 01:53 | dynamic rigid bodies at some very
specific points in the simulation.
| | 01:58 | To do that, let's select the ball at
the head of each queue, as these of course
| | 02:02 | will be the first ones needing to drop
into the launcher tubes, and then in the
| | 02:06 | Multi-Object Editor, in the Rigid Body
Properties rollout at the top, we can
| | 02:10 | check this Until Frame option.
| | 02:13 | In this instance setting a value
of 8 should work very nicely for us.
| | 02:17 | Of course if you are working through a
simulation of your own, you will need to
| | 02:21 | set this value to suit.
| | 02:23 | The idea here is that when we run
the simulation, our objects should sit
| | 02:28 | perfectly still until frame eight--at
which point, they will switch over to
| | 02:33 | dynamic rigid bodies and hopefully drop
nicely into the waiting launcher tubes.
| | 02:38 | We will of course need to repeat this
process for each of the spheres, setting
| | 02:42 | the appropriate Until Frame value
according to its place in the queue.
| | 02:46 | So let's select each of the second
in-line objects--again using Ctrl and
| | 02:51 | left-mouse click--and then we can
set that Until Frame values to 40.
| | 02:56 | These values of course have been set
up to coincide with the timing of the
| | 03:01 | animated push discs.
| | 03:02 | We can repeat the process for the
third objects in line, this time setting an
| | 03:08 | Until Frame value of 85, and finally, for the
fourth in line, an Until Frame value of 120.
| | 03:17 | The last piece of setup we need to
perform on our launcher assemblies would be
| | 03:21 | to include the animated
push discs in the simulation.
| | 03:25 | These of course will need kinematic
rigid body modifier types applying to them.
| | 03:29 | Okay, as these are not instanced pieces
of geometry, we will need to select them
| | 03:33 | all before we can apply the modifiers.
| | 03:36 | To get ourselves into a good position
to be able to do that--select them, that is--
| | 03:39 | let's hit the P key and switch our
camera view over to a perspective view, then
| | 03:43 | we can select our countertop and use
the orbit selected option found in the
| | 03:48 | bottom right of the user interface to
just swing around to a more frontal view.
| | 03:52 | Now we can use Ctrl and left-mouse-
click to select each of the discs, and
| | 03:59 | then using the modifier list in the
command panel, we can apply a MassFX
| | 04:03 | rigid body modifier.
| | 04:05 | As before, all of the discs now
receive an instanced modifier.
| | 04:10 | This of course means we can access the
modifier parameters here in the Command panel.
| | 04:14 | So let's very quickly set our
Rigid Body Type to Kinematic.
| | 04:18 | Now that we have the launcher assembly,
or projectile system, taken care of, in
| | 04:22 | our next video we need to move on to
single up the target objects for the
| | 04:26 | simulation, which of course
would be our stacks of cans.
| | Collapse this transcript |
| Prepping the cans| 00:00 | With the launcher assemblies taken care
of, it's time now to look at setting up
| | 00:03 | the target objects for our simulation--
that is, our stacks of cans.
| | 00:07 | Essentially, we need to get
them ready to be knocked down.
| | 00:10 | To do this let's hit the C key on the
keyboard and in the Select Camera dialog
| | 00:15 | we want to switch over to our Targets camera.
| | 00:17 | Now, according to my notes, as well as
adding modifier to our cans, we need to set
| | 00:22 | up our stand and shelf objects as a
static rigid bodies--of course so that the cans
| | 00:27 | can collide with them once they're knocked over.
| | 00:29 | As this should be a fairly simple task,
let's tackle these static rigid bodies first.
| | 00:33 | To add the required object to a
selection I'm just going to hold down the Ctrl
| | 00:37 | key and then click on the stand itself,
our backdrop object, and then each of
| | 00:42 | the shelves in turn.
| | 00:44 | If we want to be certain that we have
selected the relevant objects here, we
| | 00:48 | can quickly use the F3 key to switch
over to a wireframe view, do a quick check,
| | 00:52 | and then F3 to toggle us back to realistic mode.
| | 00:55 | With that done, we can come up to the
MassFX toolbar and apply the static rigid body
| | 00:59 | modifier from the flyout.
| | 01:01 | We now have unique modifiers
applied to each object in our selection.
| | 01:05 | Now, we'll see why it's important that
these are unique as we work with our cans.
| | 01:11 | Now our can objects are not just
identical in looks, but are in fact
| | 01:16 | instanced geometry.
| | 01:17 | With any one of them selected, we can
come up to the Animation menu for instance,
| | 01:21 | drop down the list, and then from the
flyouts, find the MassFX Dynamic Rigid
| | 01:26 | modifier option and then
just click to quickly apply it.
| | 01:30 | Because the geometry is instanced,
we now get a single instanced modifier
| | 01:34 | applied to all of the cans.
| | 01:37 | In this particular scenario this
workflow works perfectly for us, but it is
| | 01:41 | worth noting that had that had our
cans been unique geometry--perhaps having
| | 01:45 | different size cans in each stack, just
as our stand backdrop and shelve objects
| | 01:50 | for all different sizes--
| | 01:52 | well, in such a case adding an instance
modifier to the selection would not work well at all.
| | 01:58 | You see, whenever we apply an
instanced rigid body modifier only a single
| | 02:03 | collision mesh or physical shape is generated.
| | 02:06 | This is taken from the size and shape
of the graphical mesh that is the
| | 02:10 | first object in the
selection that the system analyzes.
| | 02:13 | The single collision mesh is then
used in all instances of the rigid body
| | 02:19 | modifier, irrespective of the actual
size and shape of the geometry the
| | 02:24 | modifier is applied to.
| | 02:26 | As you can imagine, with a variety of
object shapes and sizes in a selection,
| | 02:30 | this approach would produce a very
poor, indeed, a very inaccurate, simulation.
| | 02:34 | Well, even though it has taken us a
little while up to this point to get all
| | 02:39 | our modifiers in place, we are now actually
ready to see how our simulation is shaping up.
| | 02:45 | So let's switch to our main camera,
this time by coming up to the POV menu
| | 02:50 | label, left-mouse-clicking on it, and
choosing the Camera Main option from the
| | 02:54 | camera's flyout, and then we can come to the
MassFX toolbar and hit the Start Simulation button.
| | 03:02 | As you can see, things appear not to be
working quite as we perhaps we would want
| | 03:07 | or maybe even expect them to.
| | 03:09 | Let's just switch to our Launches
camera by pressing the C key and selecting
| | 03:13 | that option from the list.
| | 03:15 | Let's also reset the simulation so we can
take another look at just what is going on.
| | 03:20 | If we again press the Run Simulation
button from our up-close perspective now,
| | 03:25 | we can definitely see we have a number
of issues that need to be dealt with,
| | 03:29 | which is exactly what we'll do in our next video.
| | Collapse this transcript |
| Refining the simulation on the launchers| 00:00 | Unfortunately, our initial simulation
run has revealed that we have a number of
| | 00:04 | issues that need to be resolved,
| | 00:06 | not least of which is the fact that
our dynamic spheres are not only failing
| | 00:10 | to reach their targets, but they are
in fact not even being caught by, nor--it
| | 00:14 | would seem--even rolling properly
into our launcher tube geometry.
| | 00:18 | This obviously puts seriously kink
in our simulation plans, as none of the
| | 00:23 | required interaction between dynamic
objects can occur unless each step in the
| | 00:27 | process works correctly.
| | 00:29 | For this reason then, it seems sensible
to start our refinement work on getting
| | 00:33 | the spheres into the launcher tubes themselves.
| | 00:36 | To refresh our minds as to just what
is happening at the moment, let's quickly
| | 00:40 | run the simulation for a recap.
| | 00:42 | As we can see, rather rolling nicely
into the waiting launcher tubes, the first
| | 00:46 | spheres in line simply drop straight
through the holding racks themselves.
| | 00:50 | If we just select one of the holding
racks and make a quick inspection of the
| | 00:54 | static rigid body modifier's
properties, it would seem that everything is
| | 00:58 | set up as it should be.
| | 01:00 | In truth though, it actually isn't.
| | 01:03 | The mistake we've made--albeit an
honest and understandable one--is in the
| | 01:07 | physical shape option we've chosen.
| | 01:09 | Because this is obviously a concave
piece of geometry, we've set our physical
| | 01:13 | shape option to Concave, which seems to
be entirely appropriate, but it really
| | 01:18 | isn't. When dealing with static rigid
bodies that have concave graphical meshes
| | 01:24 | the option we need to use from the
dropdown list is Original, not Concave.
| | 01:29 | In fact, this particular physical shape type--
Original, that is--is only available
| | 01:34 | for static rigid bodies, which in itself gives
us a big clue as to when it ought to be used.
| | 01:39 | If we select that option, as you can see, we
have no parameters with which we need to work.
| | 01:45 | Instead, MassFX simply uses our object's
actual or graphical mesh to create the
| | 01:49 | physical shape it will use in the simulation.
| | 01:52 | Now remember, these are instanced
modifies so changing this on one launcher will
| | 01:57 | apply the same modification to all of them.
| | 01:59 | With that change made, when the run the
simulation again our spheres roll nicely
| | 02:03 | off the holding racks and drop straight
into to launcher tubes--well, almost.
| | 02:09 | If we just hit the P key to switch to
our perspective view, select our counter-
| | 02:13 | top, and then again use orbit
selected it to swing around to a front view,
| | 02:18 | if we just reset and rerun the
simulation, we could see that the launcher tubes
| | 02:24 | themselves are the next issue we need
to tackle, because at this moment in time
| | 02:28 | they are simply letting our dynamic
sphere objects pass straight through them.
| | 02:32 | The solution, you may
guess, is very straightforward.
| | 02:34 | As the launcher tubes, like the
holding racks, are set up to be static rigid
| | 02:39 | bodies, switching their physical shape over
to Original ought to sort things out nicely.
| | 02:44 | So, let's do that.
| | 02:45 | As with the holding racks, we do only
need to alter one of the modifiers here,
| | 02:49 | because we are again working with instances.
| | 02:52 | With the change made, let's run the
simulation again, just to check that things
| | 02:55 | are working as expected--
which they clearly are not.
| | 03:03 | The problem we are running into now
essentially comes down to simulation
| | 03:07 | accuracy or rather, a lack of it.
| | 03:09 | To remedy this we can come over to the
global controls found in the MassFX Tools
| | 03:13 | dialog and simply
increase our number of substeps.
| | 03:17 | I'm going to go from 0 to a value of 1.
| | 03:20 | If we run the simulation again, you can see that
| | 03:22 | that's simple change now gives us a
higher level of accuracy inside the
| | 03:26 | simulation, which of course means
that our geometry is now caught inside
| | 03:30 | the launcher tubes.
| | 03:32 | However, another problem we clearly need
to address as we look at our simulation
| | 03:36 | is the fact that our spheres are not
really launching with much gusto at all.
| | 03:40 | These would never reach that target objects.
| | 03:43 | To add a little punch to the launch
animation let's select all of the animated
| | 03:47 | discs and come down to the animation timeline.
| | 03:52 | The first thing we need to do here
is select a group of keyframes.
| | 03:55 | Now, having made the selection, if we
don't see a selection range bar, we can just
| | 03:59 | right-click, go to Configure,
and then Show Selection Range.
| | 04:05 | Now we can just speed our timing up by
scaling these keys down to around about 60%
| | 04:11 | or so of their original values.
| | 04:14 | We will need to repeat this of course for
each group of keyframes found on the timeline.
| | 04:19 | With all of those tweaks in place, if we
just take a look at the simulation now,
| | 04:24 | we can see that our launchers are
behaving in a much more expected manner.
| | 04:29 | If we do still run into some
calculation collision errors due to the fact that
| | 04:34 | we have now increased the speed of
our animated discs, we can simply go and
| | 04:38 | increase our Substep value a little more.
| | 04:40 | In fact, what I'm going to do is
increase this to a value of 6, just to ensure
| | 04:45 | that we don't get anymore collision
calculation errors for the duration of our simulation.
| | 04:49 | Up to this point then, things are
definitely shaping up slowly, but surly.
| | 04:53 | However, if we just hit the C key and
switch over to our main camera, running
| | 04:58 | the simulation from this point of view
shows that our collider objects also have
| | 05:03 | a number of issues that need to be dealt with.
| | 05:06 | This is what we will tackle in our next video.
| | Collapse this transcript |
| Refining the simulation on the colliders| 00:00 | Having run through a refining pass
on our launchers and ironed out a number of
| | 00:04 | simulation problems there,
| | 00:05 | it's time now to step through the rest
of our rigid body simulation and take
| | 00:09 | care of any further issues
that we maybe running into.
| | 00:12 | The first thing we would probably want
to do of course is run our simulation
| | 00:16 | once again, just to get a clear
idea of the issues that may exist.
| | 00:20 | If we just go into MassFX toolbar, we
can hit the Start Simulation button and as
| | 00:25 | we examine the simulation, you can see,
well, that there does appear to be quite a
| | 00:29 | number of issues that we will need to deal with.
| | 00:32 | Our stacks of cans for instance are
dropping straight through the stand,
| | 00:35 | which as a static rigid body ought to be
colliding with, or more accurately, catching them.
| | 00:41 | It is also clear that our launch
spheres are not in actual fact getting
| | 00:46 | anywhere near they cans themselves.
| | 00:48 | In fact, it looks as though they are running
into some kind of invisible force field.
| | 00:52 | Finally, if we look carefully at the
cans upon the shelves, we can see that they
| | 00:57 | too appear to be behaving
in a very odd manner indeed.
| | 01:02 | In truth, these noted behaviors are in
fact symptoms of the same basic problem.
| | 01:08 | If we just select our standard geometry
and come over to the Modifier options,
| | 01:12 | you can see, if we come down to the
Physical Shapes rollout, that we have
| | 01:16 | mistakenly left this option set to Convex
when we're clearly dealing with a concave object.
| | 01:23 | If you remember, with static rigid
bodies that have a concave graphical mesh
| | 01:28 | we need to actually switch our
collision shape over to using the Original
| | 01:32 | option, so let's do that.
| | 01:34 | Our shelves, too, if I just select one,
although having had a physical mesh type
| | 01:38 | of box automatically set, which would
seem entirely appropriate, do also need
| | 01:44 | switching over to a
different physical shape type.
| | 01:47 | In this instance Convex will work nicely for us.
| | 01:52 | Indeed, if we just run the simulation
once more, we can see that things are
| | 01:57 | definitely improved.
| | 01:58 | Whenever we run into misbehaving
dynamic rigid bodies in a simulation it is
| | 02:05 | always a good idea to check our
Physical Shape options, maybe even experiment
| | 02:10 | with them a little bit.
| | 02:11 | We still of course have a number of
other issues that we need to tackle before
| | 02:14 | we can say that we're
happy with this simulation.
| | 02:17 | In fact, what we really do need at
this point to take a close look of what is
| | 02:20 | going on with our stacks of cans.
| | 02:23 | To move in a little closer, let's hit C
key on the keyboard and switch over to
| | 02:28 | our Target CloseUp Camera.
| | 02:29 | If we now run the simulation from this
particular viewpoint, we can clearly see
| | 02:34 | that our stacks of cans are
simply collapsing of their own accord.
| | 02:38 | Now, this unwanted behavior is caused
by the initial drop that the objects are
| | 02:43 | making once the simulation starts
and the rigid bodies come under the
| | 02:47 | influence of gravity.
| | 02:49 | To solve this problem we can again
make use of some MassFX global controls.
| | 02:54 | Before we do that, however, we may
want to just correctly set the physical
| | 02:57 | properties for our cans, as this is
certainly going to help them behave in a
| | 03:01 | more realistic manner.
| | 03:03 | So let's select one of our cans
and come over to the Command panel.
| | 03:07 | In the Physical Material Properties
rollout you'll notice that the Mass
| | 03:11 | for this object has been
automatically set somewhat higher than an empty
| | 03:15 | tin can ought to be.
| | 03:17 | Really, we should have a mass of
about 75-90 gm or so applied here.
| | 03:21 | Now in MassFX, the mass values for
rigid bodies are measured in kilograms, so
| | 03:27 | for 75 grams we should
have a setting here of 0.075.
| | 03:34 | You'll notice that as I apply the
setting our object's Density value is
| | 03:38 | automatically calculated and updated for us.
| | 03:41 | We do also need to set the physical
Ss
| | 03:45 | down to Shapes rollout, you can see we
are currently using the Capsule option,
| | 03:50 | which given the shape of our geometry,
is not nearly accurate and not for what
| | 03:55 | we want to accomplish.
| | 03:56 | So let's switch this over to Convex.
| | 03:59 | If we run the simulation now, we can
see our stacks of cans do still collapse,
| | 04:04 | but they do so much less violently.
| | 04:07 | For the final part of the solution to
our collapsing stacks, we needs to work a
| | 04:12 | little bit in the MassFX Tools dialog.
| | 04:14 | In the World Parameters tab, let's
first of all copy the existing earth gravity
| | 04:19 | value to the clipboard, so let's just
select it and use Ctrl+C. Then we want to
| | 04:24 | reset this value to -0.1, so a
much reduced gravity effect.
| | 04:30 | Now we need to select all
of the cans in our stacks,
| | 04:33 | so let's open up 3ds Max's Layer
Manager and using the tools in here, we can
| | 04:37 | make certain that all of
those objects are indeed selected.
| | 04:40 | What we want to do now is run the
simulation, but this time without animation,
| | 04:45 | and we just want to do this until our
cans touch down on the stand and on one
| | 04:49 | another, and when they do, we
want to quickly stop the simulation.
| | 04:53 | Making certain that the cans remain
selected in the Simulation Tools tab of the
| | 04:57 | Tools dialog, we want to click the
Capture Transform button and set the current
| | 05:02 | location of our cans as the
starting position in the simulation.
| | 05:06 | Again, with the object still selected,
let's go into the Multi-Object Editor and
| | 05:11 | set our cans to Start Simulation in Sleep mode.
| | 05:14 | This tells our dynamic rigid bodies to
ignore everything in the simulation, such
| | 05:18 | as gravity, until another
rigid body collides with them.
| | 05:21 | Do remember of course we need to paste
the correct value for gravity back in
| | 05:26 | before we run the
simulation again, so let's do that.
| | 05:28 | Now we can switch over to our main
camera view and then again run the
| | 05:34 | simulation. And as you can see, things appear
to be working exactly as we would like them.
| | 05:40 | So with the refinement phases having
seemingly yielded good results, we need
| | 05:46 | to now check just what this simulation
will look like when it is played back at
| | 05:50 | its final render speed.
| | 05:51 | Before we can do that, however, we are
going to have to create animation keyframe
| | 05:57 | data for all of our currently simulated objects;
| | 06:00 | this means taking a look at
MassFX's Simulation Baking options.
| | Collapse this transcript |
| Baking out the simulation for rendering| 00:00 | Once we've refined a simulation to the
point where we are happy with the motion
| | 00:04 | of our simulated objects, we would
probably want--in fact, I would go as far as
| | 00:09 | to say need--to capture the simulation
as standard animation keyframe data.
| | 00:13 | This process is known in MassFX is baking.
| | 00:16 | Of course this is not just an arbitrary
step in a production pipeline. There are
| | 00:21 | a couple of very good and interconnected
reasons as to why we would want, or even
| | 00:25 | need, to run through the baking process,
possibly several times, at this point.
| | 00:30 | The overriding reason is the need to
test the quality, the look and feel of our
| | 00:35 | simulated objects in full motion, as it were.
| | 00:39 | You see, up to this point we've been
relying on the speed of our computer and its
| | 00:43 | ability to play back a live simulation
in the 3ds Max viewport in order to gauge
| | 00:48 | the motion we're getting
from our simulated objects.
| | 00:52 | The simple truth is though that not
all computers can play back a MassFX
| | 00:56 | simulation live in the viewport and
give it to us at the actual frames-per-
| | 01:01 | second setting that we
will be rendering our work at.
| | 01:04 | In our particular case, we are currently
only getting a live simulation playback
| | 01:07 | of about 13-15 frames
per second in our viewport.
| | 01:11 | This of course is quite a bit short of
the final render setting of 24 frames per
| | 01:16 | second that we're using in this scene.
| | 01:19 | This means that we're not seeing
objects in the simulation moving at
| | 01:22 | their actual speed.
| | 01:24 | At this point then, we're really only
guessing or estimating just what the final
| | 01:28 | motion could possibly look like.
| | 01:31 | Clearly, it would not be a good idea
to commit our simulation to final render,
| | 01:35 | which of course can conceivably take
days to complete, with such a level of
| | 01:39 | uncertainty hanging over
the quality of our motion.
| | 01:43 | The second reason for baking our
simulation is, well, in reality, one that
| | 01:47 | actually makes our previous point
somewhat redundant, in that we currently have
| | 01:51 | no way of rendering out our
simulation without actually baking it down to
| | 01:56 | keyframe data first.
| | 01:58 | The history-dependant nature of
dynamic simulations would mean that any
| | 02:01 | attempt to render a live simulation
could only result in a much longer render
| | 02:06 | time than necessary.
| | 02:07 | For this reason, as we say, such a thing
isn't actually possible in MassFX and 3ds Max.
| | 02:14 | All that having been said then,
let's take a very quick at the controls
| | 02:17 | available for baking out our simulation.
| | 02:19 | As with other MassFX tools, these
can't be accessed in a number of ways,
| | 02:24 | but we will just focus on the Simulation
Tools tab in our MassFX Tools dialog here.
| | 02:29 | The first option available is
entitled Bake All. When enabled this will run
| | 02:34 | through the simulation and store
transform keyframes for all dynamic objects
| | 02:39 | inside the simulation, and that would
include any mCloth objects that we have in there.
| | 02:44 | When the process is complete, dynamic
objects are converted to kinematic ones,
| | 02:48 | and an internal baked flag is applied
to them basically telling the system that
| | 02:53 | they can now be unbaked if
that is what the user chooses.
| | 02:57 | The next option, Bake Selected, is of
course pretty much the same as Bake All,
| | 03:01 | except the baking process is only
applied to selected dynamic objects.
| | 03:06 | So if we have ten dynamic rigid bodies in
our scene and we select two and apply
| | 03:11 | Bake Selected, then only those two
will have keyframe data written for them.
| | 03:15 | The final two selections, Unbake All
and Unbake Selected, do just as the name
| | 03:21 | suggests: they undo or
reverse the baking process,
| | 03:24 | again, applying it to all or
selected objects inside of the scene.
| | 03:29 | A one very nice aspect of visibility to
bake is MassFX is the fact that we can
| | 03:34 | essentially stack up
simulation effects in our scene.
| | 03:38 | So, if for example we have a rather
large and complex sequence of simulation
| | 03:43 | events, we can break them down into
smaller chucks, bake particular portions, and
| | 03:48 | yet still have those newly created
kinematic rigid bodies affect dynamic rigid
| | 03:53 | bodies that are still live
inside of the simulation.
| | 03:56 | Then result of course would be the
requirements for collision calculations
| | 04:00 | inside of the simulation would be
greatly reduced, which can of course
| | 04:05 | significantly speed up our ability to
create complex simulation scenarios.
| | 04:10 | Of course, the drawback would be that
the newly created kinematic rigid bodies
| | 04:14 | inside of the simulation could no longer
themselves be affected by dynamic rigid
| | 04:19 | bodies, and of course depending upon
the type of simulation we're working with,
| | 04:23 | that may or may not present a problem.
| | 04:26 | In our case, of course we do most
certainly want to create as much interaction
| | 04:29 | as possible in our simulation,
so we're just going to click the Bake All
| | 04:33 | function here and create keyframes for
every dynamic object in the simulation.
| | 04:39 | Once we've clicked the button, depending
on the complexity of our simulation, 3ds
| | 04:43 | Max may take quite a while
to bake our keyframes out.
| | 04:46 | Once it is done, however, if I just
select what was one of our dynamic rigid
| | 04:52 | bodies, you can see that it has
been converted, or been set now, to a
| | 04:56 | kinematic rigid body.
| | 04:58 | In fact, with the object selected, if
you just take a look down on the timeline,
| | 05:02 | you can see that we now have a
keyframe set for every frame of our animation.
| | 05:07 | In fact, if I just hit play in our
animation controls you can very plainly
| | 05:11 | see that everything in the scene is now
being controlled by keyframe or animation data.
| | 05:18 | So with the baking process complete,
we're ready in our next video to move on to,
| | 05:22 | well, really the next phase of
producing our simulation, which would be to
| | 05:26 | render out what we have, review the
motion, and make note of any changes that may
| | 05:30 | be required in order to just polish up
the simulation before we would be ready
| | 05:34 | to present it for final rendering.
| | Collapse this transcript |
| Reviewing the simulation with an animation sequence| 00:00 | Although we have now baked our
MassFX simulation down to standard 3ds Max
| | 00:04 | animation keyframes, there is still
another step we need to take before we can
| | 00:09 | be certain that we're reviewing
the motion completely accurately.
| | 00:12 | As with a live simulation, animation
playback in our 3D application's viewport is
| | 00:17 | dependent on both power and setup of
the hardware and software we're using.
| | 00:22 | For this reason, it will always be
safest if we review our motion after having
| | 00:26 | rendered out a preview animation.
| | 00:28 | In 3ds Max, this is just a fast
way of capturing animation playback
| | 00:33 | using viewport settings.
| | 00:34 | The brilliant thing here is that we
can match our final frames-per-second
| | 00:39 | output requirements without getting anywhere
near the time needed to create a final render.
| | 00:44 | Rendering out an animated sequence
file, or preview as it used to be called in
| | 00:49 | 3ds Max, is very easy in the 2013 version.
| | 00:53 | All we need to do is come up to the
Tools menu, come down to Grab Viewport, and
| | 00:59 | from the flyout, choose
Create Animated Sequence File.
| | 01:02 | Now, something worth noting here is
that along with changing the name of this
| | 01:07 | function in more recent 3ds Max versions,
this tool has also moved around in the
| | 01:11 | menu system quite a bit,
| | 01:13 | so you may need to do a little bit of
searching around before you come across
| | 01:16 | it, if you're not using 3ds Max 2013
with the subscription update as we are.
| | 01:22 | Getting back to our menu option, when
we click on this, we get a dialog that
| | 01:26 | opens up, offering a variety of options
for customizing the preview file that
| | 01:31 | we will be creating.
| | 01:32 | Again, complexity of the scene,
length of the sequence being rendered,
| | 01:36 | processing power and RAM available to
us, all of these things will need to be
| | 01:40 | weighed out carefully and will
influence the options we choose here.
| | 01:43 | In this particular instance, we're
just going to make a couple of tweaks to
| | 01:47 | the default settings.
| | 01:48 | In the Frame Rate options, we want to set
24 as our frames-per-second playback rate.
| | 01:54 | This of course matches the frames-
per-second setting for our scene.
| | 01:57 | For our Image Size, I'm just going
to leave this set at the maximum value
| | 02:01 | available to me at this moment,
which is 65% of my current 1280 x 720
| | 02:07 | render output settings.
| | 02:10 | We also have the option of choosing
the visual style we want to render in.
| | 02:14 | If we just access this dropdown, you can
see the options here correspond exactly
| | 02:18 | to the viewport styles
available to us in 3ds Max.
| | 02:21 | In fact, when we set this up,
that's what we're doing:
| | 02:24 | we're telling the Render options to use
this particular 3ds Max viewport style
| | 02:28 | to create the render in.
| | 02:30 | Realistic of course is
the highest quality setting.
| | 02:33 | That is what we're going to be using
here, but more often than not it will also
| | 02:36 | be the slowest to render,
so just keep that in mind.
| | 02:40 | In the Output area, I want to make
certain we're rendering as an AVI.
| | 02:44 | I want to set my Codec to
Microsoft Video 1, at 100% quality.
| | 02:48 | This is just a nice safe codec
to use for a preview animation.
| | 02:54 | With the options set up, we can hit the
Create button and 3ds Max will now work
| | 02:58 | away on our preview video.
| | 03:00 | One other interesting snippet of
information here is that unlike some of
| | 03:03 | earlier versions of Max, whilst a preview
animation is being created these days,
| | 03:08 | it is indeed fine for us to pull up
other application windows to work in.
| | 03:13 | In the days when Max used to essentially
just do a sequential screen grab of the viewport
| | 03:18 | this really was a big no-no, unless of
course you wanted to capture a video of
| | 03:22 | your Word document or email client.
| | 03:24 | As we say though, that
isn't a problem these days.
| | 03:28 | As soon as the preview is completed,
3ds Max will open up our AVI file in our
| | 03:33 | default media player.
| | 03:35 | What we can do now is carefully
review the motion that we've created.
| | 03:42 | Straight away, we can see that there is
quite a difference in the timing of our
| | 03:46 | motion here as compared to what we
were seeing inside our live simulation.
| | 03:52 | One thing that immediately strikes me
is that the pauses or gaps between the
| | 03:57 | individual launches of spheres
are really nowhere near long enough.
| | 04:01 | This seems a little bit too rapid-fire.
| | 04:03 | Now, this would be something that I would
most definitely want to go back and alter.
| | 04:08 | Doing that of course would be a simple
matter using the Unbake All function in
| | 04:12 | MassFX and then going and adding a
little more spacing between the groups of
| | 04:16 | keys for our animated discs.
| | 04:19 | One other anomaly that strikes me in
this preview is the motion of the single
| | 04:24 | can that ends up on the
right-hand edge of our stand.
| | 04:28 | In fact, if we just close our animation
preview and then just scrub the timeline
| | 04:33 | and keep an eye on that particular
can in the viewport, we can see that its
| | 04:37 | motion does seem to be a little bit confusing.
| | 04:39 | It does seem to do some odd things,
getting a little mixed up with other
| | 04:43 | motion inside of the simulation.
| | 04:46 | And I'm not really too keen on how that is
looking, or the position that it ends up in.
| | 04:51 | Thankfully, applying a quick fix to this
is a very simple thing to do in 3ds Max,
| | 04:56 | by means of animation layers.
| | 04:57 | So, let's move into our next
video and see how we can do just that.
| | Collapse this transcript |
| Adding an animation override| 00:00 | As with the planning and
preproduction phases of our simulation pipeline,
| | 00:04 | taking the time to bake and then review
a simulation is going to be an important
| | 00:08 | factor, in terms of the quality
we get from our final product.
| | 00:12 | If we skimp on or even skip pass
this stage, we may well end up with a
| | 00:16 | substandard, maybe even
unacceptable, final result.
| | 00:21 | It is of course entirely possible
to find that we have a perfectly good
| | 00:24 | simulation at this point, especially if
we are an experienced simulation artist.
| | 00:29 | On the other hand though, we may find
on close inspection that there are just
| | 00:33 | one or two elements spoiling what we have.
| | 00:36 | In some such situations, rather
than unbaking, tweaking parameters,
| | 00:40 | resimulating, and then rebaking, we
may well want to go ahead and simply add
| | 00:45 | an animation override layer that
will allow us to tweak those one or two
| | 00:49 | elements just a little.
| | 00:51 | As we have already noted from our
review, we do have just such an element.
| | 00:55 | Rather than have this single can
seemingly pop out from behind the stack and
| | 01:00 | then come to a somewhat odd stop,
I would like to adjust the speed and final
| | 01:05 | resting position just a little so
that it doesn't draw quite so much
| | 01:09 | attention to itself.
| | 01:11 | The first thing I want to do here is isolate the
objects that I will be wanting to focus on.
| | 01:15 | As I already have my can selected,
I'm just going to hold down the Ctrl key and
| | 01:20 | then add the stand geometry to my selection.
| | 01:22 | Now, I can right-click in the viewport
and use the Isolate Selection command.
| | 01:26 | Something else that I want to do here,
something that can be very helpful
| | 01:29 | in terms of being able to work quickly and
easily, is to switch over to an orthographic view.
| | 01:34 | Now, I know that my stand geometry
is aligned to my front view, so I'm just
| | 01:38 | going to use the F keyboard
shortcut to switch to that.
| | 01:45 | Now, we are ready to work
with our animation layers.
| | 01:48 | If we don't have the Animation Layers
toolbar enabled, we can either follow the
| | 01:52 | commands through the Animation menu to
enable it or we could simply right-click
| | 01:57 | in an empty area of a toolbar and
select Animation Layers from the list.
| | 02:01 | Once we have the floating toolbar,
we may want to dock it to the user interface,
| | 02:04 | which is exactly what I'll do here.
| | 02:06 | Now first, most of our options are grayed out.
| | 02:10 | This is because we need to
specifically enable the animation layer system.
| | 02:14 | We do this by means of this
button on the far left of the toolbar.
| | 02:18 | Clicking it brings up a Layer Controller dialog.
| | 02:21 | In this particular instance, the
Position and Rotation options will be more than
| | 02:25 | sufficient for us to work with, so
let's uncheck Scale and click OK.
| | 02:30 | Now, as you can see, the animation
layer system comes to life and we can come
| | 02:34 | over and click the Add Anim Layer button.
| | 02:36 | We will of course want to give our new
layer a descriptive name, so Can_Override
| | 02:42 | should work nicely in this particular case.
| | 02:45 | And we do want to choose
the Default Controller option.
| | 02:47 | Once that's done, we can click OK.
| | 02:49 | At this point, even with our animation
layer system enabled, we can still scrub
| | 02:54 | through our timeline so that we can observe
the current animation applied to our geometry.
| | 03:00 | We will be doing this so that we can
determine just where we want to add our override keys.
| | 03:05 | Frame 0 is naturally where we want to
start, so let's enable our Set Key option.
| | 03:10 | Before we add any keys though, I just
want to make certain that we are only
| | 03:14 | adding position and rotation keys.
| | 03:17 | The fewer keys we create, the easier our
data will be to edit, should we need to do so.
| | 03:22 | So, let's click on the Key Filters
button and make certain that only Position
| | 03:26 | and Rotation are checked.
| | 03:28 | The final piece of prepwork needed here is
to make certain that only our can is selected.
| | 03:33 | With the stand selected, we would of course
be adding keyframes to that geometry also.
| | 03:38 | So, now that we're set up, we can just
click the Add Key button while we are at
| | 03:43 | frame 0 to add position and rotation keys there.
| | 03:45 | And if we scrub forward with the Time
slider now, I would think somewhere around
| | 03:50 | about frame 59 is where we're going
to want to add our next set of keys.
| | 03:55 | So, with the playhead parked there, we
can again hit the Key button and then
| | 03:59 | pushing forward, I think frame 73
seems to be just about where our can has
| | 04:04 | finally come to its resting position,
so we can add another set of keys here.
| | 04:08 | Up to this point of course, all
we've done is add placeholder keys to
| | 04:12 | our animation timeline.
| | 04:13 | We have set points that we either
want to keep the position and rotation of
| | 04:17 | our object as it currently is, or
this is the spot at which we will want to
| | 04:21 | make some alterations.
| | 04:23 | In this particular instance, it really
is only the last frame, the settled frame,
| | 04:27 | that I need to make any changes to.
| | 04:28 | So, with our playhead at frame 73,
I'm just going to enable the Move tool and
| | 04:33 | then just pull our can back
a little bit in the X axis.
| | 04:37 | We'll of course want to
then rekey its new position.
| | 04:41 | Now, we can turn Set Key off.
| | 04:43 | We can right-click and effectively
un-isolate our scene. And if we switch back
| | 04:49 | now to our main camera view,
we can play the animation.
| | 04:57 | And as you can see, our can doesn't look
anywhere near as distracting as it did before.
| | 05:02 | The ability to somewhat post direct
our simulations can be an extremely
| | 05:07 | important and powerful feature.
| | 05:09 | Being able to quickly add animation
overrides using 3ds Max's animation
| | 05:13 | layers means we can quickly and easily
deal with slight motion discrepancies
| | 05:18 | in our simulations without the need
to go back into our simulation and
| | 05:22 | rework all of its settings.
| | Collapse this transcript |
|
|
4. Making Use of ConstraintsAdding a rigid constraint and creating breakability| 00:00 | As with objects in the real world,
objects in a MassFX simulation are subject
| | 00:05 | to the laws of physics, in particular gravity.
| | 00:09 | In order to remain in a fixed position
once a simulations start, they need to
| | 00:13 | either be standing firmly on another
static rigid body, such as the MassFX
| | 00:18 | ground plane for instance, or be fixed
somehow to another object in the scene.
| | 00:23 | In this video, we will walk through
accomplishing the latter in MassFX by making
| | 00:28 | use of its constraint tools.
| | 00:31 | A constraint is a MassFX helper object
that can be thought of as a joint or a
| | 00:36 | connector between two objects in the simulation.
| | 00:40 | In terms of real-world examples of
constraints, we might think of a nail
| | 00:44 | pinning a wanted poster to a tree or a
hinge connecting a door to a door frame.
| | 00:49 | Now, there is one extremely
important piece of information regarding
| | 00:53 | constraints in MassFX that we need to
understand right at the start of our working with them.
| | 00:58 | Constraints use the pivot points of
the objects we are constraining together;
| | 01:04 | they use them as the point
of connection, so to speak.
| | 01:07 | It is therefore absolutely critical
that our object's transforms have not been
| | 01:12 | messed up in any way, such as can occur
if we scale geometry when not in a
| | 01:17 | subobject mode or if we mirror
objects using the 3ds Max Mirror tool.
| | 01:23 | This also means that the placement or
the location of pivots on objects will
| | 01:28 | itself play a critical role in many situations.
| | 01:32 | To get started then, as you can see
in this particular version of our start
| | 01:36 | scene, we have a number of target
objects that we will be wanting to hit with
| | 01:41 | the spheres coming from our launchers.
| | 01:43 | They are all made up of three distinct paths.
| | 01:46 | We have a target body, or frame; we
have a gray hinge object; and we have the
| | 01:52 | central target panel itself.
| | 01:55 | Of course at this moment in time,
applying a dynamic rigid body modifier to any
| | 01:59 | of these parts and then running a
simulation would see them fall to the floor.
| | 02:04 | Let's see though if can change that
particular behavior by using a rigid constraint.
| | 02:09 | There are of course, as we may expect
by now, a number of ways that we can
| | 02:14 | approach setting up our constraints in MassFX.
| | 02:17 | For demonstration purposes though,
let's see what happens if we simply
| | 02:21 | select one of our target panels and
then try to apply a rigid constraint
| | 02:25 | from the MassFX toolbar.
| | 02:27 | What we get is a MAXScript message
dialog giving us a critical piece of
| | 02:33 | constraint use information, namely objects
connected by a constraint must be rigid bodies.
| | 02:40 | The nice thing here is that the
system is offering to apply the required
| | 02:44 | modifiers for us rather than making us go
away, take care of it, and then come back.
| | 02:49 | If I click Yes to accept the offer,
we are taken straight into creating the
| | 02:53 | rigid constraint we originally wanted.
| | 02:55 | The first thing we see is a
constraint gizmo that could be sized by simply
| | 03:00 | moving our mouse either
left and right or up and down.
| | 03:04 | Actually, what is really happening
is the closer we move our mouse to our
| | 03:08 | parent object, the smaller the constraint
becomes, and of course the opposite is also true.
| | 03:12 | As this helper object houses a number
of important options, and because we are
| | 03:19 | going to want to easily select them in
the scene, we can set this to be fairly big.
| | 03:23 | All we need to do then is
left-mouse-click to exit Creation mode.
| | 03:27 | Now if we come and run our simulation,
we may be a little surprised at the results.
| | 03:34 | Why, you may ask, isn't our dynamic rigid
body object dropping to the floor under
| | 03:38 | the influence of gravity,
as we have come to expect?
| | 03:43 | And why aren't our dynamic rigid body
spheres that are clearly colliding with this
| | 03:47 | panel having any effect on it either?
| | 03:49 | We have, after all, only applied our
constraint to this one single object.
| | 03:56 | With the Constraint helper selected,
let's come over to the Command panel.
| | 04:00 | If we take a look in the General options
for our constraint, we can see that the
| | 04:04 | panel object has been set as
a child in this relationship.
| | 04:09 | But our parent is saying
that it is as of yet undefined.
| | 04:13 | With no parent object explicitly
specified, the MassFX system constrains a child
| | 04:19 | object to the world itself,
essentially pinning it in place in 3D space.
| | 04:24 | Our geometry now acts much like a
static rigid body. As we've seen, neither the
| | 04:30 | projectiles nor gravity
have any effect on it at all.
| | 04:34 | In fact if we take a look at the
default transform limits that have been set
| | 04:38 | up for our rigid constraint preset, you
can see that everything is completely locked.
| | 04:44 | In our particular case, this
functionality actually works quite well for us.
| | 04:49 | So let's apply a rigid
constraint to our other panel objects.
| | 04:53 | This time we will use a
slightly different workflow.
| | 04:57 | So I am just going to use the Ctrl key
and then left-mouse-click to select all
| | 05:01 | of the remaining panel objects, and then
we can apply a MassFX dynamic rigid body
| | 05:06 | modifier to them from the MassFX toolbar.
| | 05:10 | If I run the simulation now, as you can
see, we get a very expected result: our
| | 05:15 | panels fall to the floor
being affected by gravity.
| | 05:18 | What we can do now is again select our
target, this time one at a time, and apply
| | 05:24 | a rigid constraint to them.
| | 05:26 | We can do that from the MassFX toolbar.
| | 05:28 | As we go, we do of course want to leave
our gizmos quite large so that we can
| | 05:34 | easily select them in the viewport.
| | 05:37 | Once all of our setup is in place, we
can again come and run the simulation, and
| | 05:42 | this time we can see that our
constraints are working perfect. All of the panels
| | 05:47 | are firmly locked in place, which
actually means we can now go and make use
| | 05:52 | of a constraint option that can add a
very specific effect to our simulation--
| | 05:57 | namely the ability to make
our constraints breakable.
| | 06:02 | To do this, all we need to do is, again,
use the Ctrl key to select all of our
| | 06:06 | constraint helpers and then we can
come across to the Multi-Object Editor.
| | 06:11 | If we just scroll down to the Advanced
rollout, we can enable this breakable
| | 06:15 | option by simply putting a check in the box.
| | 06:19 | The Break Force and Break Torque
settings control how much force needs to be
| | 06:23 | applied before the
constraint will break or turn off.
| | 06:27 | The Break Force controls direct
impacts, and Break Torque determines how much
| | 06:32 | twist or rotational force would need to be
applied, again, before the break would occur.
| | 06:36 | Now if I just right-click on both of
these spinners for a moment to set them to
| | 06:41 | their minimum values and then if I
come and run the simulation again, you can
| | 06:46 | see that there is a danger in
setting these values too low.
| | 06:50 | Even a slight shift in the object as
the simulation starts applies in a force to
| | 06:55 | turn our constraint off and
drop the object to the floor.
| | 07:00 | If we wanted to fix this and yet still
keep our values very low, if we just set
| | 07:03 | these two a value of 1 each, you
can see that that is enough to keep them
| | 07:07 | fixed in place as the simulation starts.
| | 07:11 | On the other hand of course, if we set
these values to high, we might not get
| | 07:15 | our constraints to break at all, so we
do need to set these options with care.
| | 07:20 | In our case, if we set them to, say, 5
and 60 respectively and then come and run
| | 07:27 | the simulation, you can see the
constraints are clearly strong enough to hold
| | 07:31 | the objects in place, but only until
they are struck with enough force to
| | 07:35 | switch the constraint off.
| | 07:38 | For simply pinning an object or objects
in place then, or indeed for creating a
| | 07:42 | locked relationship between two
dynamic rigid bodies, the rigid constraint is
| | 07:47 | the perfect tool. But what if we
wanted to create something a little more
| | 07:51 | interesting than static or fixed target?
| | 07:54 | Could constraints help us create
something a little more challenging, such as a
| | 07:58 | dynamic moving target?
| | 08:00 | We will answer that question in our next video.
| | Collapse this transcript |
| Creating a moving target with the Slide constraint| 00:00 | Having seen how we can easily set up a basic
rigid constraint in MassFX and make it breakable,
| | 00:06 | we are now going to move on to
something a little more visually interesting.
| | 00:10 | One brilliant thing about constraints
in MassFX is that they can help us create
| | 00:14 | some very interesting, even complex-
looking background or ambient motions as I
| | 00:19 | like to call them, without
having to hand-animate everything.
| | 00:23 | In this video we will see how we can
take some simple seesaw keyframe animations
| | 00:27 | and use them to create dynamic moving targets.
| | 00:32 | We will also demonstrate an alternative
workflow from the ones we have used so far.
| | 00:37 | In fact, what we will do is create our
rigid body modifiers, constraints, and set
| | 00:43 | up the proper parent-child
relationship in just a few short steps.
| | 00:47 | Let's go ahead then and select
the two objects that we want to
| | 00:51 | constrain together.
| | 00:52 | The actual order in which we pick them
here is important as the object we select
| | 00:57 | first will become the parent in the
constraint relationship, whilst the second
| | 01:01 | object selected becomes the child.
| | 01:04 | Let's left-mouse-click on one of our
board or seesaw object to set it as the
| | 01:09 | parent and then, holding down the
Ctrl key, we can left click to select its
| | 01:13 | corresponding target object,
setting it as the child.
| | 01:18 | With the selection made, we can come
to the Constraint options on the MassFX
| | 01:22 | toolbar, left-mouse-click, and hold
until we get the flyout and then select
| | 01:26 | the slide constraint.
| | 01:27 | As with the rigid constraint, we are
straight away reminded that our objects need
| | 01:32 | rigid body modifiers applying to
them, so let's click Yes to apply them.
| | 01:37 | Then of course we can set the size of
our constraint helper objects in the scene.
| | 01:41 | We do this by sliding our mouse either
toward or away from the parent object.
| | 01:47 | Once we have the size set how we
want, we can just left-mouse-click to
| | 01:50 | complete the operation.
| | 01:52 | And because of a slight glitch in
current MassFX versions, we may have
| | 01:57 | to manually align the constraint slide axis
in order for our setup to work correctly.
| | 02:02 | Here our constraint helper is being
created at somewhat of an offset angle from
| | 02:07 | the board object itself.
| | 02:09 | In fact, if I just switch to a top view
by using the T keyboard shortcut and then
| | 02:14 | switch to Y frame mode by using F3,
you will be able to see just what I mean.
| | 02:20 | This thin white line, or guide, shows
us the direct in which our object will
| | 02:26 | currently slide, which is
clearly not what we are wanting here.
| | 02:30 | To fix things, I am just going to
disable Angle Snap, select our Rotate tool, and
| | 02:35 | then simply rotate our
constraint into alignment.
| | 02:39 | Once this is done, we can hit the C
key to switch back to our Targets camera,
| | 02:44 | selecting it from the list, and then
use F3 to switch back to a shaded view.
| | 02:48 | Of course we don't want our target to
slide too far. We need to set a limit on
| | 02:54 | the constraint to a value
that works for our current setup.
| | 02:57 | With the helper still selected then,
if we just come over to the Command panel
| | 03:01 | and to the Translation Limits rollout,
we can set the Limit Radius value to
| | 03:06 | something around about 22, which
should work nicely for our setup.
| | 03:11 | Again, our constraint guide, our thin
white line, is giving you some nice visual
| | 03:16 | feedback regarding just where our
constraint or our slide will end.
| | 03:21 | Before we test our simulation, before we
run it, we need to set our seesaw's rigid
| | 03:26 | body modifier type to kinematic.
| | 03:28 | These are animated objects.
| | 03:30 | With that done, we can
come and run the simulation.
| | 03:35 | As you can see, once our seesaw
animation gets going, our slide constraint is
| | 03:40 | working very nicely.
| | 03:41 | Now, as with our rigid constraint,
the slide constraint can be made breakable.
| | 03:47 | If I just select the constraint helper,
I could right-click in the Command panel
| | 03:51 | and jump to Advance rollout,
where we can enable that option.
| | 03:56 | We need to make certain our Max Force
value is set at 100, and we can change our
| | 04:00 | Max Torque settings to 1500.
| | 04:01 | And if we just run the simulation
again, you can see that at first, our
| | 04:08 | breakable limits that we have set are
not passed, our slide just continues on
| | 04:12 | its way, but then once the tolerances
are exceeded, MassFX breaks the constraint
| | 04:19 | and down she comes.
| | 04:21 | As you can imagine, once we have
applied the same setup to all of the target
| | 04:25 | objects in the scene, we will have
some complex background motion going on.
| | 04:29 | Hand-keyframing this level of motion
and interactivity would certainly take
| | 04:35 | quite a bit more time than the quick
MassFX setup that we have used here.
| | 04:39 | In our next video, we will move on to a
slightly different type of motion, as we
| | 04:44 | make use of the MassFX hinge constraint.
| | Collapse this transcript |
| Creating springy targets with the Hinge constraint| 00:00 | Having looked at the first two options
found in the Constraints flyout--Rigid and
| | 00:04 | Slide--time now to take a look at using
the third option available to us, which
| | 00:09 | is the extremely useful hinge constraint.
| | 00:12 | Just as we can with all MassFX
constraints, we can apply the rigid body
| | 00:16 | modifier, the constraint, and set up the
parent-child relationship in just a few short steps.
| | 00:21 | Before we do that, however, I just want
to take a moment to highlight to you the
| | 00:27 | location of the pivot points on the
objects we will be constraining together.
| | 00:32 | As you can see, the pivots for both of
these objects are set at the same height
| | 00:37 | on the world Z axes.
| | 00:39 | This is very important for the hinge
constraint to work as we need it to in this scenario.
| | 00:45 | With that noted then, let's left-mouse-
click to select our parent object, which
| | 00:50 | will be our right-side hinge, and then,
holding down the Ctrl key, we can add our
| | 00:55 | child object to the selection, which
will be the door or target panel itself.
| | 00:59 | Up on the MassFX toolbar, let's access
the flyout and apply a hinge constraint.
| | 01:05 | Of course, we will need to apply our
rigid body modifiers first, so we need to
| | 01:09 | click Yes in our dialog.
| | 01:12 | Then, as before, we can set the size
of our constraint helper and then
| | 01:15 | left-click to finish.
| | 01:18 | Before we do anything else at this stage,
we will need to fix our hinge object in place.
| | 01:23 | We really don't want it to fall to
the ground once our simulation starts.
| | 01:27 | To do that, let's select it and go to the
Modifier properties over in the Command panel.
| | 01:32 | Here we need to set its rigid body
type to be either static or kinematic.
| | 01:37 | Now, kinematic rigid bodies don't
actually need to have any animation applied to
| | 01:42 | them in order to be useful to us.
| | 01:45 | In a case such as this, setting our
rigid body to Kinematic will cause it to
| | 01:50 | act in much the same manner as a static
rigid body, holding our object in place for us.
| | 01:56 | To demonstrate that this will work just
fine, let's set our rigid body type to
| | 01:59 | kinematic and then we can run the simulation.
| | 02:04 | As you can see, our door sits nicely
and then eventually gets hit by one of the
| | 02:09 | flying spheres and reacts accordingly.
| | 02:12 | To add naturalness to the simulation,
we will want to repeat this procedure
| | 02:16 | for the opposite door,
| | 02:17 | so let's step through that process now.
| | 02:21 | We can set the size of our
constraint helper object in the scene.
| | 02:25 | Left-mouse-click to complete the operation.
| | 02:28 | We need to set our Rigid
Body modifier type to Kinematic.
| | 02:32 | With that done, we can again run our simulation.
| | 02:36 | Now, whilst our first constraint
clearly is still working very nicely, we
| | 02:39 | obviously have a problem with our second.
| | 02:44 | Behavior such as we are seeing here
typically occurs when one or both pieces of
| | 02:48 | geometry in the constraint
relationship have been mirrored in some way.
| | 02:53 | Now, I happen to know that both of
these pieces of geometry have been mirrored,
| | 02:57 | so we clearly have some work to do.
| | 02:59 | In such situations, the best thing we
can do is simply delete our rigid body
| | 03:04 | modifiers and the constraint
and start again. Let's do that.
| | 03:09 | Before reapplying the constraint,
we will need to use some standard 3ds Max
| | 03:13 | tools to reset the
transforms on our myriad geometry.
| | 03:17 | One very quick way of doing this, with
our geometry selected, would be to come
| | 03:22 | over to the Command panel and
come into the Utilities tab.
| | 03:24 | In here, we should see this
Reset XForm, or Transform option.
| | 03:30 | If we don't, we can just click on the
More button at the top of the rollout and
| | 03:34 | select this option from the list.
| | 03:37 | Having clicked that option, because we
have our objects already selected, we
| | 03:41 | just need to hit the Reset
Selected button and we are done.
| | 03:45 | Now, we can reapply our hinge
constraint using the same process as earlier.
| | 03:49 | So, let's left-mouse-click to select
our parent object and then holding down
| | 03:53 | Ctrl, we can click to add our child.
| | 03:57 | From the MassFX toolbar, let's reapply
our hinge constraint and set that up.
| | 04:03 | Finally, we can switch our hinge
geometry over to a kinematic rigid body type,
| | 04:07 | and then we are ready to rerun our simulation.
| | 04:12 | As you can see, now both
constraints act as they should.
| | 04:16 | For things to look natural inside
of our simulation, we will
| | 04:20 | obviously need to set up our
target frame to be a static rigid body.
| | 04:23 | At the moment, our spheres appear to be
passing through it, which would obviously
| | 04:27 | detract from the final quality.
| | 04:30 | As we have already seen, this
is a very simple thing to do.
| | 04:33 | We just need to select over frame
geometry and then from the MassFX toolbar,
| | 04:37 | apply a static rigid body modifier.
| | 04:40 | The final step of course, over in the
Modifier Properties, would be to set our
| | 04:44 | Physical Shape Type to Original.
| | 04:47 | One last thing we want from our swing
doors is to have them eventually settle
| | 04:52 | back into their starting positions.
| | 04:55 | Now, this is something we can easily
set up using our constraint options.
| | 04:59 | Of course, the first thing we need to
do is select our constraint helper so
| | 05:03 | that we can access its parameters.
| | 05:05 | Then, if we come into the spring rollout,
you can see we have the ability to set
| | 05:11 | a Spring to Resting Swing value.
| | 05:13 | As the name suggests, this option is
designed to pull our object back to its
| | 05:18 | original starting position.
| | 05:21 | Let's set the Springiness to a
value of 7 and the Damping to 0.05.
| | 05:27 | Again, we will want to apply the same
parameters to the opposite constraint.
| | 05:33 | Once we are done, we can run the simulation.
| | 05:35 | And as you can see, our doors now swing
very nicely, eventually looking to settle
| | 05:41 | back into their start position.
| | 05:44 | As you can imagine, if we had all of
the targets in the scene set up and
| | 05:48 | working in this fashion, we would again
have created a fairly complex piece of
| | 05:52 | background, or maybe even foreground,
motion in a quick and easy manner using our
| | 05:57 | MassFX tools.
| | Collapse this transcript |
| Spinning targets using the Twist constraint| 00:00 | Another extremely useful preset in our
MassFX Constraint options is the twist constraint.
| | 00:06 | This can be particularly handy if we
need to set up objects that spin or twist
| | 00:11 | around a particular axis.
| | 00:13 | As an example, we might think of the
blades on a garden windmill ornament, or as
| | 00:18 | we will create here, a spinning target.
| | 00:21 | We are no doubt by now becoming
fairly familiar with the MassFX constraints
| | 00:25 | workflow, so we can just jump
straight into setting this up.
| | 00:28 | As you can see, we have two small
knob objects that represent the central
| | 00:33 | spindle around which our target panel will spin.
| | 00:35 | Now, we could constrain the panel to
just one of these pieces of geometry and
| | 00:41 | that would, in most situations, work just fine.
| | 00:45 | In this case though, we are going to
assume that we need to use both, which will
| | 00:48 | give us the opportunity to walk
through the process for setting that up.
| | 00:52 | The first thing we want to do is attach our
two pieces of spindle geometry together.
| | 00:56 | So, let's select one of them,
right-click on it, and choose the Attach
| | 01:01 | command from the Quad menu.
| | 01:03 | Then of course, we can click on the
second spindle object, which will attach or
| | 01:07 | join them together as a
single piece of geometry.
| | 01:11 | Don't forget to then
right-click so as to exit Attach mode.
| | 01:14 | We have already mentioned the
importance of pivot point placement.
| | 01:19 | Generally speaking, it is a good
idea for us to check that the current
| | 01:24 | location of our pivot points will work for
the type of constraints we are wanting to add.
| | 01:30 | Naturally, we want to do this
before we add any constraints.
| | 01:34 | We can do that now by adding the target
panel to our selection by holding down
| | 01:38 | the Ctrl key and clicking on it.
| | 01:41 | Next, we can right-click in the
viewport and use the Isolate Selection command.
| | 01:47 | To reliably check the placement
of pivots, we will want to work in
| | 01:50 | an orthographic view,
| | 01:51 | so let's switch over to a front
view by using the F key on the keyboard.
| | 01:55 | Then we can just use the Zoom Extents
Selected tool to get a close-up view.
| | 02:00 | From here, we can select each of the
objects in turn and visually check the
| | 02:05 | alignment of our pivots.
| | 02:07 | From this view, things look
as if they should be okay.
| | 02:10 | Even though the pivots are not in the
same location, things appear to line up
| | 02:14 | along the currently all-important vertical axes.
| | 02:18 | However, if we just hit the T key on
our keyboard to switch to our top view and
| | 02:23 | again use Zoom Extents Selected and
perform the same check, you can see we do
| | 02:28 | have a definite misalignment.
| | 02:31 | The fact that this exists as we look
down what will be our spin axes means
| | 02:36 | that our objects will have a slight tilt to them
as they spin instead of being perfectly upright.
| | 02:42 | If we want everything to work correctly
here, we do have a little bit of work to do.
| | 02:47 | First of all, let's select the panel
geometry, come over to the Hierarchy tab,
| | 02:51 | and click the Effect Pivot Only option.
| | 02:55 | As we ideally want the panel's pivot to be in
the same location from this view as our spindles,
| | 03:00 | let's go up to the main
toolbar and select the Align tool.
| | 03:04 | Now, we can click the spindle object and
align the pivots along the X and Y axes.
| | 03:10 | This gives us a precise rotational
center around which our target panel can spin.
| | 03:14 | With that done, we can of course
exit the Pivot Only and Isolation modes.
| | 03:20 | We can also use the C key to get
back to our target close-up camera.
| | 03:24 | Then we can use Ctrl+Click to select
our spindle and panel and then add a
| | 03:30 | twist constraint from the MassFX toolbar.
| | 03:33 | Again, of course, we need to apply
the rigid body modifiers and size our
| | 03:37 | constraint helper appropriately for our scene.
| | 03:41 | We are going to need our spindle
geometry to remain fixed in place,
| | 03:44 | so again, let's go and set the
Rigid Body Modifier Type to Kinematic.
| | 03:49 | If we run the simulation at this
point, we can see that things are
| | 03:53 | working pretty well.
| | 03:54 | Finally, if we just select our
constraint helper and come over to the Command
| | 03:59 | panel, we can see that the default
settings for the twist constraint have swing
| | 04:04 | Y and Z locked, whilst the
twist action is set to run free.
| | 04:09 | This of course is pretty much what we want.
| | 04:12 | We do, however, need to restrict the
spinning motion of our panel a little.
| | 04:16 | Otherwise, it will just
continue to turn perpetually.
| | 04:20 | To do that, let's set the Spring to Resting
Twist Damping value to something as low as 0.025.
| | 04:27 | One final test shows that our
damping is having quite an obvious effect.
| | 04:34 | Hopefully, by now we have discerned
that setting up a wide range of dynamic
| | 04:37 | motions can be handled very easily
inside the MassFX constraint system.
| | 04:42 | Not that we've finished yet.
| | 04:44 | We can now use everything that we've
looked at so far in this chapter to set up
| | 04:48 | what I will call a crazy target, one
that will give us a much wider range of
| | 04:53 | motions than the fixed
presets that we've looked at so far.
| | Collapse this transcript |
| Creating crazy targets with the Ball & Socket constraint| 00:00 | For our final foray into the MassFX
Toolbar Constraints flyout, we are going to
| | 00:06 | create a crazy target, something that,
comparatively speaking, has a much broader
| | 00:10 | range of motion than the constraint
presets we've worked with up to this point.
| | 00:15 | The idea is to create something that
will hopefully be a little more challenging
| | 00:19 | for our ball launchers to hit.
| | 00:21 | To get started, we need to run
through our by now familiar procedure.
| | 00:25 | So, let's select our Hinge object, which
in this case happens to be this little
| | 00:30 | piece of domed geometry.
| | 00:31 | And then, of course holding down
the Ctrl key, we can click to add the
| | 00:35 | target frame itself.
| | 00:36 | Now, we can go up to the MassFX
toolbar and from the flyout, add a ball-
| | 00:42 | and-socket constraint.
| | 00:44 | We of course need to say
Yes to adding the modifiers.
| | 00:46 | And then finally, we can set our
constraint helper size to suit.
| | 00:50 | Now obviously, we will need our dome
geometry, which is we say is acting as our
| | 00:56 | hinge, to remain fixed in place.
| | 01:00 | This time, coming into the Modifier
Properties, we can set the Rigid Body Type to Static.
| | 01:05 | Now, if we run the simulation
without animation, you can see, after a few
| | 01:10 | moments, our target flops forward and then
begins to behave in a very odd manner indeed.
| | 01:16 | Now, this is clearly not the
effect that we are after here.
| | 01:20 | The mistake we've made is to have two
rigid body objects overlapping or into
| | 01:25 | penetrating one another.
| | 01:27 | In fact, if I just delete our
constraint helper, you can see our hinge object
| | 01:32 | does indeed intersect the stand
geometry, which is itself a static rigid body.
| | 01:38 | Let's switch to our perspective view
using the P key and with the hinge object
| | 01:43 | selected, let's use Zoom Extents
Selected to get a better view of the problem.
| | 01:48 | As you can see, clear intersection.
| | 01:51 | The quick fix here is to select our two
pieces of geometry, switch back to our
| | 01:56 | target's close-up camera, and just
raise them up a little in the scene.
| | 02:01 | We are best moving both objects
together, so as to not inadvertently create
| | 02:05 | intersection between our
parent and child geometry.
| | 02:08 | That would itself create a similar
problem to the one we are trying to solve.
| | 02:13 | With that done, we can select our
parent and child objects in turn and reapply
| | 02:19 | the ball-and-socket constraint.
| | 02:20 | Now interestingly, 3ds Max tells us
that a static rigid body cannot be a part
| | 02:25 | of a constraint setup even though we have
clearly seen in earlier examples that this can be so.
| | 02:32 | To work around this, let's select our hinge
object and set its Rigid Body Type to Kinematic.
| | 02:37 | Then we can reapply the ball-and-
socket constraint and finally switch our
| | 02:43 | Rigid Body Type back over to Static.
| | 02:46 | Now, when we run the simulation
our target again flops forward,
| | 02:50 | but after a little while, it simply
settles into that position--no more
| | 02:54 | odd jumping around.
| | 02:57 | To get something a little more
interesting, let's select the constraint helper
| | 03:01 | and jump over to the Command panel.
| | 03:04 | First of all, in the Swing and Twist
limits rollout, I want to set the Swing Y
| | 03:08 | and Swing Z angle limits to 120 degrees each.
| | 03:14 | Doing this whilst leaving the Twist
option set to Free will give us a nice broad
| | 03:19 | range of motion for our target.
To make things interesting, we do of course want
| | 03:23 | our target to try its best to
return to an upright position.
| | 03:28 | To do this, in the Spring rollout,
we can set the Spring to Resting Swing Springiness
| | 03:33 | value to something like 2.7.
| | 03:37 | We also want to set the
corresponding Damping option to 0.01.
| | 03:42 | Now, if we didn't want our target to
spin or twist quite as freely as it will,
| | 03:47 | we could also set the Spring to
Resting Twist values to accomplish that.
| | 03:52 | With those parameter tweaks in place,
let's run the simulation once again, this
| | 03:56 | time with animation, and see what we get now.
| | 04:00 | As you can see, once our target takes
a hit, we do indeed get a really nice
| | 04:05 | range of motion from it, and of course it
does try and return to an upright position.
| | 04:11 | Although, I must say that it doesn't seem
to be making itself particularly hard to hit,
| | 04:16 | so I guess not such a success on that score.
| | 04:20 | There is no doubt about it, the
MassFX constraint system is robust, easy to
| | 04:25 | work with, and houses lots of
flexibility regarding the types of motion that we
| | 04:30 | can set up with it.
| | 04:31 | We have deliberately used some very
specific examples in this chapter, but with
| | 04:36 | a little bit of imagination applied
to our use of these constraint tools, a
| | 04:40 | wealth of possibilities can open up to us.
| | 04:43 | What about characters, though?
| | 04:45 | Is there any way to make use of the
MassFX constraint system to help with
| | 04:50 | creating automated character motion?
| | 04:52 | We are going to look at doing just
that using the MassFX Ragdoll system.
| | Collapse this transcript |
| Constructing a MassFX Ragdoll| 00:00 | One very nice feature of MassFX is
the fact that animated characters can
| | 00:04 | participate in simulations as
either dynamic or kinematic rag dolls.
| | 00:09 | Using the Dynamic option, a character
come both affect and be affected by other
| | 00:14 | objects in the simulation.
| | 00:16 | Using the Kinematic option, a character
can affect the simulation, but cannot be
| | 00:21 | affected by it in any way.
| | 00:22 | For example, an animated character
could knock down an obstacle on its way--
| | 00:27 | maybe such as bursting through a
prefractured window--but a large box
| | 00:31 | falling on a Kinematic rag doll
character would not in any way alter its
| | 00:35 | behavior in the simulation.
| | 00:37 | To demonstrate how easy it is to create
and edit a rag doll and its parameters,
| | 00:43 | we have in our scene, as you can see,
a simple character hierarchy created using
| | 00:47 | standard 3ds Max bones.
| | 00:49 | Now, although this is clearly a
bipedal character, it does not have to be in
| | 00:53 | order for a rag doll to be applied.
| | 00:56 | We could use any set of linked bones
in any kind of character configuration.
| | 01:01 | We could just as easily have used a
biped rig here, as the rag doll system
| | 01:05 | will work very nicely with that also.
| | 01:08 | We cannot, however, currently
use rag doll on a cat rig.
| | 01:12 | To apply the rag doll, all we need to do
is select any bone on our character, go
| | 01:17 | up to the MassFX toolbar, and from the
Ragdoll flyout, invoke either the Create
| | 01:22 | Kinematic or Create Dynamic Ragdoll commands.
| | 01:26 | In this instance, I want
to create a dynamic ragdoll.
| | 01:29 | Once the option is chosen, you can
see we get an entire system of dynamic
| | 01:34 | rigid bodies and constraints all
applied to the bone hierarchy and all set up
| | 01:39 | to generally mimic the range of
motion found in the joints of bipedal
| | 01:43 | creatures such as humans.
| | 01:45 | Straight away of course
we can run the simulation.
| | 01:47 | As you can see, our character
falls dynamically to the floor.
| | 01:53 | The constraints setup maybe a little
off for our particular character setup but
| | 01:57 | as an initial pass, this is not a bad
start at all. And of course we can easily
| | 02:03 | go in and refine the set up using all
of the modifier and constraint options
| | 02:08 | that we have worked with so far in our course.
| | 02:11 | In this particular case for instance,
we might want to get a better fit of our
| | 02:15 | collision meshes of
physical shapes to the bones.
| | 02:19 | We can do this by first of all
deselecting what we have as our current selection
| | 02:23 | includes constraints, and then we can
switch our Selection filter to the bones
| | 02:28 | and drag a selection around our character.
| | 02:31 | Then, in the Multi-Object Editor, we
can set our Physical Mesh Type to Convex
| | 02:36 | instead of the default Capsule.
| | 02:38 | This of course gives us a much better
fit of the collision mesh to our bones.
| | 02:43 | If I just switch over to our main
camera view by using the C key and selecting
| | 02:48 | that option from the list, you can see
if we do at some point need to get back
| | 02:52 | to editing our Ragdoll global properties, that
we actually have a Ragdoll icon in the scene.
| | 02:58 | This was created when we added
the ragdoll to our character.
| | 03:01 | This can be selected like
any regular 3ds Max object.
| | 03:05 | Of course we will first of all
need to alter our selection filter.
| | 03:08 | This time I am just going to set this Helpers.
| | 03:11 | Then when we select the Ragdoll icon,
you see, we once again get access to all
| | 03:16 | of our Ragdoll global parameters.
| | 03:18 | With our Selection filter set to Helpers,
we could also drag a marquee selection
| | 03:24 | around our character and select all
of the constraints in our ragdoll.
| | 03:28 | This means of course that we can edit
all, all groups of them, again inside the
| | 03:32 | Multi-Object Editor.
| | 03:35 | Being able to edit multiple
constraints, or indeed rigid body options in this
| | 03:39 | manner can of course be a huge
timesaver when we're working with a complex
| | 03:43 | system such as a ragdoll.
| | 03:44 | One thing we may find, if we have to
work with a number of ragdolls in our scene,
| | 03:50 | is that our viewport refresh, or
frame rates can become a little sluggish.
| | 03:54 | Oftentimes previewing simulations
that have lots of constraint helpers
| | 03:58 | constantly being redrawn can do that.
| | 04:01 | If we find ourselves struggling with
this, we might want to disable the display
| | 04:05 | of helpers in our viewport.
| | 04:07 | We can do this of course by coming to
the Display tab of our Command panel and
| | 04:11 | using the Hide by Category and Helpers option.
| | 04:15 | As you can see, creating and
editing a MassFX ragdoll is a fairly
| | 04:19 | straightforward process.
| | 04:21 | Of course if we're wanting to set up an
extremely accurate system, maybe for
| | 04:25 | something like close-up digital double
work, then we will need to spend quite a
| | 04:29 | bit of time tweaking constraint settings,
along of course with a judicious amount
| | 04:34 | of trial-and-error testing.
| | 04:35 | But as with everything we've seen so
far in MassFX, with good planning and
| | 04:40 | attention to detail, we can get some
very nice results from the system inside
| | 04:45 | very acceptable time frames.
| | Collapse this transcript |
|
|
5. Working with mClothApplying the mCloth modifier and pinning the hammock| 00:00 | With the release of 3ds Max 2013, the
MassFX system added the ability to deal
| | 00:06 | not only with dynamic rigid body
collisions, but also dynamic soft bodies,
| | 00:11 | particularly cloth in the
form of mCloth modifier.
| | 00:14 | Of course 3ds Max already has an
extremely cloth modifier that can interact very
| | 00:20 | nicely with characters and
other objects in the scene.
| | 00:23 | But that is not the same as having
two-way interaction inside a dynamic
| | 00:28 | simulation between soft and rigid body
objects, which is exactly what mCloth
| | 00:34 | inside MassFX now gives us.
| | 00:37 | In this video, we are going to step
through the process of turning a simple 3ds
| | 00:41 | Max geometric plane into a pinned cloth
hammock that we can have interact with
| | 00:47 | dynamic objects already present in the scene.
| | 00:51 | The first thing we will want to do of
course is select one of the planes that we
| | 00:53 | will be turning into a cloth object.
| | 00:56 | This has been modified somewhat in that
we have added a gamut maker modifier to
| | 01:01 | create extra faces, extra topology,
and then we have finally converted
| | 01:05 | everything into an editable poly.
| | 01:08 | With the plane selected, I just want
to use my P key to switch over to
| | 01:12 | perspective view and again make use of the
Zoom Extent Selector tool to get up close.
| | 01:18 | From this point of view, we can clearly
see the single-poly nature of this object.
| | 01:22 | In fact if we just use the F4 key to
turn on Edge Faces, we can see how our
| | 01:27 | plane's topology is currently looking.
| | 01:29 | Now, to apply an mCloth modifier, we can
again use any one of a number of approaches.
| | 01:35 | In this instance, we can just come up
to the MassFX toolbar and then clicking
| | 01:39 | on the mCloth icon with our left-mouse
button and holding, we can access the flyout.
| | 01:44 | We have two options available that
give us the ability to add and also remove
| | 01:49 | an mCloth modifier.
| | 01:50 | Obviously I want to use the Add
option at this moment in time.
| | 01:54 | We now have an mCloth object in our scene.
| | 01:58 | If I just run the simulation, because we
have MassFX gravity applied, our cloth
| | 02:03 | object reacts appropriately and falls downward.
| | 02:07 | As our stand geometry has been set
up as a static rigid body, once the two
| | 02:11 | objects collide, our cloth
naturally comes to a halt.
| | 02:14 | Of course, if there were nothing in the
simulation with which it could collide,
| | 02:18 | our piece of cloth would just keep on
falling until we stopped the simulation.
| | 02:23 | In this particular instance of course
we don't want our cloth to fall at all;
| | 02:27 | instead, we want to pin the corners of
our piece of material in place and create
| | 02:32 | a hammock that can interact with our dynamic
sphere as they are launched in this direction.
| | 02:36 | So if I just right-mouse-click on our
cloth object, you can see in the Quad menu
| | 02:42 | that we have the option to go down to a
subobject vertex level in the modifier.
| | 02:47 | Once we go to vertex level, you'll
notice that all of the available options over
| | 02:52 | in the Command panel change completely.
| | 02:54 | And if we just come across and scroll
down a little way, you will see that we
| | 02:59 | get an entire constraint
section with which we can work.
| | 03:03 | The one we will make use of
here is the simple pin option.
| | 03:08 | To show you how this works, let's
just select at least one vertex in the
| | 03:11 | vicinity of our upright pole and then
zoom in tag using first of all, the Region
| | 03:17 | Zoom tool, and then we'll
make use of our Orbit tool.
| | 03:21 | At this point, it would probably be a
good idea to use the F3 key and switch
| | 03:27 | over to our wireframe view, just so
that we can see clearly what is going on.
| | 03:32 | To make our pinning look at least a
little believable, we will probably want to
| | 03:35 | select at least two vertices in the
vicinity of this ball with which to work.
| | 03:40 | More of course would give us a better effect.
| | 03:43 | In this case, there are three or four
likely candidates that we can choose.
| | 03:47 | They could, however, perhaps do with a
little editing before being made use of.
| | 03:53 | What I need to do is just move them
around a little, so let's just select them
| | 03:57 | one at a time of course, enable the
Move tool by pressing the W key, and then
| | 04:01 | just position them in a most suitable
location--that is, a little closer to the
| | 04:06 | pole or upright object that
we want them to appear pinned to.
| | 04:12 | We do of course need to be careful here
that we are only moving along a flat XY
| | 04:16 | plane; we don't want our vertices
to drift up or down in 3D space.
| | 04:21 | With our edits done, we can select a
group of vertices and then over in the
| | 04:26 | Command panel, we can
click on the Make Group option.
| | 04:28 | It is the group that we will
be assigning our constraint to.
| | 04:34 | It is of course always a good idea to
give our groups descriptive names, so in
| | 04:38 | this case, let's use
Front_Left_Pinned and then just click OK.
| | 04:45 | Now of course, we are ready to
apply our constraint to the group.
| | 04:49 | As we said, a simple pin will work just
fine for what we want to accomplish here,
| | 04:53 | so let's click that option.
| | 04:54 | Now, we have essentially locked our
vertices in 3D space, although we have taken
| | 05:01 | a little bit of time to make it
appear as if we've pinned them to our pole.
| | 05:06 | We do of course need to repeat this process
for the other three corners on our cloth object.
| | 05:10 | We need to name out groups
accordingly and edit the vertices as we go.
| | 05:16 | With the editing completed, we can now
switch back over to our target's close-up
| | 05:21 | camera, we can hit the F3 key to get
back into a shaded view, and then we can
| | 05:26 | right-click our mCloth object and using
the Quad menu, return to the top level
| | 05:31 | of our modifier stack.
| | 05:33 | Now when we run the simulation, our
cloth object, as you can see, is pinned in
| | 05:38 | place, and it clearly interacts very
nicely with the dynamic rigid bodies
| | 05:43 | present in the scene.
| | 05:45 | Something we will need to do of course
is set up the physical properties of our
| | 05:49 | mCloth object correctly, which
is exactly what we will do next.
| | Collapse this transcript |
| Setting up the hammock's physical properties| 00:00 | The physical properties we assign to
objects inside any kind of simulation will
| | 00:05 | always play a big part in determining
the behavior and believability of those
| | 00:09 | objects as they simulate.
| | 00:11 | Before we get into lots of
micro-tweaking regarding other aspects of an mCloth,
| | 00:15 | or indeed any MassFX simulation, we do
need to spend some time considering and
| | 00:20 | then setting up the
physical properties of our objects.
| | 00:24 | In this video we will take a quick
overview of the mCloth physical property
| | 00:28 | options available to us.
| | 00:30 | Let's select our mCloth object then
and come over to the Command panel.
| | 00:35 | If we scroll down a little in our mCloth
modifier properties, you can see we have
| | 00:39 | a Physical Fabric Properties rollout.
| | 00:42 | The first option, Gravity Scale, is a
multiplayer for the gravitational force in the scene,
| | 00:48 | assuming of course that we do
have global gravity enabled.
| | 00:53 | This is a value we would increase
if we, for instance, needed to simulate
| | 00:56 | something like the effect of wet or heavy cloth.
| | 00:59 | Typically though, we will
leave this value set at 1.0.
| | 01:02 | Density is the weight of our Cloth object
measured in grams per square centimeter.
| | 01:09 | Now it is important that we take note
of that fact, that this measurement is in
| | 01:14 | grams per square centimeter.
| | 01:16 | Now, the value we set here takes effect
mainly when a cloth object collides with
| | 01:20 | other dynamic bodies in the simulation.
| | 01:24 | The ratio of our mCloth object's mass
compared to that of the body it collides
| | 01:28 | with will determine the extent to
which our mCloth object affects the other
| | 01:33 | dynamic object's motion inside the simulation.
| | 01:36 | In this instance we want our cloth to
behave as if it has a cotton weight off
| | 01:40 | 250 g. This means we will need to
set our Density value to 0.0250.
| | 01:49 | Remember, this particular field uses
values in grams per square centimeter,
| | 01:54 | whereas fabric in the metric
system is measured per square meter.
| | 01:59 | That's why we need to just do
that little shift in decimal places.
| | 02:02 | Our next two object properties
really do speak for themselves, in terms of
| | 02:07 | describing what it is that they do.
| | 02:10 | Stretchiness controls how easily
our cloth will stretch, and Bendiness
| | 02:14 | determines how easily our cloth will
bend, or perhaps fold would be a more
| | 02:18 | accurate description.
| | 02:21 | The Ortho Bending option gives us
really an alternative method for
| | 02:24 | calculating cloth bend.
| | 02:27 | This method can be more accurate
inside a simulation, but oftentimes it will
| | 02:31 | take longer to simulate.
| | 02:33 | For this reason we may want to do a
little testing with this option both enabled
| | 02:37 | and disabled to determine which
will suit our current simulation needs.
| | 02:42 | Damping controls the springiness of
our cloth, affecting the time it will
| | 02:46 | take it to come back to a resting
position when it has gone through a
| | 02:50 | flapping or snapping motion.
| | 02:52 | Friction determines the extent of course
to which our cloth resists sliding when
| | 02:56 | it collides either with
itself or with other objects.
| | 03:00 | And finally, our two compression controls
really determine the behavior of our cloth edges.
| | 03:06 | Limit controls the extent to which
cloth edges can compress or crumple.
| | 03:11 | Stiffness determines the extent to
which our cloth edges will resist
| | 03:15 | compression or crumpling.
| | 03:17 | Now that we have an idea of what the
physical properties options are about and
| | 03:21 | with that simple change to our physical
properties applied, it's time to put our
| | 03:26 | final tweak in place that will
really mean our hammock is ready for work.
| | 03:31 | With Cloth objects, we generally want to
let them settle into a usable shape and
| | 03:36 | then capture that shape to be used as the
starting point of a simulation, or in a simulation.
| | 03:42 | As you can see, a straight or flat
geometric plane does not make a believable
| | 03:47 | cloth object as the simulation starts.
| | 03:50 | To get this set up we will make use of
a piece of MassFX functionality that
| | 03:54 | we have already looked at. This would be
our start simulation without animation option.
| | 03:58 | Now if we just enable that and then
let our simulation run until the cloth
| | 04:04 | settles down and is relatively still, we
can then stop the simulation and coming
| | 04:10 | over to the Command panel, we can come
into our Capture States rollout and just
| | 04:14 | click the Capture Initial State button.
| | 04:18 | This of course captures the current
state of our selected piece of geometry and
| | 04:22 | sets this as the default or starting
point inside the simulation for it.
| | 04:28 | Of course if we want to back up and
start again, we can just use the Reset
| | 04:32 | Initial State button and our
Cloth object returns to its original
| | 04:36 | unsimulated shape.
| | 04:38 | If we now just run our simulation
again, this time of course with animation
| | 04:42 | enabled, we do still get a bit of a
drop as the simulation kicks in, so we will
| | 04:47 | need to allow for that in any timing
that we set up as the simulation get
| | 04:51 | started. But I am sure you'll agree that
as a starting point for a Cloth object,
| | 04:55 | what we have here is much more usable
than a perfectly flat geometric plane.
| | 05:02 | With the physical properties set up then,
we will need to move on to determining
| | 05:05 | just how our mCloth object will
interact both with itself and other dynamic
| | 05:10 | objects inside the simulation.
| | 05:12 | In our next video we will do this by
taking a look at the parameters available
| | 05:16 | inside the mCLoth Interaction rollout.
| | 05:20 | With the physical properties set, we
would next need to move on to determining
| | 05:24 | just how our mCloth object will
interact, both with itself and other dynamic
| | 05:29 | objects inside the simulation.
| | 05:32 | In our next video we will do this by
taking a look at the parameters available
| | 05:36 | inside the mCloth Interaction rollout.
| | Collapse this transcript |
| Working with the mCloth interaction controls| 00:00 | Up to this point in our chapter, we
have looked at how we apply an mCloth
| | 00:04 | modifier to geometry; we have worked a
little with constraints, specifically
| | 00:09 | pinning; and we have taken an overview of
the physical fabric properties that are
| | 00:14 | so important when it comes to ensuring
that our cloth behaves appropriately.
| | 00:18 | What we need to look at now are
mCloth's interaction controls.
| | 00:22 | These determine how mCloth interacts
with both itself and any rigid body objects
| | 00:29 | it comes into contact
with during the simulation.
| | 00:33 | First though, let's just take a quick look
at what we have here in terms of scene setup.
| | 00:38 | We have our cloth object, which
is an editable poly with an mCloth
| | 00:42 | modifier applied to it.
| | 00:43 | No mCloth parameters have been
altered as of yet, so what we see here are
| | 00:48 | all default settings.
| | 00:50 | We also have a number of static rigid body
objects with which our cloth can collide.
| | 00:56 | These have all had their
physical shape set to Original.
| | 00:59 | Now, if I just run the simulation without
animation, we can see how the setup is working.
| | 01:05 | To get an idea then of how the
interaction options available tools will work,
| | 01:11 | let's, with our Cloth plane selected, go
over to the Command panel and then open
| | 01:15 | up our mCloth Interaction rollout.
| | 01:19 | The first option we come across, the
Self Collisions checkbox, is again hopefully
| | 01:24 | fairly self-explanatory.
| | 01:25 | With it on, our mCloth object will
attempt to prevent any kind of self-
| | 01:30 | intersection or self-penetration.
| | 01:32 | Now despite what we may initially think,
it may not always be necessary to have
| | 01:37 | this option enabled.
| | 01:38 | When we are dealing with simple cloth
motions, we may be able to save some
| | 01:44 | processing power by
leaving this option disabled.
| | 01:46 | In fact, if we just run our simulation
with Self Collisions enabled and then
| | 01:54 | reset disable Self Collisions and run
again, you can see we have no discernible
| | 02:01 | difference in terms of the
cloth motion we are getting.
| | 02:04 | It is a good idea to lighten
the calculation requirements for a
| | 02:08 | simulation whenever we can,
| | 02:10 | so maybe some quick tests with this
option both on and off might be appropriate.
| | 02:16 | Just below the checkbox, we
have a Self Thickness value.
| | 02:18 | This determines, or sets, the
thickness of our mCloth object in connection
| | 02:24 | with self-collisions.
| | 02:26 | If we find our cloth is intersecting
with itself, we may want to try increasing
| | 02:30 | this value just a little.
| | 02:32 | We do need to be careful though, that
things don't start to look unrealistic by
| | 02:36 | pushing this value too high.
| | 02:39 | Folded or crumpled cloth looks very
strange indeed when the folded surfaces
| | 02:43 | refuse to come into contact with one
another, which is what can happen if we push
| | 02:48 | this value too much.
| | 02:50 | We next come to a range of controls
that will all affect how our mCloth object
| | 02:56 | interacts with rigid bodies in the simulation.
| | 02:59 | The first option again is a simple
on/off checkbox, Collide to Rigid Objects.
| | 03:04 | With this on, our mCloth object can
interact with rigid bodies; with it off
| | 03:09 | of course, it cannot.
| | 03:10 | Let's just disable this and run the
simulation to show you the effect this has.
| | 03:15 | As you would expect, our cloth now
completely ignores the rigid bodies
| | 03:19 | inside the simulation.
| | 03:22 | Just below the checkbox,
we again have a Thickness value.
| | 03:25 | This really determines how far a
cloth vertex needs to be from a rigid body
| | 03:30 | object before a collision is counted.
| | 03:33 | Again, we need to be careful with this
value, as we can make things look unrealistic.
| | 03:37 | In fact, if we just set this to a
very high value of 20 and then run the
| | 03:42 | simulation, you can see how a collision
is detected long before our cloth object
| | 03:47 | gets visually anywhere
near the rigid body objects.
| | 03:51 | Before we move on of course, I do
want to undo that thickness change.
| | 03:55 | Our next two options determine the
extent to which our mCloth objects can affect
| | 04:01 | rigid bodies inside the simulation.
| | 04:04 | The Push Rigid Objects checkbox
enables or disables our mCloth objects'
| | 04:09 | ability to not only collide with, but also
effect or push rigid bodies inside the simulation.
| | 04:16 | If we want our rigid bodies to collide
with, but not be affected by, the mCloth
| | 04:21 | object then we can just
simply turn this option off.
| | 04:25 | The Push value determines the strength
or force that our mCloth object can apply
| | 04:30 | to the rigid bodies that it collides with.
| | 04:34 | The Attach to Colliders option gives us
the ability to create a very interesting
| | 04:38 | effect with our mCloth objects.
| | 04:41 | Essentially, we can attach or stick our
mCloth to any rigid bodies it comes into
| | 04:46 | contact with inside the simulation.
| | 04:49 | If I just use the P key to switch my
viewport over to a perspective view and
| | 04:53 | then just reposition our cloth
object using the Move tool and using the
| | 04:57 | middle-mouse button, reposition our view,
| | 05:01 | if we now run the simulation, you can
see once our cloth object comes into
| | 05:05 | contact with the stand, after a
moment or two, it simply slides off.
| | 05:10 | However, if we reset the simulation and
then enable Attach to Colliders, this
| | 05:15 | time, rather than sliding off, our mCloth
object now sticks or attaches to the rigid body.
| | 05:22 | The Influence value will determine how
much of an effect our mCloth object has
| | 05:26 | on any rigid bodies that it attaches to,
whilst the Detach Past option will determine
| | 05:32 | how far the cloth can stretch before it
actually detaches from the rigid body.
| | 05:37 | Clearly, the settings in our
interaction controls will play a big part in
| | 05:41 | determining how mCloth
objects in the simulation behave.
| | 05:46 | Some of them of course are and
probably should be subtle in their effect. All
| | 05:50 | this, such as the Attach to Colliders
option, can dramatically and very visually
| | 05:55 | alter the behavior of our mCloth objects.
| | 05:57 | In our next video, we're going to see
how we can tackle the common production
| | 06:02 | requirement of attaching or fixing
simulated cloth to an animated object.
| | 06:07 | This means we will be going back and
revisiting mCloth constraint options with
| | 06:12 | this particular need in mind.
| | Collapse this transcript |
| Attaching the hammock to animated objects| 00:00 | We have already in this chapter seen
how we can lock portions of an mCloth
| | 00:04 | object in place by pinning a
vertex subobject selection.
| | 00:09 | However, because of the way that
pinning works--that is, locking vertices to
| | 00:13 | fixed points in world space--it
would really be of no use to us with our
| | 00:18 | current scene setup.
| | 00:20 | If I just come down and hit the Play
button on our animation controls, you can
| | 00:24 | see that each of our hammock
platforms are in fact animated.
| | 00:28 | Maybe the term animated is a little
grandiose for these simple motions, but you
| | 00:33 | get the idea: the platforms are moving.
| | 00:36 | Let's take a look first of all at what
would happen if we were to use the pin
| | 00:40 | constraint with our current setup.
| | 00:43 | To do that, let's bring up the Select
Camera dialog by using the C key on the
| | 00:47 | keyboard and then selecting the
Target_CloseUp camera from the list.
| | 00:51 | Now, if I just select the hammock
geometry, you can see that it already has an
| | 00:57 | mCloth modifier applied to it.
| | 00:59 | And if I just come down to Vertex
subobject level and scroll down a little
| | 01:04 | in the options, you can also see that
we've created four groups and applied a
| | 01:08 | pin constraint to them,
| | 01:10 | although if we select one of the
groups and scroll down a little further, you
| | 01:14 | can also see that these
constraints are disabled.
| | 01:18 | In fact with things as they stand,
let's see what happens if we exit subobject
| | 01:23 | mode and then run the simulation with animation.
| | 01:28 | As you probably have it guessed, the
platforms do move inside the simulation and
| | 01:32 | our mCloth object falls onto the stand.
| | 01:34 | Let's see what happens now if we jump
back into subobject mode and then switch
| | 01:40 | those pin constraints on.
| | 01:42 | So we do need to select one of the
groups on the list and then in the Group
| | 01:45 | Parameters rollout,
let's put a check in the On box.
| | 01:49 | Now we do of course need to repeat this
procedure for the other three groups as well.
| | 01:56 | With that done, we can exit subobject
mode and then again run the simulation.
| | 02:00 | Now as you can see, our cloth is indeed
pinned, but it obviously does not come
| | 02:05 | along for the ride with the platforms.
| | 02:08 | As we have noted, pin locks a vertex or
group of vertices to specific points in
| | 02:13 | 3D space, not to any geometry.
| | 02:16 | To accomplish what we really need here,
we will have to use a different kind of constraint.
| | 02:23 | Let's go back to the vertex level
of our mCloth modifier and select the
| | 02:27 | first group in our list.
| | 02:28 | Now as we select the group, if we
take a look in the viewport, you can see
| | 02:32 | that this also selects the associated vertices
for the group, or as in our case, a single vertex.
| | 02:38 | What we can do now is come up and
make use of the Delete Group button.
| | 02:43 | Then, as our vertex is still selected, we can
straight away just hit the Make Group button.
| | 02:51 | We need to give the group a name,
so I will call this Node01 and click OK.
| | 02:57 | Now we need to assign a constraint to
the group. In this case we want to use the
| | 03:02 | Node Constraint, so let's click that option.
| | 03:05 | The next step is critical, as we now
need to select the node or object in the
| | 03:10 | scene that we want to constrain our
vertex or group of vertices to. In this
| | 03:15 | case we want to use the related support pole.
| | 03:19 | Once we click that, we can see
each name appear next to the group.
| | 03:23 | Again, we need to repeat this
process for the other three groups.
| | 03:29 | With that done, we can exit
subobject mode and again run the simulation.
| | 03:34 | This time our cloth does come along for
the ride, and as you can clearly see, is
| | 03:39 | still able to interact with any
dynamic rigid body objects in the simulation.
| | 03:45 | As with rigid body constraints, mCloth
has a number of options available that can
| | 03:49 | be used to suit a variety of
scene and simulation needs.
| | 03:54 | In the next video we will take a look
at creating one often-requested cloth
| | 03:58 | effect, one that can only be created in
mCloth by making use of its constraint system.
| | 04:03 | This would be tearing.
| | Collapse this transcript |
| Putting a rip in mCloth| 00:00 | One very cool feature that has been
added to the MassFX toolset in recent
| | 00:04 | updates is the ability of mCloth
objects to have tears appear in them when
| | 00:08 | certain forces and/or
collisions are applied to them.
| | 00:12 | Not only does this feature work very nicely
in mCloth, but it is also very easy to use.
| | 00:18 | The first step of course is
to add an mCloth modifier.
| | 00:21 | I am going to do this by holding down
the Shift and Alt modifier keys and then
| | 00:25 | right-clicking in the viewport.
| | 00:27 | From the quad menu, I just want to
select the Create mCloth command.
| | 00:32 | This of course applies an mCloth
modifier to the geometry, but you will
| | 00:35 | also notice that we are instantly switched
into the Modifier tab of the Command panel.
| | 00:40 | This means we can instantly
begin to edit our cloth parameters.
| | 00:44 | Before we go any further however,
I just want to demonstrate the current scene
| | 00:48 | setup that we're working with here.
| | 00:50 | Let's come down to our
animation controls and press Play.
| | 00:54 | As you can see, our two upright poles
begin to move away from one another,
| | 00:58 | ultimately ending up at
opposite edges of our stand geometry.
| | 01:02 | The idea of course is to attach our
cloth to these uprights and create a tear as
| | 01:07 | the cloth is pulled apart by the moving poles.
| | 01:10 | The first thing we need to do
then is attach our cloth to them.
| | 01:14 | To do this we of course need to enter
subobject mode on our mCloth modifier
| | 01:19 | and make a selection.
| | 01:20 | In this case I'm just going to
marquee-select those two columns of vertices
| | 01:24 | adjacent to our pole.
| | 01:25 | Then we can use the Make Group button,
give our selection an appropriate
| | 01:31 | name, and then click OK.
| | 01:33 | As our poles are animated, we will need
to make use of the node constraint here,
| | 01:39 | so let's again click that button and
then of course select the upright that we
| | 01:43 | want to constrain our vertex selection to.
| | 01:46 | When that is done, we need to repeat
this process for the opposite side.
| | 01:50 | Give our group an appropriate name.
| | 01:52 | We want to use the node
constraint, so let's click that option.
| | 01:57 | With the cloth edges constraint we now
need to create a tearable area on our
| | 02:01 | cloth, a selection that lets MassFX
know where the weak spot on the cloth
| | 02:05 | object is supposed to be.
| | 02:09 | In this particular instance, I'm just
going to select a few rows in the middle
| | 02:11 | of our cloth. We could though
place this selection anywhere we like.
| | 02:15 | Now this time instead of clicking the
Make Group button to create a regular
| | 02:19 | constraint, we want to use the
clearly marked Make Tear button.
| | 02:23 | we will need to give our tear group a
meaningful name. More often than not
| | 02:27 | we will add multiple tears to a piece of
geometry in order to get a realistic effect.
| | 02:32 | Being able to quickly tell the
various tear groups apart can be important.
| | 02:37 | With those steps complete what we
have essentially done is broken apart the
| | 02:41 | vertices in our selection group and
added a weld constraint back on top, so as
| | 02:47 | to make it appear as if we're dealing
with a single piece of cloth or geometry.
| | 02:52 | If we exit subobject mode now, we
can add the last couple of tweaks to the
| | 02:56 | modifier controls themselves.
| | 02:58 | Firstly, in the Physical Fabric
Properties rollout, we want to set our
| | 03:02 | Stretchness value to 0.01.
| | 03:07 | We do then of course need to scroll
down to the Tearing rollout and tell the
| | 03:11 | system that we want to make
this piece of cloth tearable.
| | 03:14 | With Allow Tearing enabled, let's make
certain that our Tear Past value is set to 1.5.
| | 03:20 | This tells the cloth how far it can
stretch before any tearing occurs.
| | 03:25 | If we now set our simulation running,
once the tear does occur, we can see that
| | 03:33 | we are clearly getting a result
that looks a little unnatural.
| | 03:37 | Cloth very rarely will tear in
perfect straight-edged strips or chunks as we
| | 03:42 | have seen it do here.
| | 03:44 | We really need to set up our
cloth geometry a little differently.
| | 03:48 | To show you what I mean let's first of
all reset the simulation and then open up
| | 03:52 | our 3ds Max Layer Manager.
| | 03:55 | In here we want to select our Tearable
Cloth Quads layer and then use the tools
| | 04:00 | to make certain that all of the
objects on that layer are selected.
| | 04:04 | Once they are, we can just hit
the Delete key to get rid of them.
| | 04:08 | We will probably want to
also delete the layer itself.
| | 04:13 | To add a new cloth object into the
scene, we just need to unhide our
| | 04:17 | Tearable Cloth GM layer.
| | 04:19 | This layer contains a cloth object that
instead of standing out life as a plain
| | 04:23 | primitive, as that of our first cloth object,
| | 04:25 | it started instead as a rectangular shape.
| | 04:29 | This was a deliberate switch that
allowed us to use a garment maker modifier to
| | 04:33 | add detail to the cloth,
| | 04:35 | instead of the standard geometry
subdivisions that were being used by our plane.
| | 04:39 | Now before we can do anything with our
new cloth object, we will of course need
| | 04:44 | to add our mCloth modifier and
re-create our node constraints.
| | 04:47 | Let's add the modified from the MassFX
toolbar and then coming across to the
| | 04:54 | Command panel, we can
enter subobject vertex mode.
| | 04:58 | From here we want to again create a
selection that we can constrain to our
| | 05:02 | upright poles, so we'll just make a
marquee selection of a couple of columns at
| | 05:06 | the end of our cloth object, use the
Make Group button, and again give our group
| | 05:10 | an appropriate name. And then of
course we can apply the note constraint and
| | 05:15 | again select the appropriate upright.
| | 05:17 | Then of course repeat the
process for the opposite side.
| | 05:22 | Select those two columns of vertices,
use the Make Group button, give our
| | 05:27 | selection an appropriate name, and then click OK.
| | 05:32 | We will of course need to also re-create
our tear, so let's again select a chunk
| | 05:37 | of vertices around about the center of
our cloth geometry, click the Make Tear
| | 05:41 | button, and give our group an appropriate name.
| | 05:46 | With that done we are ready to exit
subobject mode and then run the simulation again.
| | 05:53 | This time around, once our cloth does
tear, we can see that it has a much more
| | 05:58 | believable ragged edge to it now.
| | 06:01 | As you can see then, creating
tearable mCloth is a pretty straightforward
| | 06:06 | process, one that can produce some very
nice results if we take the time to make
| | 06:10 | good use of the tools available to us.
| | Collapse this transcript |
| Using mCloth to create a rope object| 00:00 | We have already noted that one of the
big complaints in connection with the
| | 00:04 | removal of Reactor in 3ds Max was the
fact that users no longer have the means
| | 00:08 | to create simple rope objects that
could be used in dynamic simulations.
| | 00:13 | In this video, we're going to step
through the process of creating a simple rope
| | 00:18 | object using the mCloth modifier.
| | 00:19 | Before we get started here, it is
important to note that this particular option
| | 00:25 | for creating a rope object, whilst
potentially very useful for our background or
| | 00:29 | distance objects, does have some,
or at least one, very serious limitation
| | 00:34 | which we will demonstrate as we move along.
| | 00:37 | As you can see, our style scene
once again consists of a number of
| | 00:41 | suspended cylinders,
| | 00:42 | although this time we do have
something a little different in the form of an
| | 00:46 | animated collider object in the scene.
| | 00:48 | If I just press the Play button in
our animation controls, you see our box
| | 00:52 | simply travels across the
screen, moving from right to left.
| | 00:56 | To get started on our rope object,
let's first of all select one of the
| | 01:00 | cylinders and apply an mCloth modifier to it.
| | 01:04 | If we straight away run the simulation
without animation, you can see we do get
| | 01:09 | some very strange behavior coming
from our newly created cloth object.
| | 01:13 | Rather than falling down and crumpling
in a heap as a piece of cloth probably
| | 01:19 | should, we get this long pause and then
a long, slow, very rough-looking collapse.
| | 01:26 | What we are seeing is essentially a
geometry problem, or to be more specific, a
| | 01:31 | lack of geometry problem.
| | 01:33 | If we just jump into the modifier stack
and come down to the cylinder level,
| | 01:38 | you can see we are working with
a low level of geometric detail.
| | 01:42 | We can alter this by setting our
Height segment to a value of 55.
| | 01:48 | If we run the simulation again,
you see that we get something much more
| | 01:51 | cloth-like in behavior.
| | 01:53 | However, we do also immediately see
the serious drawback of mCloth for this
| | 01:59 | particular use, namely its complete
lack of volume preservation in the mesh.
| | 02:04 | The one mCloth feature that we may
instantly think about trying is the ability
| | 02:10 | to set an internal pressure for a soft
body object. Or, to use MassFX speak, we
| | 02:16 | may try enabling the Balloon Behavior feature.
| | 02:18 | In fact, let's do this by scrolling
down to the Volume Properties rollout
| | 02:23 | and putting a check in the
Enable Balloon Behavior checkbox.
| | 02:28 | Let's then set the Pressure value to 1 and
see what happens if we again run our simulation.
| | 02:35 | As you can see, enabling this option
doesn't appear to preserve our rope
| | 02:39 | object's volume in any useful way,
certainly not on this type of simulated motion.
| | 02:45 | Although, if with the simulation still
running, I just bump the Pressure value
| | 02:49 | up to 6, you can see we do somewhat
get an effect that looks a little like a
| | 02:54 | hose filling with air or water maybe.
| | 02:58 | Be that as it may however, a rope
object created with mCloth is clearly not
| | 03:02 | suited to creating a falling
rope that coils on the floor.
| | 03:06 | But it can in some instances serve very
well, especially as background motion in
| | 03:11 | a shot, maybe as a hanging object that
needs to interact with rigid bodies in
| | 03:15 | the scene such as our box collider.
| | 03:19 | To get our rope object to interact with
this collider, we do once again need to
| | 03:23 | make use of mCloth's pin constraint.
| | 03:25 | Let's jump to vertex
level in our mCloth modifier.
| | 03:28 | Now, if I just hit the C key and
switch over to my Main_View camera, you see
| | 03:34 | we're now able to select the top,
or top couple, of the text rows.
| | 03:38 | Then we can come over and use the
Make Group function, give our group a
| | 03:43 | name, and then click OK.
| | 03:44 | Now, of course, we're ready to
apply our pin constraint to the group.
| | 03:48 | With that done, let's come out of
subobject mode and switch back to our
| | 03:54 | Target_CloseUp camera.
| | 03:57 | Of course, the rope object won't
interact with our collider just yet because we
| | 04:01 | haven't set our collider up
as a kinematic rigid body.
| | 04:04 | So, let's select it, and from the
flyout on the MassFX toolbar, let's apply a
| | 04:09 | Kinematic Rigid Body.
| | 04:11 | And if we run the simulation now, you
see our rope object interacts very nicely
| | 04:16 | with the box, swinging to and
fro in a very rope-like manner.
| | 04:20 | Now while it's clearly not the highest
quality, nor the most flexible option
| | 04:25 | available for creating a rope object in
MassFX, we hopefully can see how using
| | 04:30 | mCloth could give us a very quick, easy,
and usable option for certain types of
| | 04:35 | shots or motions that we
may be called upon to create.
| | 04:39 | Although in this particular case
mCloth's Balloon Behavior feature didn't
| | 04:43 | really help us out much, in our next
video, we will take a look at how it can
| | 04:48 | help us create a usable soft
toy object for our simulations.
| | Collapse this transcript |
| Creating a soft body object| 00:00 | Although given a name that
outlines its most likely usage, the mCloth
| | 00:05 | modifier is capable of creating soft
body effects that can go a little beyond
| | 00:09 | creating standard cloth.
| | 00:11 | In this video, we will in fact use mCloth to
turn our toy geometry into a soft body
| | 00:16 | object that can be dynamically
simulated without looking as though it has had
| | 00:20 | the stuffing knocked out of it.
| | 00:22 | As you can see, if I just select our
toy geometry, it is a straightforward
| | 00:26 | editable poly object with an
mCloth modifier applied to it.
| | 00:30 | If I just run the simulation with
mCloth default settings, you can see our
| | 00:35 | simulated toy appears to be lacking
a little in terms of internal volume.
| | 00:39 | What little volume retention we appear
to have at this moment in time is mostly
| | 00:44 | a byproduct of our compression settings.
| | 00:47 | If we just come over to our Physical
Fabric Properties rollout and set both of
| | 00:51 | our compression options to 0, you can
see, once we resimulate, what we get now
| | 00:57 | looks just like an empty cloth object.
| | 01:00 | Of course, if this is the effect
that we want, we are in good shape.
| | 01:04 | But what if we wanted something that a
little more obviously holds its general
| | 01:07 | shape and internal volume?
| | 01:10 | Let's add some stuffing to our toy by
making use of mCloth's Balloon Behavior option.
| | 01:16 | To enable this, we need to come into
the Volume Properties rollout and put a
| | 01:20 | check in the Enable Balloon Behavior option.
| | 01:24 | We also want to set the
Pressure to a value of 2.
| | 01:27 | If we run the simulation now, you can
see we do have something that looks a
| | 01:31 | little more substantial in the inside.
| | 01:34 | Of course, we don't want to stop here,
because we can set up other mCloth
| | 01:38 | properties that will
contribute to our final effect.
| | 01:42 | Back in the Physical Fabric Properties
rollout, let's set our Density to 1.0.
| | 01:48 | Then we need to reset our compression
values, so let's set these to 0.5 each.
| | 01:53 | We might even want to make our toy appear
to be made of a little heavier material.
| | 01:58 | In this case, remember, rather than
increasing the Density, we want to increase
| | 02:02 | the Gravity Scale for our object.
| | 02:04 | Let's set this to a value of 5.
| | 02:08 | Now, when we simulate, you can see we
are closing in on a pretty nice effect.
| | 02:13 | One thing we will probably want to do
is capture the state of our object once
| | 02:18 | the Balloon Behavior has taken
effect inside the simulation.
| | 02:21 | You will have noticed that it seems
to take a few frames before our toy
| | 02:25 | inflates to its final size.
| | 02:27 | To do that, let's just
advance the simulation to frame 2.
| | 02:30 | And then coming over to the Capture
States rollout in the Command panel, we can
| | 02:35 | hit the Capture Initial State button.
| | 02:37 | We've now set this as the starting
point in the simulation for our geometry.
| | 02:43 | We may also want to just lift our
object a little higher closer it to its
| | 02:47 | original starting point.
| | 02:49 | As a final test, I just want to quickly
jump over to my main camera view, so I
| | 02:53 | will press C on the keyboard and
then select that option from the list.
| | 02:56 | And then I want to select the sphere
that we have hidden just out of camera view.
| | 03:01 | This currently has a disabled
dynamic rigid body modifier applied to it.
| | 03:06 | And if I just come into the modifier
stack, I can enable that, then jump back to
| | 03:10 | my close-up camera, and then run the simulation.
| | 03:13 | Now, as you can see, our Cloth object
interacts pretty nicely with this heavy
| | 03:19 | dynamic rigid body object.
| | 03:21 | All in all, the end result is not looking
too bad at all, especially for a quick setup.
| | 03:27 | One final option we may want to enable
when working with mCloth, if we have the
| | 03:31 | hardware for it, is the Hardware
Acceleration option found down at the bottom of
| | 03:36 | our mCloth modifier
properties in the Advanced rollout.
| | 03:40 | This enables GPU computing
for our soft body calculations.
| | 03:44 | And even if we only get a little bit
of extra speed from the simulation,
| | 03:48 | certainly every little bit helps.
| | Collapse this transcript |
|
|
6. Using Forces with MassFXAdding forces to a simulation| 00:00 | If the ability to use forces in 3ds Max
as part of a MassFX dynamic simulation
| | 00:06 | is not something that we see
as a particularly big deal,
| | 00:09 | hopefully this video will redirect
our thinking a little and show us just
| | 00:14 | why this functionality is an extremely
important and indeed powerful part of
| | 00:18 | the simulation process.
| | 00:19 | As we look at the two objects we have
present in our scene, which of course are
| | 00:24 | just rough representations
of a feather and a brick,
| | 00:27 | we may instantly have certain
expectations about how they ought to behave if
| | 00:33 | dropped from their current position.
| | 00:34 | Most of us will be well aware that a
brick or a large stone when dropped tends
| | 00:39 | to travel pretty quickly.
| | 00:41 | By comparison, a feather or something
equivalent in mass such as a small piece of
| | 00:45 | paper seems to almost
meander its way to the ground,
| | 00:48 | taking much more time to get
there then our brick or stone.
| | 00:52 | In an environment subject to gravity,
these two objects should fall at
| | 00:56 | exactly the same rate.
| | 00:58 | And indeed, if I run the simulation, you can
see this is exactly what happens in MassFX.
| | 01:03 | Of course, whilst this may be technically
correct, to our eyes this just looks all wrong.
| | 01:11 | Now we may be wondering whether or not
the problem is being caused by poor setup
| | 01:15 | of our object's physical
properties in the simulation.
| | 01:18 | Could it be that we just need to
accurately set the mass and density values in
| | 01:22 | our modifier options?
| | 01:24 | Let's try doing that and
see if it makes a difference.
| | 01:28 | First of all, let's select our brick
and in the physical material rollout, let's
| | 01:32 | set its Mass to a volume of 2.75 kg.
| | 01:36 | This is a mass of standard UK house brick.
| | 01:39 | Then, if we select our feather, we can
set its Mass to a value of 0.01 kg.
| | 01:46 | Now, this of course is somewhat higher
than a feather typically would be, but it
| | 01:50 | gives us a nice simple value with
which to work, and of course the setting is
| | 01:54 | still way below the mass that
we have applied to or brick.
| | 01:57 | With that done, let's runs the simulation again.
| | 02:00 | As you can see, our objects
still fall at exactly the same rate.
| | 02:05 | The problem is that our scene lacks
any kind of atmospheric friction or drag,
| | 02:10 | which is of course always
present in the real world.
| | 02:13 | Because air has density, it creates friction.
| | 02:17 | So, if we want realism in our
simulations, if we want our objects to fall in a
| | 02:22 | believable manner, we need to
re-create this real-world occurrence.
| | 02:27 | This then, is where the addition of
forces to the MassFX toolset becomes
| | 02:31 | extremely important.
| | 02:32 | Let's add some drag to our environment
by coming across to the Command panel.
| | 02:38 | In the Create tab we need to
navigate to the Space Warp section.
| | 02:41 | Here we gain access to a
collection of Space Warp forces.
| | 02:45 | Now, if we don't see forces by default,
we can just access this dropdown and
| | 02:50 | choose Forces from the list.
| | 02:52 | To re-create our atmospheric friction
let's select the Drag Space Warp and
| | 02:57 | then with AutoGrid enabled, we can click and
drag to create the space warp in the viewport.
| | 03:02 | Now, generally speaking, it is not
really important where we place our space
| | 03:07 | warp icon, but I'm just going to drag it up
in the view so as to avoid any potential
| | 03:11 | problems due to it
intersecting with our rigid body object.
| | 03:15 | Next, of course we need to set up our
Space Warp's parameters so as to get the
| | 03:20 | desired effect in our simulation.
| | 03:22 | Let's set the X and Y
Linear Damping values to 0.
| | 03:26 | The up axis really is the only one
that we need to apply drag to for
| | 03:30 | this particular example.
| | 03:32 | If we run the simulation now, you can see
we get no change in our objects behavior.
| | 03:38 | This is because we need to create an
association between the drag force and the
| | 03:42 | objects we are simulating.
| | 03:45 | To do that we can select our brick
and then over in the modifier properties
| | 03:49 | scroll down until we reach the Forces
rollout. And here we can click the Add
| | 03:55 | button, select the Drag Space Warp
in the scene, and we have now created a
| | 03:59 | connection between these two.
| | 04:01 | We naturally need to follow
the same steps for our feather.
| | 04:06 | If we see run the simulation now,
you can see we are clearly getting a reaction,
| | 04:12 | but it would seem that our Z
axis strength value is too high.
| | 04:17 | Let's select the Space Warp then and set
the Z axis linear damping value to 0.005.
| | 04:25 | If we run the simulation again,
you can see things are looking much
| | 04:29 | more promising now.
| | 04:32 | To art direct matters a little here,
we could make our feather heavier so as to
| | 04:36 | have it settle in the view if we want.
| | 04:38 | To do that, let's select it and in the
physical material rollout, set its Mass to
| | 04:44 | a somewhat unrealistic value of 200 grams.
| | 04:47 | This would be 0.20.
| | 04:49 | This of course will force it to
move downward more than across.
| | 04:54 | If we run the simulation now, you see
what we get is looking pretty nice indeed.
| | 05:00 | Without a doubt, creating believable
simulations of real-world objects in MassFX
| | 05:05 | is a complex mix involving a whole
range of settings and parameters.
| | 05:10 | This can include creating accurately
scaled models; applying realistic volume,
| | 05:15 | mass, and density settings; applying
appropriate physical properties, such as
| | 05:19 | bounciness; and of course the addition
of forces to our scenes to mimic real-
| | 05:23 | world environmental effects such as drag.
| | Collapse this transcript |
| Putting forces to practical use| 00:00 | Having demonstrated the basic workflow
for adding forces to a MassFX simulation,
| | 00:05 | in this video, we want to take a look
at for-instance situation that highlights
| | 00:10 | the kind of practical
use we may find for forces.
| | 00:12 | Our scene setup is very simple.
| | 00:15 | We have a number of small plastic
toys lined up in neat rows waiting for
| | 00:19 | something to happen.
| | 00:21 | That something, as you can see, comes
in the form of what is essentially a
| | 00:25 | hammerhead on wheels.
| | 00:27 | This is a construct made up of three
separate pieces of geometry, none of which
| | 00:31 | are linked or grouped in any way.
| | 00:34 | All we have are two MassFX constraints
| | 00:37 | making these three separate
geometries act as a single object.
| | 00:41 | A rigid constraint is keeping the
hammerhead attached to the body, and a hinge
| | 00:46 | constraint is fixing the body
and head to the wheel section.
| | 00:50 | If I just run the simulation, you can see
how the hinge constraint is set up to behave.
| | 00:55 | Over next step of course is to examine
or break down the motion of objects in
| | 01:01 | our simulation and determine what our
expectations are, what type of reaction
| | 01:06 | motions might we expect to see.
| | 01:09 | Our hammerhead has the same mass and
density settings as an average house brick.
| | 01:14 | When it thumps into the deck of the
stand, we probably would expect to see at
| | 01:18 | least some reaction from
our lightweight plastic toys.
| | 01:22 | In the real world, we would get a
transfer of energy from hammerhead to stand
| | 01:27 | and then from stand to toys that should
cause them to react or move in some way.
| | 01:31 | Now unfortunately, MassFX is not currently
able to simulate such transference of energy,
| | 01:38 | but we can easily
simulate the effect using forces.
| | 01:42 | In fact, in this particular instance
we can use one of the simplest of our
| | 01:46 | available force options, push.
| | 01:48 | To add that to our simulation, let's
come over to the Create tab in the Command
| | 01:52 | panel and click on the Space Warps icon.
| | 01:56 | To add the Push force in the scene,
I'm just going to select it, enable AutoGrid,
| | 02:00 | and then click and drag to create
the Push icon at the size I need it.
| | 02:05 | Now the first thing I need to do here
is make certain that I am using enough
| | 02:09 | force to actually get my objects moving.
| | 02:12 | I'm going to set a value of 20 Newtons.
| | 02:15 | That is the amount of force we are
saying the stand will be transferring to our
| | 02:19 | little plastic toys.
| | 02:21 | Not of course that anything would
happen if we were to run the simulation
| | 02:25 | at this point, as we've made no connection
between our toy objects and the push force itself.
| | 02:31 | To do that let's select our first toy
and in its rigid body modifier controls,
| | 02:36 | let's scroll down until we
come to the Forces rollout.
| | 02:40 | Now we can click the Add button and
select our force object in the scene,
| | 02:44 | essentially creating a
connection between the two.
| | 02:47 | Now if I just run the simulation, you
can see, after a few frames, about half of
| | 02:52 | our little toy crowd takes off into
the air while the rest remains still.
| | 02:57 | This is happening because we have two
pieces of instance geometry that make up
| | 03:01 | our little toy crowd.
| | 03:03 | Applying the force to one object
has of course applied it all of that
| | 03:07 | particular geometry's instances.
| | 03:10 | All we need to do to finish things
off here is to select our second toy and
| | 03:13 | apply the push force to that also.
| | 03:16 | Now, when we run the simulation, we can
see that all of our toys take off together.
| | 03:21 | Unfortunately, this is not the effect we
are trying to create here, so clearly, we
| | 03:26 | still need to do a little
bit of parameter tweaking.
| | 03:29 | The first thing we can do is determine
at which frames we want our push force
| | 03:34 | to be in operation.
| | 03:36 | To do that let's run forward a little
in our simulation by pressing the Start
| | 03:40 | button. Then, as our hammer starts
to fall, we can stop it and just step
| | 03:45 | forward frame by frame.
| | 03:48 | As we do that, we can see that the first
contact appears to occur at around about frame 49.
| | 03:53 | So with our Push icon selected,
let's set the On Time for our force to frame 49.
| | 03:59 | Then, as we continue to step forward,
we can see that we probably only need our
| | 04:05 | force to be active for a frame or two,
| | 04:08 | so let's set the Off Time to frame 51.
| | 04:12 | Now when we run the simulation, you can
see our hammer falls, strikes the stand,
| | 04:17 | and of course we get a
reaction from our little toy objects.
| | 04:22 | Naturally, when we are dealing with very
quick motions or reaction motions as we
| | 04:26 | are in this case, it is always going to
be a good idea to generate an animation
| | 04:30 | preview so as to get a clear
idea of how the motion is working.
| | 04:34 | To save some time, I'm just going to
pull up our RAM player which has a couple
| | 04:38 | of previews I prepared
earlier already loaded in.
| | 04:42 | These were created using the
exact settings we have set up here.
| | 04:45 | As you can see, if we play
channel A, our effect looks okay,
| | 04:49 | but we could improve this with
just a little tweak to our scene.
| | 04:55 | All we need to do is simple rotate our
push icon by 10 degrees or so, pointing it
| | 05:00 | away from the hammer's direction of descend.
| | 05:03 | What we would get then, if we
play channel B, would be this.
| | 05:07 | A subtle change, but it
definitely improves our effect.
| | 05:13 | Clearly then, even though the
transference of energy from object to object is
| | 05:17 | not currently something that MassFX
is capable of, we can still add lots of
| | 05:21 | realism to our simulated objects by
using forces to add subtleties of motions
| | 05:26 | that could otherwise get left out and
so throw off the quality of our finished
| | 05:31 | and rendered simulations.
| | Collapse this transcript |
| Using forces with mCloth| 00:00 | For our last look at applying
forces inside a standard MassFX dynamic simulation,
| | 00:05 | I just want to add some nice motion to
the pendants that currently adorn the top
| | 00:10 | of our stand geometry.
| | 00:12 | Having them move around a bit in a
virtual breeze would be a nice addition to the
| | 00:16 | kind of motions that we've
looked at creating so far.
| | 00:18 | Let's hit the P key and
switch over to a perspective view.
| | 00:22 | From here we can orbit around the view
a little until we have a nice clear view
| | 00:26 | of the pendants attached
to the top of the stand.
| | 00:28 | Turning these into mCloth objects is
just a matter of selecting each piece of
| | 00:34 | geometry and then we can jump over into
the Modifier List in the Command panel
| | 00:38 | and add an mCloth modifier.
| | 00:41 | Of course, if we run the simulation at
this point, our new cloth objects would
| | 00:45 | simply fall to the floor,
so a little pinning is in order.
| | 00:49 | Because we have used Instance modifiers
here, we can actually pin all of these
| | 00:54 | cloth objects in one go.
| | 00:56 | So with all of the pendant geometry
still selected, let's click to enter vertex
| | 01:00 | subobject level in our modifier.
| | 01:02 | If we need to, of course, we can just
rotate our view around a little more so as
| | 01:06 | to get a good view of the
area that we want to pin.
| | 01:10 | Next we can marquee-select our vertices, click
the Make Group button over on the Command panel--
| | 01:16 | I'm just going to call this group Pin--
and then of course we can apply the Pin
| | 01:20 | constraint to lock everything in place.
| | 01:23 | It is probably a good idea to run the
simulation at this point, so let's do that,
| | 01:28 | really just to check that our
pinning has worked. We don't want any nasty
| | 01:32 | surprises biting us further down the line.
| | 01:34 | Once we are certain that our pinning has
worked, we will of course need to apply
| | 01:39 | a force to our mCloth objects.
| | 01:41 | The first thing I want to do though is just
press the Alt and W keys to switch over
| | 01:45 | to a four-view setup.
| | 01:47 | This means I can create
the force object in one view--
| | 01:49 | I am just going to use the front--whilst
at the same time keeping an eye on its
| | 01:53 | placement in the scene
using the other three views.
| | 01:57 | To do that I need to come into the
Create panel and to the Space Warps
| | 02:01 | and Forces section.
| | 02:02 | From here, we can select the Wind Space
Warp and then just click and drag in the
| | 02:06 | front view to place it in the scene.
| | 02:08 | I am going to set up our parameters here,
so let's set a Wind strength value of
| | 02:13 | 0.075, the Decay we will leave set to 0,
Turbulence we can set at 0.25, we can
| | 02:22 | add a frequency of 0.01, and
finally we'll have a scale value of 0.15.
| | 02:30 | With those setting dialed in, we can go
ahead and connect our Force and mCloth together.
| | 02:36 | To do that I need to select at least one of my
mCloth objects and then come over to the Command panel.
| | 02:42 | Right at the top of our mCloth modifier 's
properties we have the ability to add forces.
| | 02:47 | Once I click the Add button, I can add
or select my Winds Space Warp directly in
| | 02:53 | the scene or I could use the H key to bring up the
Select from Scene dialog and select the force from here.
| | 02:58 | Before we run the simulation, we do
need to do a little repositioning of our
| | 03:02 | force objects in the scene. We can do
this using both the Move and Rotate tools.
| | 03:08 | Once we have our Winds Space Warp all
set up, we can select our camera view and
| | 03:12 | switch back to our Targets camera.
| | 03:14 | We can use Alt+W to return to
full screen and then run the simulation again.
| | 03:19 | Now, as you can see, our cloth objects are
moving very nicely in our virtual breeze.
| | 03:26 | As we have hopefully demonstrated in
this chapter, using forces with our
| | 03:30 | MassFX objects--be they rigid bodies or
mCloth--really is a very straightforward
| | 03:34 | and simple process.
| | 03:36 | The real challenge is coming up with
creative ways to use this powerful toolset
| | 03:41 | so as to genuinely enhance the final
output coming from our MassFX simulations.
| | Collapse this transcript |
|
|
7. A Brief Introduction to mParticlesWalking through mParticles| 00:00 | With the release of the Subscription
Advantage Pack for 3ds Max 2013, simulation
| | 00:06 | and particle effects artists have
received an extremely powerful set of
| | 00:10 | physics-based simulation tools that
are collectively known as mParticles.
| | 00:15 | Because mParticles offer up such a vast
array of tools and open up such a vast
| | 00:20 | array of options, we will in this
chapter only be able to touch on a tiny
| | 00:24 | fraction of what is possible with this
impressive and powerful set of tools.
| | 00:29 | In this video we want to take a look at
the MassFX flow preset and point out to
| | 00:34 | you the new mParticle operators
that have been added to particle flow.
| | 00:39 | Naturally, the first thing we want
to do is open up Particle view.
| | 00:42 | To do that we can just hit
the 6 key on our keyboard.
| | 00:47 | The first piece of the mParticle toolset we
come across down in the depot is the MassFX Flow.
| | 00:54 | This is basically a quick-start
preset that can get us up and running with
| | 00:58 | mParticles very quickly indeed.
| | 01:01 | If I just left-click and drag, I can add
a MassFX Flow to the event display area.
| | 01:07 | Instantly, not only does this basic flow
show up in the display area, but we also
| | 01:11 | get a working mParticle system in our scene.
| | 01:15 | The cubes we can now see are of course
as a result of the standard particle flow
| | 01:19 | shape operator. The particles we now
see as ticks are as a result of a standard
| | 01:25 | particle flow Grid Birth operator, and
of course, ultimately both of these only
| | 01:30 | show up in the viewport
courtesy of the Display operator.
| | 01:33 | All standard particle flow stuff.
| | 01:37 | The cool thing here is that with
everything enabled, if I just press play in our
| | 01:41 | animation controls, you see we
actually have a self-contained MassFX dynamic
| | 01:47 | simulation working not with
scene geometry, but with particles.
| | 01:53 | The simulation part of this set up is
being handles by the MassFX-specific
| | 01:58 | operators present in the flow:
| | 02:00 | the MassFX shape and the MassFX world operators.
| | 02:04 | If I just disabled each of them in
turn and press play in the animation
| | 02:08 | controls, you can see that the simulation needs
both of them present and enabled in order to work.
| | 02:16 | Not of course that we need to
disable and enable our operators in order to
| | 02:20 | figure out which of them are MassFX-specific.
| | 02:23 | If we take a look down in the depot,
the fact that all of the MassFX operators
| | 02:27 | have the words MassFX in their title and
a big green X in their icons does make
| | 02:33 | them rather hard to miss.
| | 02:34 | Going back to our MassFX Flow,
let's take a quick look at the two essential
| | 02:40 | MassFX operators found there.
| | 02:42 | The MassFX shape operator performs a
function in mParticles very much along the
| | 02:47 | lines of the modifies, both rigid body
and mCloth, that we've been working with in
| | 02:52 | the MassFX dynamic system.
| | 02:55 | If I just click to select it, you see
we have the ability to set the collision
| | 03:00 | shape for our particles, and we can of
course set up physical properties that
| | 03:04 | the particles will make
use of inside the simulation.
| | 03:08 | This operator is very much
akin to a MassFX modifier.
| | 03:12 | The MassFX world operator actually has
no real parameters with which to work, as
| | 03:17 | it really is just the connection
between particle flow and the dynamics driver,
| | 03:22 | or MassFX world, that we see in our scene.
| | 03:26 | If I just select the MassFX world icon
in the viewport, you can see, over in the
| | 03:30 | Command panel we get a wealth of
per-event parameters that essentially control
| | 03:35 | how the dynamic simulation
in that event will behave.
| | 03:39 | In essence, the MassFX world and its
associated parameters can be thought of as
| | 03:44 | the mParticle equivalent of the
MassFX Tools dialog, housing, as it does,
| | 03:49 | parameters that will affect
every aspect of the simulation.
| | 03:54 | The difference here of course, as we have
stated, is that these parameters control
| | 03:57 | the simulation dynamics on a per-event,
rather than completely global, basis.
| | 04:04 | The MassFX Flow preset is of course just
the tip of the iceberg when it comes to
| | 04:08 | creating and working with dynamic
particle simulations in the mParticle system.
| | 04:13 | As well as working with a wealth of
MassFX-specific operators such as Glue,
| | 04:19 | Collision, and Buoyancy, to name just a few,
| | 04:22 | we can also make use of standard
particle flow operators to both augment and
| | 04:27 | influence our dynamic particle simulations.
| | 04:31 | In our next video, we will start to
explore some of the possibilities that open
| | 04:35 | up to us when using the mParticle system.
| | Collapse this transcript |
| Using fracture geometry| 00:00 | We did mention in our opening chapter that
one common use for dynamic rigid body
| | 00:04 | simulations was taking prefractured
geometry and simulating the collapse of
| | 00:09 | solid objects, such as
buildings, bridges, and the like.
| | 00:13 | This effect requires the simulation of
geometry that comes in all shapes and sizes.
| | 00:18 | In order to make use of mParticles to
produce such an effect then, we would need
| | 00:22 | to have the option of using
irregular-shaped geometry in a simulation--not being
| | 00:27 | stuck with standard primitive shapes only.
| | 00:30 | To show that this is indeed
possible, we're going to make use of the
| | 00:34 | prefractured castle turrets that
we have set up in our start scene.
| | 00:39 | To save ourselves a little bit of time
here, if I just hit the 6 key to pull up
| | 00:43 | Particle view, you can see we have
already set up MassFX Flow, which of course
| | 00:47 | also creates a MassFX World helper
in our scene set at the world origin.
| | 00:52 | We have made a single change to the flow.
In this instance we have replaced the
| | 00:56 | Birth Grid operator with a Birth Group.
| | 00:59 | However, if we were to hit the Play
button in our animation controls at this
| | 01:02 | moment in time, we wouldn't
find any particles being generated.
| | 01:07 | This is because we haven't actually
specified any particle objects for the
| | 01:11 | Birth Group operator to work with.
| | 01:13 | To set this up, we need to have
our prefractured geometry selected.
| | 01:17 | Now, because I know we have all of that
geometry on its own layer, let's open up
| | 01:21 | the 3ds Max Layer Manager, select the
Fracture_Turrets layer, and then click the
| | 01:27 | Select Highlighted Objects and Layers button.
| | 01:29 | Then of course we can
close the Layer Manager dialog.
| | 01:33 | Jumping back into Particle view, we
need to select the Birth Group operator, and
| | 01:37 | in the Practical Objects field we can
click the Selected button to add all of
| | 01:41 | the currently selected geometry.
| | 01:44 | What we get initially doesn't look quite right.
| | 01:47 | This is because we still have a shape
operator in our flow. As this is clearly
| | 01:51 | not going to be required, we can just delete it.
| | 01:55 | Let's close Particle view for a moment
and just take a closer look at what we
| | 01:59 | now have in our scene.
| | 02:01 | If I just select a piece of the
segmented geometry and then hit the W key to
| | 02:04 | enable the Move tool, you can see, as I
moved the geometry off to one side, that
| | 02:09 | we now have plain gray particles
sitting in place, essentially re-creating the
| | 02:14 | form of our castle turrets.
| | 02:16 | I am just going to use Ctrl+Z to undo that move.
| | 02:20 | This means we can clean things up a
little in our viewport by reopening our
| | 02:24 | Layer Manager and hiding
our Fracture_Turrets layer.
| | 02:28 | You may be thinking that what we have
here seems like a bit of a backward step,
| | 02:31 | as we are left with plain gray turrets
whereas before we had some nice brightly
| | 02:36 | colored materials applied.
| | 02:39 | What we are seeing is
actually a graphical display error.
| | 02:42 | The particles should appear with the
materials visibly in place and indeed, for
| | 02:46 | you on your machine, they
may have done just that.
| | 02:50 | If not, all we need to do is open up
Particle view again, click on the Birth
| | 02:54 | Group operator, and scroll down
to the Acquire Shapes section.
| | 02:58 | Now, if we just twiddle our Sub-Material
ID Offset spinner up and then back down,
| | 03:04 | that should pop our textures back into view.
| | 03:08 | If not, again, don't worry, because if
you were to take a render, you would
| | 03:12 | definitely see that your
video materials are in place.
| | 03:16 | Now even though we have our particles
looking okay in the viewport and we know
| | 03:20 | that if we take a render they will look okay,
| | 03:23 | if I just select our MassFX Shape
operator, over in the parameters, you can see
| | 03:27 | that we still have our collision
shape for the particles set to Box.
| | 03:31 | In fact, if I just set the Display As
option to Shaded, what we have here would
| | 03:36 | obviously simulate in a very unrealistic manner.
| | 03:40 | To fix this, let's set the Collide As
option to Convex Hull, which clearly gives
| | 03:45 | us a collision mesh that much more
closely matches our turret geometry.
| | 03:51 | If we want, we can of course turn our
shading enough now by setting Display As to None.
| | 03:55 | There is one extremely important
distinction between mParticles and the MassFX
| | 04:00 | dynamic simulation that we need to
highlight or reiterate at this point.
| | 04:05 | mParticles are running
inside their own MassFX world.
| | 04:10 | This means they are not controlled by,
nor do they interact with, the standard
| | 04:14 | MassFX dynamic system.
| | 04:17 | To run an mParticle simulation then,
we need to use 3ds Max's animation controls,
| | 04:22 | are opposed to the Start
Bolton on the MassFX toolbar.
| | 04:26 | Let's do just that.
| | 04:28 | As we can see, our mParticles definitely
simulate, but there is a distinct lack
| | 04:32 | of interaction between our
mParticles and the stand geometry.
| | 04:37 | To change this behavior, all we need
to do is add a specific modifier to the
| | 04:41 | object we want our mParticles to interact with.
| | 04:44 | Let's select the stand then and from the
modifier list over in the Command panel,
| | 04:49 | we can add a PFlow Collision
Shape World space modifier.
| | 04:53 | As this is by default set to use
Geometry as the collision shape, we can just
| | 04:58 | click the Activate button.
| | 04:59 | Our final interaction step is to add
a MassFX collision test to our flow.
| | 05:06 | So from the depot, let's left-click and
drag one in, making sure we set it below
| | 05:10 | the MassFX world operator.
| | 05:11 | All we need to do now is add our
standard geometry into the deflectors list.
| | 05:17 | So with the operator selected, let's
click the By List button and then select
| | 05:22 | the stand Ggeometry from the dialog.
| | 05:23 | Now we can close Particle view
and again run our simulation.
| | 05:30 | We now have a dynamic rigid body particle
simulation that uses scene geometry as particles.
| | 05:37 | Whilst this may not seem to be
incredibly exciting, nor indeed a simulation
| | 05:41 | effect that the MassFX system itself
couldn't create, the truth is we can
| | 05:46 | now use all the power of the particle
flow system to affect our simulation
| | 05:50 | in any way we want.
| | 05:53 | This gives us the ability to create
simulation effects that are just not
| | 05:57 | possible with the
standard MassFX dynamics system.
| | Collapse this transcript |
| Creating breakable glue: Part 1| 00:00 | When working with the MassFX dynamics
system in 3ds Max, one much-missed feature
| | 00:05 | is the ability to bind objects
together with a virtual glue that can then be
| | 00:10 | broken or resolved under certain conditions.
| | 00:13 | This lack is one reason why additional
stimulation effects tools such as RayFire
| | 00:18 | are so popular with 3ds Max VFX artists.
| | 00:22 | When working mParticles we do have
just such a feature set available to us in
| | 00:27 | the form of the MassFX
glue and solvent operators.
| | 00:31 | Over the next two videos, we want to
run through a basic effect that makes you
| | 00:34 | solve the glue operator.
| | 00:36 | Now, to start with there are a couple of
important steps we need to take in order
| | 00:40 | to fully set up the scene geometry
that we will be wanting to work with.
| | 00:43 | First, let's select the rail geometry we
see here and then jump into the Modifier List.
| | 00:49 | In here, we want to apply a
PFlow Collision Shape modifier.
| | 00:53 | As already noted, this modifier gives
us the ability to have ordinary scene
| | 00:58 | geometry interact with mParticles.
| | 01:00 | Now we do of course need to make
certain that this modifier is activated.
| | 01:05 | The next step is to run through exactly the
same process, but for our stand geometry.
| | 01:10 | So let's select it, apply the modifier,
and then make certain that it is activated.
| | 01:16 | With those steps taken, let's press
the 6 key to open up Particle view.
| | 01:20 | The first thing we want to do here is drag out
a new MassFX Flow into the event display area.
| | 01:25 | As well as the flow, this of course also
creates a MassFX world and Birth Grid in the scene.
| | 01:32 | These appear more or less at the world
origin, which is certainly not where we
| | 01:37 | want our Birth Grid to be.
| | 01:39 | To place it more appropriately in the
scene, I am just going to press the H key
| | 01:44 | to pull up my Select from Scene dialog,
and the making sure I have the Helpers
| | 01:48 | filter set to show, I am going to
select the Birth Grid and click OK.
| | 01:52 | To position it, let's enable the Move
tool and come down to Coordinate Display
| | 01:56 | area at the bottom of the 3ds Max UI.
| | 01:59 | Here we can enter values of
X: -230, Y:-1960, and Z: 1045.
| | 02:09 | Going back to our MassFX flow,
the first tweak we want to perform here is to
| | 02:13 | select the shape operate and in the 3D dropdown,
let's the Shape to 20 sided spheres.
| | 02:19 | We can also set a size of
28 millimeters rate here.
| | 02:23 | Next, we want to select the Birth Grid
operator and make certain that the Grid
| | 02:27 | Size is set 260 millimeters.
| | 02:31 | This will help us control the spacing of
particles as they are spawned on the grid.
| | 02:35 | As we want to create long thin strands
of spawned particles, let's put a check
| | 02:40 | in the Non-Uniform Grid Option.
| | 02:42 | Now, we can leave our Length value here
set to 100%, but we want to set our Width
| | 02:47 | to 80 and our Height to 10%.
| | 02:51 | We only want a single slice of our
particle grid to show. The next parameter
| | 02:56 | to tweak is Icon Size,
| | 02:58 | so let's scroll down a little and
set the values here to a Length of 100
| | 03:02 | millimeters, a Width of 3300
millimeters, and a Height of 1814 millimeters.
| | 03:09 | This puts the top row of our particles
in close proximity to our rail geometry,
| | 03:15 | which is exactly where we need it to be.
| | 03:18 | This step also helps make sure that the
spacing between each column of particles
| | 03:23 | is greater than the size
of the particles themselves.
| | 03:26 | As the Glue operator in mParticles
will take distance between particles into
| | 03:31 | account, this should stop the different
strands binding together whilst ensuring
| | 03:35 | that the particles within
a single strand do bind.
| | 03:39 | As we have set our particle display
geometry to spheres, the next thing we
| | 03:42 | need to do is click the MassFX shape
operator and set the particle collision
| | 03:47 | mesh to the same shape.
| | 03:48 | Currently it is set to collide as
a box, which would clearly give us
| | 03:53 | unsatisfactory results.
| | 03:55 | Let's switch this over to Sphere.
| | 03:58 | The Conform to Particle Shape option
is on by default, so we can be sure
| | 04:02 | that the collision mesh will be the same size
as the graphical mesh on each of the particles.
| | 04:08 | With the basic scene setup in place
then, in our next video we are going to
| | 04:13 | move on introduce the glue operator
into the system and set about creating some
| | 04:16 | glued particles in the scene.
| | Collapse this transcript |
| Creating breakable glue: Part 2| 00:00 | With the basics of our particle system
in place, we now need to introduce a way
| | 00:04 | of binding the particles
inside the strands together.
| | 00:08 | This is where our MassFX glue operator comes in.
| | 00:11 | Down in the depot, let's left-click
and drag a glue operator into our flow.
| | 00:16 | Now, it is important that the operator
is placed below the MassFX world as it
| | 00:20 | simply won't work anywhere else
due to the way simulation steps are
| | 00:24 | calculated in the flow.
| | 00:25 | So as to be able to see how our
particles are binding together in the scene,
| | 00:30 | let's select the glue operator
and turn on Visualize Binding.
| | 00:34 | Then we need to enable the Bind Gap
option and set the Gap Distance to 2.24mm.
| | 00:39 | Now if I just switch over to the
Target_CloseUp camera, hopefully you can just
| | 00:46 | about make out that we now have a
thin blue line between each particle,
| | 00:50 | indicating that they are
bound or glued together.
| | 00:54 | By default our Binding Type is set to
Simplified, which is fine. Really though,
| | 00:58 | any one of these options would
work in this particular instance.
| | 01:02 | The Timing option, however, is a little different.
| | 01:05 | We need to make certain that we
are using On Event Entry here.
| | 01:09 | This is because we only need our
particles to be glued at the start of the event.
| | 01:14 | If we choose Continuous,
when particles from the different strands come into
| | 01:18 | close proximity to one another, they
would try to glue themselves together,
| | 01:22 | which is not really what we want here.
| | 01:25 | We can also put a check in the
Allow Binding Penetration option.
| | 01:28 | As our particles we'll eventually be
getting knocked about quite a bit, enabling
| | 01:33 | this can help prevent
calculation glitches from occurring.
| | 01:37 | To add a little something extra to
this effect I will also enable the
| | 01:41 | Breakable By Force option.
We're going to set the Torque values to 175 and
| | 01:45 | then 125 respectively.
| | 01:47 | Now, even though we have already added
the required modifiers to our rail and
| | 01:52 | stand geometry, our particle strands
would not currently collide with them as we
| | 01:56 | haven't yet added a MassFX
collision operator into the flow.
| | 02:01 | Let's drag one in from the
depot and place it below our glue.
| | 02:04 | Again I want to select this operator
and then over in the Parameters section,
| | 02:09 | click on the By List button.
| | 02:11 | Then we can add the stand and rail
geometry, and of course any other collision
| | 02:16 | objects we want, into the simulation.
| | 02:17 | Now we're not quite finished with our
strands just yet, because although they
| | 02:22 | are glued together, they're still not
really attached to anything in the scene.
| | 02:26 | In fact, if I just hit the C key and
select the Targets camera and then run the
| | 02:32 | simulation from the view, you
can see they simply fall down.
| | 02:37 | To fix this, from our depot, let's add
another MassFX glue operator and again
| | 02:42 | turn on the visualize option.
| | 02:44 | To differentiate between the two glue
operators I want to click the color swatch
| | 02:48 | and give this one an alternative color.
| | 02:51 | This will allow us to see which glue
operator is currently working on which
| | 02:54 | objects in the scene.
| | 02:56 | For the second glue operator we need
to set the binding type to distance and
| | 03:01 | again make certain that our
Timing option is set to On Event Entry.
| | 03:04 | As before, we will check the Allow
Binding Penetration option, as well as turning
| | 03:10 | on Breakable By Force and setting the
same Torque amounts as our first Glue
| | 03:15 | operator, so 175 and 125 respectively.
| | 03:19 | In order to glue the strands to our
rail geometry, we need to scroll down
| | 03:23 | a little and it need to bind with section,
first of all uncheck Current Event Particles.
| | 03:28 | This will prevent our particles in the
event being glued together a second time,
| | 03:32 | and then we can put a
check in the Deflectors option.
| | 03:36 | This now binds our particles
to a deflector in the scene.
| | 03:39 | All we need to do then is add the
Rail geometry to our Deflectors List;
| | 03:43 | we do this by clicking the Add button and
then selecting the object in the viewport.
| | 03:48 | To settle our particle strands
into a usable initial state for the
| | 03:52 | simulation, I'm just going to click
the Birth Grid operator and set the Emit
| | 03:57 | Time option to -130.
| | 04:00 | This will immediately place the
particles in the scene as if they had
| | 04:03 | already been stimulating for 130
frames, meaning they will have settled
| | 04:07 | nicely into position.
| | 04:09 | If we now run the simulation, you can
see our particles strands hang. We do get
| | 04:14 | a little bit of motion coming from them
due to the penetration off the collision
| | 04:17 | meshes a little bit, but they
are binding nicely together.
| | 04:21 | Of course we do want to make use of
the Breakable option we enabled earlier,
| | 04:25 | so let's open up the 3ds Max Layer
Manager and unhide the Animated Sphere layer.
| | 04:30 | I will of course need to select the
sphere and then over in the Modifier List,
| | 04:36 | add a PFlow Collision modifier to it.
| | 04:39 | Once it is activated, we can jump over
to our MassFX flow and add it to the list
| | 04:44 | of our collision test operator.
| | 04:47 | Now, if I press Play the sphere collides
with our particle strands, breaking some
| | 04:51 | of them off when the applied Torque
values go beyond that was set limits.
| | 04:57 | Now, although we have only had time to
demonstrate a very simple setup here,
| | 05:01 | hopefully you can see that the MassFX
glue operator is a very powerful tool that
| | 05:05 | could be employed to create all
sorts of particle-binding effects.
| | 05:09 | The fact that we can make them breakable
or even apply a MassFX solvent operator
| | 05:13 | to them only adds to the
possibilities that mParticles opens up to us.
| | Collapse this transcript |
| Creating a gloopy fluid: Part 1| 00:00 | Although there will never be any
danger of mParticles being thought of as a
| | 00:04 | genuine fluid simulator,
| | 00:05 | they can nevertheless still be used
to create some interesting fluid-like
| | 00:09 | effects that might just be what we
need for a particular effect or shot.
| | 00:14 | In this video we are going to put
together a quick gloop system that could
| | 00:18 | easily be refined and built on
to create a polished final effect.
| | 00:23 | To do that let's press 6 to bring up
Particle view and add a MassFX flow by
| | 00:27 | dragging from the depot
into the Event Display Area.
| | 00:31 | The effect we're looking to create
here will call for a constant stream of
| | 00:35 | particles to be birthed.
| | 00:36 | The first thing we want to do then in
our flow is replace or Birth Grid operator
| | 00:41 | with a Birth Stream.
| | 00:42 | From the depot let's left-click and
drag a Birth Stream operator into the flow.
| | 00:47 | If we hover over our existing grid
operator, we get a red line that tells us we
| | 00:52 | will be replacing our current operator
if we release the mouse at this point.
| | 00:57 | As this is exactly what we want to do,
I am just going to release the mouse button.
| | 01:02 | Now we do need to reposition the
Birth Stream helper that we have just
| | 01:06 | created in our scene.
| | 01:07 | Let's press the H key to bring
up the Select From Scene dialog.
| | 01:11 | Now, if I just make sure that only our
helpers filter is set to show, I can
| | 01:16 | easily select the Birth
Stream helper and then click OK.
| | 01:20 | To move the helper to its required
location let's choose the Align tool from the
| | 01:24 | main toolbar and then
click on the hopper geometry.
| | 01:27 | In the dialog we can set Pivot to
Pivot as our Alignment options and make
| | 01:32 | certain that the X, Y,
and Z axes are all checked.
| | 01:35 | Then of course we can click OK and
finally just manually move our helper up a
| | 01:39 | little in the scene to
sit in its final position.
| | 01:42 | With that done, let's select the Birth
Stream operator in Particle view as we
| | 01:47 | want to set up some of its required parameters.
| | 01:49 | Now, we do want our particles to continue
being birthed up to frame 200, so let's
| | 01:54 | set the Emit Stop time to that value.
| | 01:57 | We can also set a Rate of 500.
| | 02:01 | Moving down, I want to set
our Speed to a value of 6000.
| | 02:06 | Do keep in mind though, that the duration
and rate of particles will become quite
| | 02:10 | intensive as this simulation progresses,
| | 02:12 | so if we are unsure as to just what our
computer may be able to handle, it might
| | 02:18 | be wise to start with lower values
than the ones we're using and then work
| | 02:21 | upward as you are able.
| | 02:23 | As a final tweak in this section, I do
want to resize the Stream Source Icon,
| | 02:28 | setting it to a value of 70 and 70.
| | 02:30 | Now, in this particular simulation,
we're using our particles to create the
| | 02:36 | general motion of our gloopy fluid, not
the final surface geometry that will be
| | 02:40 | used at render time.
| | 02:42 | To help us with that goal let's select
the Shape operator and in the 3D dropdown
| | 02:46 | let's make certain that we
are using 20-sided Spheres.
| | 02:50 | While we are here we can also
change our size to a value of 45 mm.
| | 02:56 | As we will need our particles to
collide smoothly inside the simulation, next
| | 03:01 | let's select the MassFX Shape operator
and set the Collide As option to Sphere.
| | 03:07 | While we are thinking about collisions
we will need our particles to collide
| | 03:10 | with the stand geometry.
| | 03:12 | Hopefully, we can get them sliding in a
suitably gloopy fashion, slipping over the
| | 03:17 | edge of the geometry as they reach it.
| | 03:19 | To do that of course we need to select
the geometry, come into the Modifier tab,
| | 03:24 | and then add a PFlow Collision
Shape from the Modifier list.
| | 03:28 | To finish with of course we do
need to click the Activate button.
| | 03:31 | Our mParticles will of course need
to recognize the stand as collision
| | 03:35 | geometry, so let's go back into
Particle view and from the depot, drag a MassFX
| | 03:40 | collision test into the flow.
| | 03:41 | We need to place it here below our MassFX world.
| | 03:45 | To finalize setting up the collision
geometry, with the MassFX Collision operator
| | 03:49 | selected, let's click the By List
button and select the stand geometry.
| | 03:55 | If we run the simulation now, you
can see we do indeed have particle and
| | 03:59 | geometry collisions occurring.
| | 04:02 | We've reached the point here
where all of the basics of our gloop
| | 04:05 | simulation are in place.
| | 04:06 | What we need to do now is create the
actual gloop part of the effect, which is
| | 04:11 | exactly what we will do in our next video.
| | Collapse this transcript |
| Creating a gloopy fluid: Part 2| 00:00 | With our mParticle system in place,
omitting and colliding nicely with our scene
| | 00:05 | geometry, we can focus now on creating
the gloopy fluid effect that really is
| | 00:10 | the point and purpose of our simulation.
| | 00:13 | To make a gloopy substance,
we will of course need to glue our
| | 00:16 | particles together.
| | 00:17 | This step, as you could probably guess,
will be a big contributing factor to the
| | 00:21 | overall look of our final effect.
| | 00:24 | Let's grab a MassFX glue operator
and drag it into our flow, setting it in
| | 00:29 | between our MassFX
Collision and World operators.
| | 00:33 | We can then select it and in the
Parameters area, set its Binding Type to
| | 00:37 | Distance and the Timing to Continuous.
| | 00:40 | So we have set Continuous in this
instance so that as particles move and
| | 00:45 | collide in the simulation they are
able to break existing bonds, but then
| | 00:49 | re-grouped to the same or
other particles in the simulation.
| | 00:54 | This functionality will add quite a
bit to the stodgy look and slow gloopy
| | 00:58 | motion that we want from our particles.
| | 01:00 | We will want to set a fairly small
bind distance for our glue here; 200
| | 01:05 | mm should do nicely.
| | 01:06 | Again this will allow the particles to
break apart, but it also means that they
| | 01:10 | don't have to be right on top of one
another before they are able to reglue.
| | 01:15 | We can also enable Allow Binding
Penetration and also up the max amount of binds
| | 01:21 | per particle value to 8.
| | 01:23 | To really make this effect work,
we will for sure need to turn on Breakability.
| | 01:28 | But this time rather then using
Breakable By Force, we need to scroll down and
| | 01:33 | instead use this
Breakable By Overstretch option.
| | 01:38 | In here, we also want to set the
relative percentage value to 150.
| | 01:41 | In fact, if we just back up a little,
we also want to set the maximum distance
| | 01:47 | limit to a relative
percentage value of 150 also.
| | 01:51 | Now, if we play the simulation, you can
see our particles pool in a manner that
| | 01:56 | does feel somewhat like a thick running
substance, even sliding over the edge of
| | 02:00 | the stand as it is reached.
| | 02:03 | However, if we feel that they are
not flowing quite as freely across the
| | 02:07 | surface as we might like,
| | 02:08 | we could lower our friction values for
both the particles and the collision mesh.
| | 02:13 | To do this, let's first of all select
the MassFX Shape operator in our flow
| | 02:17 | and in the Bounce And Friction
controls we can set both Static and Dynamic
| | 02:21 | options to a value of 0.2.
| | 02:24 | Then of course we can select our stand
geometry and set its friction values to 0.2 also.
| | 02:31 | We do still need to finalize the look
of our gloop effect, so let's come into
| | 02:36 | the Create tab on our Command panel
and in the Geometry section, access to
| | 02:40 | dropdown list and choose Compound Objects.
| | 02:44 | From here, we can choose the BlobMesh
option, enable AutoGrid, and then just
| | 02:49 | left-click once in the
viewport to create a BlobMesh.
| | 02:52 | Then we can right-click and exit creation mode.
| | 02:56 | Keeping the BlobMesh selected, we can
access its parameters in the Command panel
| | 03:00 | and come down to the Blob Object section.
| | 03:03 | Here we can click the Add button.
| | 03:06 | In the Add Blob dialog that appears, we
can type PF into the find area and then
| | 03:11 | of course select the particle
flow source that appears in our list.
| | 03:15 | Clicking the Add Blobs button will
then turn our particles into a blog mesh.
| | 03:20 | If we just run the simulation now, we
can see that this is the case--kind of.
| | 03:24 | Obviously we want to try and make
things look a little more fluid-like in the
| | 03:30 | simulation here before we can say we are happy.
| | 03:32 | So still a now a BlobMesh parameters,
let's set the size to 304 mm, the tension
| | 03:39 | value we can set to 0.6, and the Render
or Viewport Coarseness we can set to 15.
| | 03:46 | The final step here is to put a
check in the Relative Coarseness checkbox.
| | 03:51 | Now as you can see we are definitely
getting an effect that is much more convincing.
| | 03:55 | To add a finishing touch, let's come
into the Modifier List and add a Relax
| | 04:00 | modifier onto our BlobMesh.
| | 04:02 | We can leave the Relax value at 0.5,
but let's apply Iterations of 4.
| | 04:08 | As you can see in the viewport this just
smoothes our surface out that little bit more.
| | 04:13 | If we now run the simulation one
last time, you can see that things are
| | 04:17 | looking pretty nice.
| | 04:19 | Our gloopy fluid even slides over the
edge of the stand once it is reached.
| | 04:25 | Whilst mParticles aren't going to
convince anyone that they are a serious fluid
| | 04:29 | simulator capable of producing
realistic oceans or floating valleys, they can
| | 04:33 | nevertheless produce some very nice
fluid-type simulation effects that may be
| | 04:38 | just what the doctor ordered.
| | Collapse this transcript |
| Adding forces to mParticles| 00:00 | Having taken the time to examine
the importance of forces in our
| | 00:03 | MassFX simulations,
| | 00:05 | it seems only sensible that we take a
quick look at how we can work with forces
| | 00:09 | in our mParticle simulations.
| | 00:10 | In our start scene, we have a hopper
with a funnel that we have decided will
| | 00:15 | have a stream of objects emitting from it.
| | 00:17 | For demonstration purposes, we will be
using cubes, but of course these could be
| | 00:21 | whatever we needed them to be.
| | 00:23 | We can accomplish this effect by using
spawned mParticles that collide with both
| | 00:27 | the hopper and stand geometry.
| | 00:30 | The idea is to then apply a force to
the particles as they emerge, and we could
| | 00:35 | of course stack forces to
apply more then one if necessary.
| | 00:39 | As a first step, let's set up
our collision geometries with the
| | 00:42 | necessary modifiers.
| | 00:44 | Let's select the hopper body and legs
and of course the stand itself.
| | 00:48 | Then from the Modifier List in the
Command panel, we can apply a PFlow
| | 00:52 | Collision Shape modifier.
| | 00:55 | Now even though technically the
modifiers have been instanced, you will
| | 00:59 | notice that with our object still selected,
we can actually edit the modifier parameters.
| | 01:04 | However, if we just select one of the
objects and then click the Activate button,
| | 01:09 | you can see that as we select the other
objects, that parameter change has been
| | 01:13 | applied to all of them.
| | 01:14 | Well, let's now open up
Particle view by pressing the 6 key.
| | 01:18 | Straight away we will need to drag out a
MassFX Flow and then just make a few quick changes.
| | 01:23 | The first thing we want to do is
replace our Birth Grid with a Birth Stream.
| | 01:30 | Of course adding the Birth Stream
operator creates a gizmo in the scene that
| | 01:34 | will determine where
our particles will spawn.
| | 01:36 | As we obviously want to align this to
our hopper, let's hit H key to bring up the
| | 01:41 | Select From Scene dialog.
| | 01:43 | Firstly, I will just hit the Display All
button and then type Birth in the Find field.
| | 01:48 | As you can see, our birth helper comes to the
top of the list, meaning we can now select it.
| | 01:53 | With that done, we can enable the Move
tool, come down to the coordinate display
| | 01:58 | area, and enter an X value of -246,
Y of -2027, and a Z value of 2700.
| | 02:08 | With our particles spawn in place,
let's jump back into Particle view and
| | 02:14 | select the Birth Stream Operator.
| | 02:15 | Over in the parameters section, again
we have a few changes we need to make.
| | 02:20 | For instance we need to set the Emit
Stop time to 150, the Rate to 100, our
| | 02:26 | Speed needs to be set at 3000, and the
Stream Source Icon size can be set to 680 by 820.
| | 02:34 | Now if we take a look at what we have so
far by pressing the Play button down in
| | 02:39 | our animation controls, it is clear that
we have a way to go in order to achieve
| | 02:44 | a satisfactory simulation result.
| | 02:45 | One thing that is missing is any kind
of collision between our particles and
| | 02:50 | the scene geometry.
| | 02:52 | To create these we of course need to
add a MassFX Collision operator to our
| | 02:56 | Flow. So, from the Depot, let's left-
click and drag that in. Because this is a
| | 03:01 | test, we need to make certain that it
goes below the MassFX World operator.
| | 03:06 | We can then select it and
click on the By list button.
| | 03:09 | Here you will see the four
collision meshes listed, so let's select them
| | 03:13 | all and then click the Select button.
| | 03:15 | Now, if you are new to particle flow and
are wondering why only the exact meshes
| | 03:20 | that we are looking for seem to get listed here,
| | 03:23 | this is because only valid deflectors show up
when we try to add objects to a collision test.
| | 03:28 | As these are the only objects in the
scene with the necessary modifier applied,
| | 03:33 | these are the only ones we see.
| | 03:35 | Of course, at this moment in time our
particle geometry is way too large to
| | 03:39 | fit through our funnel,
| | 03:40 | so we need to select Shape operator
and set our 3D cube sized to 50 mm.
| | 03:47 | If we press play again, we can see
that things are looking pretty good.
| | 03:51 | If we just hit F3 and switch to a
wireframe view, you can see that our cubes are
| | 03:56 | interacting nicely with the hopper geometry.
| | 03:58 | Let's switch back to realistic by, again,
hitting F3. Time now to see how we add
| | 04:05 | forces that can be used to influence the
behavior and motion of mParticles in the simulation.
| | 04:10 | The first step is to drag a
MassFX Force operator into the flow.
| | 04:14 | This time we need to place
it above our MassFX World.
| | 04:18 | As a general rule, any non-test
MassFX operator needs to go above the
| | 04:23 | MassFX World in an event.
| | 04:25 | This means the MassFX properties
defined by the operator are available to the
| | 04:29 | simulation engine before the simulation starts.
| | 04:32 | Of course, before we can do anything
with a Force operator, we need to have a
| | 04:36 | force space warp available in the scene.
| | 04:38 | In the Create tab on the Command
panel, let's click the Space Warps button.
| | 04:44 | From the options available, let's grab
a Vortex Space Warp, enable AutoGrid, and
| | 04:48 | then click and drag in the viewport
to create this just below our funnel.
| | 04:53 | Once I have it at a size I am
happy with, I can just right-click to
| | 04:56 | exit creation mode.
| | 04:58 | As one last tweak, with the Move enabled,
I'm just going to raise the Vortex Space
| | 05:02 | Warp up a little in the view.
| | 05:04 | Whilst we have it selected,
let's jump over to the Command panel and again
| | 05:07 | perform a couple of quick parameter tweaks.
| | 05:10 | The first thing we want to do is create an
on-off effect by setting the on time to
| | 05:15 | frame 35 and in this instance we
can leave the off time set to 100.
| | 05:20 | The only other options we will change
here are Orbital Speed and Radio Pull,
| | 05:24 | setting them both to a value of 3.
| | 05:28 | To tie everything together we need to
jump back to our MassFX Force operator in
| | 05:32 | Particle view and add our
Vortex into the Forces list.
| | 05:36 | We do this by clicking the Add button
and selecting the Vortex in the scene.
| | 05:42 | Now, if we run the simulation, once our
Space Warp kicks in, we can clearly see
| | 05:47 | the way it influences our mParticles.
| | 05:48 | What we've created here is a
simple and straightforward effect.
| | 05:53 | Still, it is enough to help us see
the impact that forces can have on the
| | 05:58 | finished result of an mParticle simulation.
| | 06:00 | With forces comes the ability to affect
motion inside a simulation in a whole other way.
| | 06:06 | This pushes back the boundaries and
opens up the doors regarding the type of
| | 06:10 | dynamic simulation effects that we
can produce with 3ds Max and MassFX.
| | Collapse this transcript |
|
|
ConclusionWhat's next?| 00:00 | Although we have reached the end of our course,
| | 00:02 | I am pretty certain that this taste of
the possibilities that MassFX opens up to
| | 00:07 | us in the fields of visual effects and
motion graphics will have left you with a
| | 00:11 | strong desire to become proficient,
even skillful, with its toolset.
| | 00:16 | To help in that endeavor, I have a few
recommendations that I would like to close with,
| | 00:20 | the first of which is to encourage you
to get as much practice with the system
| | 00:24 | as you possibly can.
| | 00:25 | One big area of learning for those
working with simulation tools is to continue
| | 00:30 | building a deep understanding of the
world around us and the way it works.
| | 00:35 | Take the time to go deeper into the
laws of physics. Get to understand the
| | 00:39 | behavior of objects,
| | 00:41 | how they are affected by and
react to all bodies, et cetera.
| | 00:44 | The insight that comes from trying to
replicate existing effects really can
| | 00:49 | become invaluable, particularly as we
look to build not only skills, but also
| | 00:54 | our collection of portfolio pieces.
| | 00:56 | I hope you have enjoyed our time
together on this course. Until next time, this
| | 01:01 | is Brian Bradley saying
take care and bye for now.
| | Collapse this transcript |
|
|