INSIDE 3DS MAX® 7 [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

INSIDE 3DS MAX® 7 [Electronic resources] - نسخه متنی

Adobe Creative Team

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید











  • Particles for Environmental Effects


    Consider a great CG scene that you found truly inspirational. Something evocative or exciting. Chances are that scene included atmospheric elements in the form of liquid, vapor, wind, fire, dust, or other environmental effects. While these sorts of elements aren't often the main focus of a scene, they contribute immeasurably to a scene's visual impact. After all, without a puff of dust and a spray of sparks, much of a meteor's impact would be lost. Less spectacular, yet no less essential, effects such as fog, rain, and dripping water contribute to a scene's emotional impact in ways that are more felt than logically analyzed.

    A key tool in 3ds max 7 for environmental effects is the particle. The true power of particle systems is in the ability to dictate the behavior of a large group of objects with a system of controls, and Particle Flow excels at putting controls for precise particle behavior into your hands. This system allows for as little consideration for individual particles as you desire. Sweeping, general rules can easily be used to set a homogeneous group of particles in motion. If you want more precise control, you can cause smaller subsets of the group to branch off into other behaviors based on a variety of tests and conditions.

    The event-driven particles in Particle Flow offer exciting capabilities for environmental effects because layers of realism can be quickly built with conditional particle behaviors. In this exercise, to create a bubbling lava effect, you will explore the following effects:

    • churning, boiling liquid

    • rising gas bubbles

    • popping surface bubbles

    • splashing liquid

    • dribbling liquid

    • surface smears


    The lava created in this exercise will boil violently, spew into the air, collide realistically with uneven scene geometry, and trail across its surface, leaving a fading material trail. If you would like to preview the final effect, view the movie volcano_complete.avi on the DVD.

    Create a Particle Source


    In this next series of exercise segments, you will create several particle effects, using Particle Flow and the Particle View interface, that will culminate in a procedural and flexible volcanic eruption.


    1.

    The first step in most particle setups is to create a source for your particle system, be it a helper object or scene geometry. In this beginning exercise, we will examine the scene, create and position the particle emitter, and modify the default Particle Flow source to form the basis of a pool of boiling lava. Open the max file volcano_ begin.max, found on the DVD.

    Note

    If at any point in this series of exercises you wish to examine the finished max scene, open volcano_complete.max on the DVD.

    This scene contains a volcano base model and a simplified version for collision purposes (Figure 17.23). The collision model, volcano_collision, has been set to nonrendering in its Object Properties dialog. Also included is a simple animated popping bubble, "BubblePop geometry." This mesh object uses animated Volume Select and DeleteMesh modifiers to form a sphere that disappears from the top down.

    Figure 17.23. The starting point for this tutoriala volcanic crater.

    [View full size image]

    First, you will create a particle flow in conjunction with a BlobMesh compound object to simulate a bubbling pool of lava.

    2.

    Go to the Create panel > Geometry > Particle Systems and create a PF Source icon in the Top viewport (Figure 17.24).

    Figure 17.24. Create a circular PF Source icon in the Top viewport.

    [View full size image]

    This icon will serve as the source for the lava and all the effects derived from it.

    3.

    To better fit the icon to the volcano geometry, change its Icon Type to Circle and its Diameter to around 140 in the Emission rollout. Move the icon in the Top viewport until it's centered in the crater. Then move it along its Z axis in the Camera viewport until it appears above the volcano geometry, with the approximate coordinates X = 20, Y = 150, Z = 140 (Figure 17.25).

    Figure 17.25. Move the icon up on its Z axis until it appears in the crater.

    [View full size image]

    If you scrub the Time Slider, you will see particles being released from the icon and emitted parallel to the icon's negative Z axis. This is because the default Z-axis orientation of a PF Source icon created in an orthogonal viewport is away from the user's perspective.

    4.

    In the Camera viewport, flip the icon along its Z axis, using the Mirror tool (Tools > Mirror) (Figure 17.26). Now the particles should emit upward, out of the volcano (Figure 17.27).

    Figure 17.26. Use the Mirror tool to flip the particle emitter.

    Figure 17.27. Mirror the icon along its Z axis so that the particles are shot up and out of the crater.

    [View full size image]

    5.

    Press 6 or click the Particle View button on the source icon's Modify panel to open Particle View. A standard flow has been created to coincide with the PF Source icon.

    The source event, named PF Source 01, contains only a Render operator. This operator creates renderable meshes for spawned particles. Because this action is in the global event, it will affect all particles, in all events, throughout the system. This is not desirable for the current exercise, as different sorts of particle geometry will be created at different stages of the flow.

    6.

    To get rid of this operator, right-click the Render operator, and choose Delete from the contextual menu (Figure 17.28).

    Figure 17.28. Delete the global Render operator.

    Examine the next event in the flow, named Event 01. This event will be used to generate the particles for the main mass of bubbling lava.

    7.

    First, right-click the event title bar, choose Rename from the contextual menu, and rename the event Bubbling Lava. This name will have significance outside of Particle View, when you're choosing particle events to be attached to other scene objects.

    8.

    Select the Birth operator to view its properties in the Particle View Parameters panel. Change Emit Stop to 0 and Amount to 50, to create a burst of 50 particles instantly at the start of the animation. Leave Subframe Sampling on.

    Note

    When Subframe Sampling is active, particle calculations occur at a higher frequency (closer interval) than rendered frames. This creates smoother effects and less bunching or puffing in particle emission.

    9.

    Examine the Position Icon operator, which by default is set to emit particles according to the volume of the icon. This would be appropriate for a Box or Sphere icon type, but since the current icon type is set to Circle, in the Location pop-up menu choose Surface.

    Note

    Just as with many other max functions, a Seed value and New seed generator button are available. Generating new seeds can drastically change the movement of particles, giving a new appearance to the system without changing any other operator parameters.

    10.

    The Speed operator is set by default to emit particles along the icon's arrow at 300 units per second. For the desired bubbling effect, set Speed to 3 and Variation to 15.

    11.

    Rotation control is not necessary, so delete that operator (right-click and choose Delete).

    12.

    The Shape operator defines particle shape, and by default it creates a 10-unit-diameter tetra. Increase this to 20. This size will become significant when these particles are used in a BlobMesh object. Change the Shape type to Sphere, so that it will generate a smoother metaball effect.

    13.

    The Display operator determines the appearance of the particles in a viewport (as opposed to the Render operator, which is used in conjunction with a Shape operator to determine appearance at render time). Change the Type to Geometry to get a feel for the volume that will be created by this particle flow.

    14.

    Change the display color by clicking either the color-selector circle in the Display operator's Event listing or the color-selector square in the Properties panel to open the Color Selector. Set the color to a bright red to better approximate the look of lava. Your particle system should appear as shown in Figure 17.29.

    Figure 17.29. Scrub the Time Slider to see how the particles are being emitted.

    [View full size image]

    If you scrub the Time Slider, the spawned particles, appearing instantly at the start of the animation, will flow away from the emitter. Most will flow along the emitter's positive Z axis. Some will flow in the opposite direction due to the Speed operator's Variation setting. This randomization is necessary for the desired bubbling-lava effect.


    As you have seen in this exercise segment, creating and positioning a PFlow source is very similar to using non-event-driven particle systems. The difference in technique comes into play when you begin to modify particle behavior using the Particle View interface (Figure 17.30).

    Figure 17.30. The particle system flow so far.

    In this next portion of the exercise, we will explore the use of forces to impact particle movement, and we'll implement a simple collision solution to constrain the particles to a specific location. The result will be the addition of a quick bouncing motion to the particles in a confined space.

    Force and Collision


    For a bubbling movement, three elements are required: an initial speed and direction (provided in the exercise above), a motive force to pull the particles back down, and a collision force to bounce them back up. In this next segment of the exercise, the force involved will be one commonly used with particlesthe Gravity space warpand collision will be dependent on a geometry-based deflector employing the specialized volcano collision mesh.


    1.

    Go to the Top viewport and create a Gravity space warp (Create panel > Space Warps > Forces) (Figure 17.31). It will be oriented by default with its Z axis pointing along the negative World Z axis. The position of the space warp is not significant, only its orientation, so long as Decay is not used.

    Figure 17.31. Create a Gravity space warp in the Top viewport.

    [View full size image]

    2.

    Leave the Gravity Strength setting at its default setting of 1.

    3.

    To connect this force to the particles, go back to Particle View and append a Force operator to the Bubbling Lava event. You can do this either by right-clicking the event and choosing Append > Operator > Force, or by dragging a Force operator from the depot into the event listing and dropping it when its indicator line turns blue (Figure 17.32). (Dropping the action when the line is red will replace the existing action with the new one.)

    Figure 17.32. Select a Force operator from the depot and add it to the event by dragging it.

    4.

    In the Force event Properties panel, select the Gravity01 space warp by either selecting Add and then clicking the space warp in a viewport, or by selecting By List and choosing from the Select Force Space Warps dialog.

    Note

    Multiple space warps can be applied within a single Force operator, and the resulting calculations will usually be more accurate if they are applied in this way, as opposed to using individual Force operators.

    5.

    If you scrub the Time Slider, you will note that the particles are being dragged down very quickly. To reduce this effect, set the Force operator's Influence to 15%.

    The other half of the bubbling effect is created by a collision force to bounce the particles. You will use a UDeflector space warp, which provides collision based on any mesh geometry.

    6.

    Go to the Top viewport and create a UDeflector space warp (Create panel > Space Warps > Deflectors).

    7.

    In the UDeflector's Modify panel, click the Pick Object button and choose the volcano_collision object. The collision mesh sits on top of the higher-resolution rendering volcano mesh, so you will have an easier time choosing the right one if you use the Select Objects dialog (keyboard shortcut H). Leave the other settings at their default values. (A Bounce setting of 1.0 means that the particles will never lose momentum or slow down as a result of collision.) Feel free to hide the volcano_collision mesh at this point to simplify the viewport.

    Tip

    Using proxy collision objects can be a very effective way to reduce CPU overhead when object-based collision is required.

    8.

    To apply this collision effect to the particles, return to Particle View and append a Collision test to the event (Figure 17.33).

    Figure 17.33. Appending a Collision test to the event using the contextual menu.

    9.

    Add UDeflector01 to the Collision test's Deflectors list.

    Scrub the Time Slider to observe the particles being repeatedly bounced back up by the collision space warp.


    Note

    A target event is not necessary with all testsfor example, the Collision test, which can provide collision functionality without directing True-testing particles to a new event.

    When setting up particle systems, it's always important to keep track of where those particles might wind up, particularly if they are going to be subject to a lot of bouncing action. After all, a swarm of moths around a porch light will lose some of its believability if one of the moths flies through a solid wall. In this next section, you will add a safety guard to your scene to prevent particles from escaping.

    Catching Stray Particles


    If you observe the particle flow from the Front or Left viewport, you will most likely see several particles escaping from the crater and falling down the World Z axis (Figure 17.34). There are various methods to combat this, such as using finer collision meshes, using slower particle velocities, and increasing the PF Source icon's Integration Step. In this case, you will use one of the simplest remedies, a backup deflector.


    1.

    Go to the Top viewport and create a POmniFlect space warp (Create panel > Space Warps > Deflectors). Make the space warp about 1000 units by 1000 units, centered on the volcano geometry, so that all of the particles will be covered.

    2.

    Set the Time Off to 500 so that the deflector does not lose collision during the animation. Overlooking this setting is a common mistake.

    3.

    Append a second Collision test to the Bubbling Lava event and assign POmniFlect01 to it.

    Note

    When multiple collision deflectors are applied with a single event, placing all of the deflectors into one Collision test will give more reliable results, unless different output events are required.

    Once particles collide with this deflector, they will be deleted. Planar collisions are very reliable, so particles are not expected to escape from them.

    4.

    In an empty area of the Event display, to the right of the event, create a new Delete operator. If it appears with a Display operator as well, feel free to delete Display. Rename this new event Bubbling Lava Delete.

    5.

    A wire between the two events would be forced into a confusing path across the event, so move the test's output to the right of the event by dragging the square output handle to the right side of the event list (Figure 17.35).

    Figure 17.35. Create a new event, consisting of a Delete operator. Then drag the second Collision test's output to the right side of the event.

    6.

    Wire the two events by dragging from the output of the POmniFlect01 Collision test to the input of the Delete event.

    If you scrub the Time Slider, you will see that particles that escape the object-based deflector are caught, and deleted, by the planar one.


    Figure 17.34. Several particles are escaping from the collision mesh.

    [View full size image]

    Tip

    For a more sophisticated setup, try recycling these stray particles back into the main flow. Hint: Separate the Birth operator from the rest of the operators, connected with a Send Out Test, and wire the Collision test back into the Bubbling Lava event.

    As we have seen here, particles in PFlow can be constrained using the same forces and collision tools used in non-event-driven particle systems, but with more specific application by being linked in Particle View to certain events. Now that the basic motion of the lava particles is set, in this next segment of the exercise you will link them to BlobMesh for rendering.

    BlobMesh


    BlobMesh is a compound object that is very useful for creating liquids, particularly in combination with particles. BlobMesh is a metaball geometry tool that creates a group of spheres, based on instanced geometry, helper objects, or particles. The group is then joined into a smooth mass, with close spheres blending together.


    1.

    Go to the Top viewport and create a BlobMesh object (Create panel > Geometry > Compound Objects). The placement is not significant, as BlobMesh places its metaballs according to the position of Blob Objects.

    You can ignore the Size setting, because when using particles, metaball size is based on particle size.

    2.

    Reduce Tension to around 0.35 for a more loosely defined surface.

    Evaluation Coarseness determines how detailed the resulting mesh will be, both in viewports and at render time. It is recommended that the Render setting be left at 3.0 or lower to ensure that the BlobMesh animates smoothly. The Viewport setting can be set as high (as coarse) as is required to keep screen refreshes from lagging.

    3.

    To use the particle flow you've set up to generate metaballs, click the Add button in the BlobMesh's Parameters rollout and choose PF Source 01. The Pick button will allow you to choose directly from a viewport, which may be more difficult, as BlobMesh will allow you to pick nearly any screen object (Figure 17.36).

    Figure 17.36. Add the PF Source 01 icon to the list of Blob Objects to form a metaball mesh around the particles.

    [View full size image]

    Scrub the Time Slider to observe a blob forming around the spawned particles and bouncing in the crater. The appearance of this lava isn't quite right yet. The bubbling geometry seems to float freely in the crater, not as part of a viscous pool. A second blob object is called for to fill in.

    4.

    Go to the Top viewport and create a Plane centered over the crater; set Length to 175 and Width to 280.

    5.

    Go to the Camera viewport and move it up on the Z axis until it's just a little lower than the particle emitter, around Z = 125 (Figure 17.37).

    Figure 17.37. Move the Plane to a position just below the particle emitter.

    [View full size image]

    Now you will create a static particle cloud along this plane to generate additional metaballs to fill in the effect.

    6.

    In Particle View, select the Birth, Shape, and Display operators of the Bubbling Lava event and clone them, either by right-clicking a blank area and choosing Copy > Paste Instanced, or Shift-dragging and choosing Instance as the method. All three operators will appear in a new event in italics to indicate that they are instanced. Using Instance as the method allows you to make changes to the number of particles spawned, and their appearance, by editing any of the copied (original) operators.

    7.

    Rename this new event Pool Base.

    A position for these particles has not been defined. Append a Position Object operator to Pool Base.

    8.

    In the Position Object's Parameters panel, add Plane01 to the list of Emitter Objects.

    9.

    To prevent spawned particles from bunching up any closer than the 20-unit diameter of the metaballs, turn on Separation in the Location area and set Distance at 20.

    10.

    Finally, wire the output of the PF Source 01 event to the input of the Pool Base event to spawn particles (Figure 17.38).

    Figure 17.38. Wire the PF Source to the new event to activate the new particles.

    You will immediately notice a difference in the lava's appearance, as the Plane generates a base of static particles to fill in the pool effect (Figure 17.39). To toggle the effect, click on the light bulb icon in the "Pool Base" title bar to turn the event on/off.

    Figure 17.39. The lava is now filled in with a pool of static particles.

    [View full size image]

    11.

    In a wireframe viewport, the display is becoming quite confusing, due to the overlap of spherical particles and BlobMesh. To change the viewport appearance of particles, go to either of the Display operators and change the Type to Ticks.

    12.

    Open the Material Editor, select the Lava material, and apply the material to the BlobMesh01 object. Applying a material to the PF Source icon will have no effect, as the particles are being rendered based on the BlobMesh's geometry and materials.

    13.

    The lava will need mapping coordinates, so apply a UVW Mapping modifier with Spherical mapping (Figure 17.40).

    Figure 17.40. The BlobMesh lava, with an appropriate material.


    Note

    Material use with BlobMesh objects is a bit restricted given that the topography of the metaballs can change drastically. Materials cannot be "locked down" to any particular metaball, nor can different materials be applied to different metaballs, except when using standard material-blending techniques, such as Blend and Top/Bottom. For these reasons, BlobMesh objects lend themselves to general coloring materials, as opposed to materials with very distinct texture patterns.

    In this section, you have created the display mesh for your lava pool using the BlobMesh compound object linked to specific events in Particle Flow. Now that the lava pool is complete, you will add some special bubbling action by birthing a new set of particles from the same source.

    Rising Gas Bubbles


    The main environmental cause for bubbling lava is, of course, rising areas of superheated gas. In the first part of creating bubbles for this lava, you will spawn occasional larger metaballs that will rise and swell and eventually spawn mesh bubbles.


    1.

    Return to Particle View and select the first five Bubbling Lava operators (Birth, Position Icon, Speed, Shape, and Display), and clone them to a new event. Use Copy as the method, as you will be changing some of these operators.

    2.

    Rename the new event Big Bubble and wire it to the PF Source event (Figure 17.41).

    Figure 17.41. Create a new birth event by cloning operators.

    [View full size image]

    3.

    Edit the Birth operator to emit a total amount of 5 particles, over frames 0350.

    4.

    Increase the Speed to 10 units per second, and set Variation to 0. Feel free to increase the speed variation later, but for debugging purposes, it is simpler to stick with a constant speed for now.

    5.

    To keep these new particles from popping into existence, reduce the Size in the Shape operator to 10 units so that they will initially spawn at a small enough size to be concealed by the surface of the lava.

    Once these special bubbles have spawned, they need to be scaled up as they rise. This will occur in a new event, to avoid conflict with the existing Shape operator.

    6.

    Append a Send Out test to Big Bubble. This test always yields True values; in other words, all particles are sent to the next wired event.

    7.

    Create a new Scale operator below the Big Bubble event. Rename this event Big Bubble Grow and wire its input to the Send Out's output.

    8.

    Change the Scale's Type to Relative Successive. This will apply scaling changes in terms of percentages, for as long as particles remain in the event.

    9.

    You will want this rising gas bubble to expand less on the Z axis than on the X and Y axes, in order for it to blend more successfully with the other metaballs, so clear the Constrain Proportions check box.

    10.

    Set the Scale Factors to X = 103%, Y = 103%, Z = 101%. These may seem like insignificant values, but applied continuously to particles, their effect will quickly accumulate.

    11.

    The bubble needs to stay within this event only until it has reached a specific size, so append a Scale Test action to the event. Set the axis to be tested to Z, and the Test Value percentage to 150%, so that when a particle reaches 150% of the Z-axis scale it had when it entered the event, it will be sent out to the next event (Figure 17.42).

    Figure 17.42. Create a small event to grow the particles over time.

    If you slowly scrub the Time Slider, you will see the BlobMesh bulge as the big bubble increases in scale, though without a target event, the scaling will continue without end (Figure 17.43).

    Figure 17.43. The increase in size will continue until the Scale Test action sends the big bubble to a new event.

    [View full size image]

    Tip

    If you scrub too far into the animation while the increasing scale of the BlobMesh is unchecked, you could consume enough CPU resources to cause max to crash.

    12.

    Add a new Speed operator below the Big Bubble Grow event. Rename this event Big Bubble Stop and wire it to the output of the Scale test.

    13.

    To slow this particle down dramatically, set Speed to 2. Once the particle reaches the event, it will also stop increasing in scale.

    This bubble will need to shrink and die after pausing for a few frames.

    14.

    Append an Age Test to Big Bubble Stop, and set its Test Value to 15 frames. Leave the Variation setting at its default of 5 frames.

    15.

    Change the age type to Event Age so that particles will test True after being in this event for 15 ±5 frames. The default setting of Particle Age tests for the age of the particle since it was spawned (or had its age reset) (Figure 17.44).

    Figure 17.44. This new event will end the bubble's growth, slow it down, and retain the bubble for 15 plus or minus 5 frames.

    Once a particle passes the Age Test action, it will be sent to an event that will shrink it back down.

    16.

    Copy the Big Bubble Stop Speed operator to a new event below, and rename the new event Big Bubble Shrink.

    17.

    Wire the Age Test output into the Big Bubble Stop event's input.

    18.

    Set Speed to 10 to send the big bubble back down into the metaball mass.

    19.

    Append a Scale operator with type Relative Successive.

    20.

    Set all of the Scale operator's Scale Factors to 99%.

    Scrubbing the Time Slider will reveal that the bubble grows and rises, pauses briefly, and then falls back and shrinks.

    21.

    Again, this reduction in scale will proceed without end unless a test interrupts it, so append another Scale test, set it to test True if particle value Is Less Than Test Value, and set the Test Value percentage to 25%.

    22.

    Wire this test to a new event containing a Delete operator, named Big Bubble Delete (Figure 17.45).

    Figure 17.45. After adding a shrink event and a delete event, the "big bubble" sequence is complete.


    Strictly speaking, you could just allow the particle to shrink indefinitely; at some point its size would resolve to 0 and it would stop being calculated. Alternatively, you could cause it stop (Speed = 0), but to keep the particle flow from being bogged down, it is good practice to delete unneeded particles whenever possible.

    As you have seen, numerous birth events can be tied to a single Particle Source icon, each with its own animation and render appearance. This is not the conclusion of the bubble effect. An animated mesh will be spawned on top of the big bubble to represent the actual moment of escaping gas.

    Spawning Animated Geometry


    The "BubblePop geometry" object in the scene is a simple animated mesh that approximates a popping bubble. This mesh will be spawned in animated and nonanimated form to polish off the bubble effect (Figures 17.4617.48).


    1.

    Insert a Spawn test into the Big Bubble Stop event. Be certain that it appears before Age Test, which should be the last action in the event.

    By default the Spawn test will generate a single particle, only once per event, with the same speed and direction as the parent particle.

    2.

    In this case, the spawned bubble needs to stop, so set Inherited to 0%.

    3.

    Drag the Spawn test output to the right side of the event so that it can be wired to a new event.

    4.

    Create a new Shape Instance operator event to the right of the Big Bubble event and name the new event Popping Bubble Spawn.

    The Shape Instance operator creates particle shapes based on instanced geometry, similar to the Instanced Geometry particle type in non-event-driven particle systems.

    5.

    Wire the Spawn test to this event.

    6.

    In the Shape Instance Properties panel, click the Particle Geometry Object button and use the Select Object dialog (keyboard shortcut H) to select the BubblePop geometry object.

    7.

    Reduce the Scale percentage setting to 50% to start this bubble off small (Figure 17.49).

    Figure 17.49. When the big bubble stops, it will spawn a popping bubble that uses instanced geometry.

    At this point, step back to consider how this particle system is being rendered, specifically through BlobMesh. By default, all Particle Flow events in selected PF Source objects are used in the metaball collection. Using instanced geometry particles with metaballs can lead to undependable results, and, in this case, an incorrect visual appearance.

    8.

    Go to the BlobMesh's Modify panel, and in the Particle Flow Parameters rollout, clear the All Particle Flow Events check box. The BlobMesh in the viewport disappears because there are no selected objects to use.

    9.

    Click the Add button to open the Add Particle Flow Events dialog. All events in particle flows assigned as Blob Objects are listed here. Add the following events: Bubbling Lava, Pool Base, Big Bubble Grow, Big Bubble Stop, and Big Bubble Shrink (Figure 17.50). The value of giving meaningful names to particle flow events should be apparent. Events that do not contribute to the metaballs, such as the Delete events, do not need to be added to the list.

    Figure 17.50. Instead of using all PFlow events, BlobMesh will use the selected ones.

    [View full size image]

    Scrub the Time Slider to observe how the lava metaballs have the same appearance as before, though the spawned geometry bubble is still not appearing in viewports.

    10.

    Returning to the Popping Bubble Spawn event, it should be obvious why the bubble is not appearing in viewports; the Display type is set to Ticks. Change it to Geometry to see the spawned bubbles appear throughout the animation, though at this point they don't appear to pop (Figure 17.51).

    Figure 17.51. The particle flow now produces instanced geometry particles as well as metaball particles.

    [View full size image]

    11.

    Append a Speed operator to the event and set Speed to 450. This operator will be in effect for two frames and is used to position the bubble geometry near the top of the metaball effect.

    12.

    Append an Age Test to the event with a Test Value of 2 and a Variation of 0.

    Once the bubble has been repositioned with this event, it will be passed to the next event, which will cause the instanced geometry to grow and increase in scale.

    13.

    Select the Popping Bubble Spawn event and clone it, using Copy as the method. Rename the new event Popping Bubble Grow.

    14.

    Wire the new event to the previous one's Age Test.

    15.

    The bubble needs to rise at a moderate speed, so set its Speed operator to 35 units per second.

    16.

    Insert a Scale operator (before the final Age Test), with the Type set to Relative Successive and the Scale Factors set to X = 105%, Y = 105%, Z = 102%. (The Constrain Proportions check box must be cleared.)

    17.

    Give this bubble a little longer to grow and rise by setting the Age Test's Test Value to 10 (Figure 17.52).

    Figure 17.52. After spawning the popping bubble, the next event causes it to grow and rise for ten frames.

    If you scrub the Time Slider, the spawned geometric bubble will grow (and continue to grow, at this point in the exercise), but it will not show up in renders without a Render operator.

    Note

    The Render operator passes along particle appearance to the renderer; without it, particles can only show up in viewports. The exception is when particles are being rendered by another max object, like BlobMesh.

    18.

    Add a Render operator to Popping Bubble Grow. (Its position in the event list does not matter.)

    Scrub to a point in the animation where the spawned geometry is obvious in viewports (Figure 17.53). If you render a still image, something odd occurs. The bubble appears much larger and higher in renders than in viewports (Figure 17.54). This is due to the Integration Step settings.

    Figure 17.53. The popping bubble appears in the expected size in the viewport.

    [View full size image]

    Figure 17.54. The popping bubble appears differently in renders due to varying Integration Step settings.

    In the PF Source icon's System Management rollout, Integration Step values are given for Viewport and Render. By default, particle calculations for render time are calculated twice as often (Half Frame versus Frame) as in viewports, which results in influential operators such as Speed and Scale's having greater effect in renders.

    19.

    Set the Render Integration Step to Frame. If you render another still, the render appearance should match that in the viewport (Figure 17.55).

    Figure 17.55. The appearance of the popping bubble in renders will match that in viewports once the Integration Steps are set to the same value.

    20.

    Select the Popping Bubble Grow event and clone it, using Copy as the method. Rename the new event Popping Bubble Pop.

    21.

    Wire the new event to the previous one's Age Test.

    22.

    In this event, the instanced geometry's animation is going to be used. In the Shape Instance operator, check the Animated Shape box.

    23.

    The popping bubble's animation occurs over frames 015 and needs to be synced to this event, so set Sync By to Event Duration.

    24.

    To enhance the popping animation, set the Speed to 25 units, so that the bubble will rapidly fall as it pops.

    25.

    To cause the bubble to shrink as it pops, set all three Scale Factors to 98%.

    Rather than exit this event based on age, you will exit based on scale, and then delete the particle.

    26.

    Select the Scale Test from Big Bubble Shrink and clone it, using Copy as the method, over the Age Test at the end of Popping Bubble Pop, replacing Age Test with Scale Test. Set the Test Value percentage to 10%.

    27.

    Add a Delete event below Popping Bubble Pop, name it Popping Bubble Delete, and wire it to the previous Scale Test (Figure 17.56).

    Figure 17.56. With the addition of an event to cause the bubble to pop, and a delete event to clean up, the "popping bubble" sequence is complete.


    Figure 17.46. At the beginning of its animation cycle, the "BubblePop geometry" object appears as a simple sphere.

    [View full size image]

    Figure 17.47. The animated bubble pops very quickly.

    [View full size image]

    Figure 17.48. The bubble completely deletes itself over frames 015.

    [View full size image]

    Using instanced geometry, you have created a popping bubble that will automatically spawn above the rising bulges in the lava. It's worth considering that the popping bubbles are linked to the rising bulges; changing the quantity or location of the bulges will automatically pass those changes along to the popping bubbles.

    Splash Effect


    When the bubble pops, it releases energy and liquid mass back into the pool. You will create this effect by spawning a ring of drops from the popping bubble. The drops will taper off as they leave the ring, an effect that you will create by spawning a ring of nonrendering "generator" particles first.


    1.

    Insert a Spawn test into Popping Bubble Pop, just before the final Scale Test. Even though the parent particle will be in this event until it passes the Scale Test, by default the spawning will occur only once.

    2.

    Increase the spawned Offspring # to 5, with a 20% Variation to add a random factor.

    These generator particles need to have their direction based on the position of the popping bubble. If the particle speed were not set in the Spawn operator, a later Speed operator would not be able to discern a direction away from the parent particle.

    3.

    Under Speed, check that the Inherited % radio button is on, and set the value to 50, Variation % to 15, and Divergence to 90. This Divergence setting will spread the spawned particles over a 90-degree arc.

    Tip

    Negative percentage values for inherited speed reverse the previous direction before applying the percentage velocity change.

    4.

    Create a new Shape operator event to the right of the Popping Bubble Spawn event, and name the new event Generate Trail. This event will be used to generate a series of droplets, decreasing in size, that will trail after one another and blend together into a metaball strand.

    5.

    Wire this event to the previously created Spawn test (move the Spawn output anchor to the right side of the event first).

    6.

    Set the Shape operator type to Sphere and the Size to 2.

    7.

    Append a Spawn test. Set the Spawn Rate to Per Second, and the Rate value to 25. This will generate 25 particles per second (30 frames NTSC) that the event is active.

    8.

    Under Speed, set the type to Inherited, with a percentage value of 2000%. This large increase will "jump start" the droplets into a properly energetic dispersal.

    9.

    Only a small amount of Variation will work here without disrupting the droplet, so set the Speed Variation to 3.

    10.

    Set Divergence to 0, as even a small amount of randomness in the path of the particles will disrupt the stream.

    11.

    Clear the Restart Particle Age check box. This is a very important step, as the increasing age of spawned particles will be used later to animate their scale.

    12.

    This generator only needs to function for about 2/3 of a second, during which time it will spawn approximately 14 particles, so append an Age Test to the event. Set the Test Value to 20 and the Variation to 0.

    13.

    When the generator particle is done, it needs to be deleted, so create a new Delete operator off to the right, name the event Delete Generator, and wire it to the Age Test (Figures 17.57 and 17.58).

    Figure 17.57. The Generate Trail event will spawn the actual droplets, after which the generator particle will be deleted.

    [View full size image]

    Figure 17.58. The spawned droplets, before gravity and collision are applied.

    [View full size image]

    This next event will be used to define the appearance of the droplets, and their motion while in free-fall.

    14.

    Create a new Scale operator event below the Generate Trail event, and name the new event Droplets Trail. Wire this event to the Spawn (By Rate) output.

    You will animate the values in this Scale operator so that older particles are given a lower scale. This will create the effect of a diminishing droplet trail. It's important to note that this scale effect is difficult to apply without explicit keyframing, unless your particles are aged in a previous event.

    15.

    Go to frame 0 and set all three Scale Factors to 190%.

    16.

    Turn on the Auto Key button, go to frame 20, and set the Scale Factors to 10%. Turn the Auto Key button off.

    17.

    Set the Animation Offset Keying to Particle Age. This will apply the animated scale factor to incoming particles based on their age (which in this case is based on how long the generator particle has been moving away from the parent bubble).

    18.

    Set the Display Type to Geometry. Cloning this operator, as an instance, onto each of the successive "droplets" events to be created, will enable you to easily change the viewport preview of this effect.

    19.

    Copy the Force operator and Collision (UDeflector01) test from the original Bubbling Lava event and paste them into the Droplets Trail event (Figure 17.59).

    Figure 17.59. To replicate gravity and collision effects, copy operators from the original lava event.

    20.

    The droplets need to be acted on with much more gravity to arc well, so set the Force operator's Influence percentage to 150%. The droplets should now arc nicely down toward the crater after their initial expulsion (Figure 17.60).

    Figure 17.60. A strong gravity effect brings the lava droplets back down into the crater.

    [View full size image]

    Once the droplets collide with the crater walls, they need to stick for a few ticks and then slide back down.

    21.

    Create a new Speed operator event below the Droplets Trail event and name the new event Droplets Stick. Set the Speed to 0. Wire this event to the preceding Collision test.

    22.

    Append an Age Test with a Test Value of 10 and Variation of 3 to provide pause for approximately 1/3 of a second.

    23.

    Create a new Speed By Surface operator below the Droplets Stick event, and name the new event Droplets Slide. Set the Speed to 0.23. Wire this event to the preceding Age Test.

    24.

    Under Surface Geometry, click the Add button and choose the volcano_collision mesh. (If this mesh was hidden earlier, it must be unhidden before it can be selected.) It may be simpler to select the Surface Geometry by using the By List button. Under Direction, choose Parallel To Surface. These settings will keep the particle attached to the surface object.

    25.

    Copy the Force operator and Collision test from Droplets Trail and add it to the Droplets Slide event. The sliding droplets only need a small nudge from gravity, so set the Influence percentage to 3%.

    26.

    Copy the Collision (POmniFlect01) test from the original Bubbling Lava event, and paste it into the bottom of the current event. This will catch any droplets that escape collision as they slide down.

    27.

    Direct particles that test True into a delete event. Rename the new event Droplets Delete (Figure 17.61).

    Figure 17.61. Droplets that escape collision with the crater will be deleted.

    At this point, the droplets still appear as spheres in the viewports, not metaballs, because we have not linked them to the BlobMesh (Figure 17.62).

    Figure 17.62. At first, the droplets appear in the viewport as spheres.

    [View full size image]

    28.

    Before the droplets will be rendered as metaballs, they must be added to the BlobMesh. Add the following events to the BlobMesh's Particle Flow Events list: Droplets Trail, Droplets Stick, and Droplets Slide (Figure 17.63).

    Figure 17.63. Once the droplets are linked to the BlobMesh, they appear as metaballs.

    [View full size image]


    As the droplets slide down the crater walls, they will be reabsorbed into the lava mass. It is not necessary for you to add a delete event to get rid of the particles after they slide down into the metaball mass because they are not set to collide with the crater walls; just follow them until the gravity force pulls them through into the POmniFlect deflector you set up earlier, which will send them to be deleted anyway.

    Smear Effect


    In this section we will add an impact smear and a slide smear to the droplets, primarily through the use of the Shape Mark operator, which aligns particle shapes with a target object's surface.


    1.

    Create a new Shape Mark operator to the right of the Droplets Stick event and name the new event Initial Smear. This event will be used to create an impact smear when the droplets first contact the crater wall.

    2.

    In the Shape Mark's Properties panel, click the button under Contact Object and choose the Volcano mesh, as opposed to the collision mesh, which is a few units higher than the renderable volcano in order to keep more of the metaball drips visible.

    Note

    At this point you may be noticing some significant delays when editing the Particle Flow, particularly if the Time Slider is well into the animation. To reduce the recalculation of the flow with each change, you can go to frame 0 before applying changes to the flow or temporarily turn off the particle system.

    3.

    Set Align To to Particle Z, which will keep the 2D particle shape flat against the surface of the volcano geometry, with its Z axis perpendicular to that surface.

    4.

    Under Size, set the Width and Length dimensions to 45 units.

    5.

    Surface Offset determines how far off the target object's surface the particle shape will be placed. The default setting of 0.001 is appropriate for very smooth surfaces, but for the rough volcano surface, a setting of 2 will ensure that most of the particle shape remains visible.

    6.

    Set this event's Display operator Type to Geometry, so that the particle outlines will show up in the viewport once they have been spawned.

    7.

    To control the spawning of this smear particle, insert a Spawn test into Droplets Stick, just before the final Age Test. The default Spawn settings will be fineeven Speed, since the droplets have been halted prior to the execution of this operator.

    8.

    Wire the Spawn operator to the Initial Smear event (Figure 17.64).

    Figure 17.64. Once the droplets stick, the Spawn test will generate an impact smear particle.

    If we scrub the Time Slider up to the first point that droplets impact the crater's surface, around frame 90, we will see one square particle outline appear in each frame where the droplets are sticking (Figure 17.65).

    Figure 17.65. The impact smear particles show up in viewports as 2D rectangles.

    [View full size image]

    The smear particles will not render yet, as they have no materials and no renderable geometry.

    9.

    To add a material, append a Material Dynamic operator to Initial Smear. Material Dynamic supports animated materials, which can be timed to coincide with particle age.

    10.

    Click the button under Assign Material and choose Mtl Editor (Material Editor) in the Browse From section of the Material/Map Browser. Select the Initial Smear material and click OK.

    If we examine this material in the Material Editor, we will see that the operative portion of the material is its Opacity channel. The Gradient map which controls the material's opacity uses a Particle Age map to control the white (visible) portion of the gradient in the Color #3 slot. (The other two color slots are kept black [opaque] to keep the edges of the texture from rendering.) The Particle Age map applied to the Color #3 slot alters its output based on the age of the particle, expressed as a percentage. The first color (or assigned submaterial) is applied at birth, or 0% of total age. At a percentage of life span equal to Age #1, the output begins changing to the second color or submaterial slot. At Age #2, the output will be completely determined by the second slot. Similarly, at Age #3, the output will switch to the third slot.

    The life span used by the Particle Age map is determined in the same Particle Flow event in which the Material Dynamic operator is evaluated. The most foolproof method is to use a Delete operator with the By Particle Age setting. This will inform Particle Flow as to the exact life span of the particle, and the Particle Age map will apply its age percentages to this value.

    If the particle life span needs to extend beyond this event, simply use an Age Test or other test to send the particle to the next event. In this case, the Delete operator is being used to determine the life span for the Particle Age map, but it never actually deletes the particle.

    Note

    Animated materials can be applied to particles using one of several methodsParticle Age maps, Particle MBlur maps, and animated textures such as .ifl (image file list) or .avi. Simply keyframing material changes in the Material Editor will not work.

    11.

    To control the life span of the initial smear particle, append a Delete operator to the Initial Smear event.

    12.

    Set it to delete particles By Particle Age, with a Life Span of 120 frames.

    13.

    These particles will still not render without a Render action, so append one to the event. (This is in contrast to the metaball particles, which were rendered through BlobMesh, and so they did not require Render operators.)

    If you render a frame from the Camera viewport later in the animation, around frame 240, when initial smear particles are being spawned, you should see them appear on the crater wall (Figure 17.66). These smears will slowly fade away, over 150 frames, according to the settings in the Particle Age map.

    Figure 17.66. The impact smears, rendered via 2D rectangular particles aligned to the crater's geometry.

    A second smear particle will follow the lava droplets as they slide down the crater walls.

    14.

    Clone the Initial Smear event, as a Copy, into a new event below it, naming the new event Smear Shape.

    15.

    Insert a Spawn test into the Droplets Slide event, before the final Collision test. Wire its output to the Smear Shape event.

    16.

    Set this Spawn test to spawn By Travel Distance, with a Step Size of 15 (one particle emitted every 15 units of travel).

    17.

    In the Smear Shape event's Shape Mark operator, elongate the smear particle by reducing the Width value to 20.

    18.

    A different material is available for this effect. In the Material Dynamic operator, assign the Sliding Smear material.

    19.

    This effect should fade out more quickly, so reduce the Life Span in the Delete operator to 100 frames.

    20.

    A nice addition would be to shrink the smear particles, so insert a Scale operator, just before the Delete operator.

    21.

    Set it to type Relative Successive, with all three Scale Factors set to 99%. For each integration step, the particles' scale should be reduced by 1% (Figure 17.67).

    Figure 17.67. A second "smear" event is set up to create a sliding smear as the droplets move down the crater walls.

    If you scrub the Time Slider, though, you will find this is not true. The smear particles are not shrinking, because the Scale operator is being overridden by the Shape Mark operator, which sets the scale as well.

    22.

    Select the last four operators (Material Dynamic, Scale, Delete, and Render) and drag them out of the event into a new event below. Rename the new event Smear Trail.

    23.

    Connect the two events by appending a Send Out test to Smear Shape and wiring the output to Smear Trail (Figure 17.68).

    Figure 17.68. Moving the Scale operator into a new event keeps it from being overridden by the Shape Mark operator.


    Scrub the Time Slider now to see the smear particles shrinking over time. Because the smear event has been split into two separate events, the conflict between the overlapping operators is resolved (Figure 17.69).

    Figure 17.69. The droplets now leave impact smears and sliding smears.

    Glow Effect


    The final touch to add to this lava is a glow effect through Video Post. Because the lava is being rendered through BlobMesh, the effect will be applied to the metaball mesh, not to the individual particles.

    Note

    Particle Flow allows render effects to be applied on an event level, as opposed to the entire particle system. When assigning Object IDs for render effects, use the Object Properties dialog in Particle View (select an event, right-click its header, and choose Properties from the contextual menu), not the PF Source icon's Object Properties dialog.


    1.

    Open Video Post (Rendering > Video Post).

    2.

    Add a Scene Event, which by default will use the Camera viewport.

    3.

    Add an Image Filter Event, specifically Lens Effects Glow.

    4.

    In the Lens Effects Glow dialog, go to the Preferences tab and set the Effect Size to 20 and Color Intensity to 15.

    Note on the Properties tab that the source of this effect in the scene is selected by default by Object ID #1.

    5.

    Click OK to close the dialog, and return to Video Post. At this point, the Video Post setup is complete for applying a glow effect, but adding an Image Output Event is required to render this scene to a movie file.

    6.

    Add an Image Output Event to the Queue. Note that the name of the Image Output Event will reflect the filename assigned to the rendered movie. For rendering stills, clear the Enabled check box in the Edit Image Output Event dialog (Figure 17.70).

    Figure 17.70. A simple Video Post sequence is used to add a glow effect.

    [View full size image]

    7.

    Select the BlobMesh object in a viewport; right-click it and choose Object Properties. In the Object Properties dialog, set the G-Buffer Object Channel to 1.

    Execute the Video Post Sequence to see a glow effect added to the lava (Figure 17.71).

    Figure 17.71. The final lava effect.



    • / 193