作者:四叶草 来源:飞特网原创教程 浏览次数:加载中... 网友评论 0

in this example we’ve made the blue area around the robot transparent and closed the dialog. if we make sure that transparency is turned on for this layer (no red "x" over the transparency icon) the stage should now show the explosion “behind” the robot:

robot on top of explosion

selecting a transparent color from the image is not the best way to use transparency -- using an image that already has an alpha channel to define the tranparency is the way to get the highest-quality results.

suppose now we wanted the explosion to appear to be in front of the image instead of behind it. we can easily change the order of the layers to accomplish this. just click on the "top" layer's name in the layer window and drag it onto the "layer 0" layer or below. the "top" layer will now be listed below the "layer 0" layer, and the explosion will be drawn on top. (like all drag and drop operations in particleillusion, the dragged object is positioned below the object it is dropped on.)

robot below explosion after reordering layers

looking back at the image transparency dialog, the use image as stencil option allows you to use a bg image as a "stencil". what does that mean? well, suppose you wanted to make "spakle text" -- you want to fill the text with sparkles, but outside the text there are no sparkles. what you can do is create a new layer on top, load the text image, and use transparency to make the text transparent. then put the sparkles on the lower layer and you'll only see sparkles in the text area. works great, but what if you want the "sparkle text" to be over another image? this method wouldn't work since the non-transparent parts of the text image (that are covering the unwanted particles) would also cover the background image on the lower layer.

when the use image as stencil option is checked, the image works a little differently. instead of letting whatever is below it (on lower layers) show through in the transparent areas (and not letting it show though in the non-transparent areas), it lets everything below it (on lower layers) show through, regardless of the transparency. instead the image is used to mask particles on the same layer, so particles in the transparent areas will be visible, but particles in the non-transparent areas will not be visible.

let's look at an example. use our example from above, but load a bg image in the top layer.

new image on the upper layer

now open the transparency dialog. select the white area to make transparent, then check the use image as stencil option.

transparency dialog stencil option

if transparency if off (t icon with red "x" on it) then the "stencil" image will cover up everything beneath it (as you'd expect).

transparency off

turn on transparency (click the t icon) and you'll see the stencil at work:


the explosion is only visible in the area that we made transparent. the main thing to remember about the use image as stencil option is that when checked the image affects the particles on the same layer, not on the layers below. that covers the use of transparency with layer background images.

look back up at the image of the explosion on top of the robot (after we dragged the "top" layer to the bottom). notice that depending on which layer is selected (highlighted in light red in the layers window), the emitter symbol on the stage may not be visible. this is to help keep things organized, and to assist us in remembering which emitters are on the same layer.

this function is controlled by the current objects only menu item (see the menu shown below). when checked, only the stage objects (emitters, deflectors, blockers) that are on the selected layer are displayed on the stage. when unchecked, all stage objects are displayed at all times. in this case, selecting an emitter or other stage object that is on a different layer will make that layer selected. (remember that only visible stage objects can be selected with the mouse.)

layers window context menu

the current particles only menu item is similar, but instead of controlling the display of stage objects, it controls the display of particles on the stage. if you have the toolbar show particles button on, then checking this menu item will only display the particles that exist on the selected layer.

the current bg only option is similar as well, but applies to the background image for each layer.

the last menu item in this category is all objects on top. when checked (as is the default) all stage objects are drawn last so they appear on top, regardless of any other layers that may be drawn on top of them. in our example above when the explosion was on the lower layer, the explosion emitter symbol was still visible. if the all objects on top option is unchecked, then the bg image of the top layer would have been drawn over the emitter symbol. with this option turned off, it is possible to see how emitters are layered in the project, but for the most part you’ll probably want to leave this option checked.

we've skipped over a couple of menu items: duplicate layer and delete layer. both are straightforward -- select duplicate layer to make a copy of the layer. all objects on the layer and the background images will also be duplicated. note that there is no undo of this operation, but the newly-created layer can easily be deleted. after selecting delete layer, you must confirm the deletion:

delete layer confirmation

note that when a layer is deleted all objects on it will be deleted as well.

there are two items remaining on the layers window context menu: colors and rename. renaming a layer is straighforward, and you can also rename a layer by double-clicking it's name in the layers window. colors allows you to set the color used in the layers window for each layer. the options are:

layer colors

when all layers are set to system, the selected layer will be drawn in a light red color, and all other layers will be drawn in white. this is the way the layers window worked in previous versions of particleillusion. when any one layer is set to another color, this behavior stops, and the only indication of the selected layer is that it will look "sunken", and its colors will be more vibrant (non-selected layers appear "greyed out").

all layers set to system color option       layer 0 set to color green

the image on the left is with all layers set to system color and "layer 2" selected. the image on the right has "layer 0" set to green color and "layer 2" is still selected. setting layer colors is a good way to help organize your project -- related layers can be made the same color.

we have seen how to change the order of layer using drag and drop, and previously we learned how to change the order of emitters on a layer the same way, but what if we want to move an emitter from one layer to another? one way is by dragging the emitter in the hierarchy and dropping it on the layer you want to move it to. the other method involves cutting and pasting.

cut, copy, & paste

the cut, copy, & paste commands are probably familiar to you from other applications. typically in those applications cut removes the selected object and places it either on the windows clipboard or an application clipboard. if it uses the windows clipboard, it can then be pasted into other applications. copy puts a copy of the selected object on the clipboard, and paste places a copy from the clipboard into the application.

in particleillusion cut, copy and paste work on the selected emitter, deflector, blocker, or force (we’ll get to these very soon). the selected object is placed on the particleillusion clipboard, so it is not available to other applications. the cut, copy, & paste functions are available from the edit menu, using the standard windows keyboard shortcuts (ctrl+x to cut, ctrl+c to copy, and ctrl+v to paste), from the stage context menu (r-click on the stage) or from the main toolbar:

cut copy paste buttons

to move an emitter from one layer to another using this method, simply select the emitter, use cut to remove it from the project, select the layer you want to move it to and use paste. note that the emitter is pasted in exactly the same position. this isn’t a problem when cutting the emitter, but what do you do when you’re making a copy of an emitter?

let’s start a new example. start a new project. place an "explosion 3" emitter on the stage. now use copy to place a copy of the emitter on the clipboard without removing the emitter from the stage. (you’ll notice that the paste command is disabled until something is on the particleillusion clipboard.) now use paste to add a copy of the emitter. we can see in the hierarchy window that two emitters are present, but we can only see one on the stage. that’s because the copy was pasted in exactly the same position as the original.

what if we want to move the new emitter? we can’t click on it and drag it, because clicking selects the first emitter. this is when the move function that we discussed so long ago is most useful. after pasting the emitter, it will be selected already. just use move (via the main toolbar button or by pressing m) to move the new emitter where you want it. (note that if the current frame is not 1, an emitter motion path will appear when you move the emitter. you might think that this will result in the emitter moving across the stage and it will, but the emitter will not yet be active, so it will not be visible during playback before the frame it goes active.)

an easier way to paste an object at a different position is to use the context menu. r-click on the stage and select paste. the object is pasted at the point you r-clicked on, so there is no need to use the move function.

when you paste an emitter, its animated properties (any property that changes over time) are adjusted to be relative to the frame number at which it was pasted. this doesn’t make any difference when just making a copy of an emitter or when moving it to another layer. it does make a difference when the current frame number is changed between the copy (or cut) and paste operations though.

here’s a simple example. suppose we added an emitter to the stage at frame 30, then spent a lot of time changing properties until it looked the way we wanted it to. then we realized that we really wanted the emitter to start at frame 35 instead of 30. adjusting the frame numbers of each of the data keys in each of the property graphs would take forever! luckily there is a much easier way. just cut the emitter, change the current frame to 35, then paste the emitter. the position of the emitter will be exactly the same, and all of the animated properties will be too, except all of the data keys will be shifted by five frames.

if instead of cutting the emitter we copied it, we could add duplicates of the emitter at different frame numbers. take this example: we have an explosion that we’ve modified (so we can’t just add more copies of it from the library) but we want several of these explosions to occur shortly after one another. we would just copy the emitter, adjust the current frame, then paste a copy of the emitter. we could then move it a little if wanted, or just change the frame number and paste additional copies.

okay, so now we know that we can use cut to remove an emitter from the stage, but that places a copy of the emitter on the clipboard (which replaces the previous clipboard contents). isn’t there a way to just delete an emitter without using the clipboard?

there are two ways to delete an emitter (or other stage object) without using the clipboard. the first you have seen already: r-click in the hierarchy window on the emitter and select delete from the menu. the other way to delete an emitter is to use the delete key on your keyboard. pressing delete will delete the current emitter, unless a point is selected. (point? what points? what does that mean?)

emitter shapes

for the most part the emitters that we’ve been looking at have been point emitters. point emitters emit particles from a single point. there are three other basic shapes for emitters: line, ellipse, and area.

you may remember this from our discussion of the properties dialog – line and ellipse emitters create particles all along their length instead of at a single point, and area emitters create particles throughout their area. (you can also set the particles to emit from discrete points along the emitter – remember?) library emitters can be line, ellipse, or area emitters and will be displayed that way in the preview window. it is also possible to convert an emitter on the stage from one shape to another. for instance, we’ve already changed a point emitter into a line emitter in a previous tutorial, but we'll cover this again shortly.

if we select a library emitter that is a point emitter, adding the emitter to the stage requires just a single click of the mouse. to add a line emitter to the stage requires at least two clicks (one for each end of the line), but since a line emitter can contain any number of line segments it can require more. each click of the mouse defines one of the points of the line emitter. select the "stage lights" emitter from the library and add it to the stage. add three points, then r-click to cancel adding of the last point. we can stop adding points by double-clicking too, but the difference is the last point is not deleted as it is when r-clicking.

when we stop adding points, we end up with an emitter that looks something like this:

line emitter

the three points that we added are the line points. the small point above the middle line point is the emitter reference point. think of this as the “center” of the emitter. we’ll come back to it in a moment.

notice that the last emitter point is highlighted (drawn with a thicker circle). this is what we meant earlier about the delete key deleting the emitter “unless a point is selected”. the highlighted line point is selected, so pressing delete will delete the point instead of the entire emitter. we’ll discuss the line points now.

if we look at the hierarchy window we’ll notice that there is a new addition to the hierarchy: the points folder.

points folder for line emitter

the points folder holds each of the line points for this emitter. the points are simply designated by number. clicking on one of the points in the hierarchy window selects that point on the stage. you can also select points by clicking on them on the stage, or by using the keyboard shortcut of tab to select the next point in the emitter. shift+tab selects the previous point. (remember that if no points are selected tab is used to select the next emitter.) we can deselect all points by either selecting a different emitter on the stage or hierarchy window, or by clicking on the line emitter reference point, or by clicking on an empty part of the stage window.

if we select one of the points in the hierarchy window, the graph window will display the point position graph for the selected point. this is similar to the position graph for an emitter, but it applies to position changes that the selected point alone makes. there should be just a single position key shown at frame 1 in our example. now jump to frame 30 and drag the middle line point up above the emitter reference point. notice that the point position graph has changed:

point position graph for animated point

a position key has been added to the graph for this point, which means that this point will change position between frames 1 and 30.

note that unlike emitter position which can change in either a linear or curved path, point position can only change linearly – it is not possible to make a point move in a curved path.

the move function will also work on the selected line point, and a position key will be created if needed. (see the section on using move with emitters.)

what if we decide that we want to add a point to a line emitter? r-click on the line point that we want to add the point after, then select add point from the menu. a point will be added; r-click to abort the addition of the point and l-click to accept it. note that any points that are added to an emitter will exist from frame 1.

there is something interesting to note about line emitters. particleillusion attempts to adjust the number of particles the emitter creates based on the length of the line emitter. the result is that short line emitters will emit fewer particles than long ones. in fact, if the line emitter is made very short – almost a point emitter – it is possible that no particles will be emitted. likewise very long line emitters may emit too many particles. therefore, adjustments to the emitter number property may need to be made.

the next two emitter shapes (we've already covered line and point) are circle and ellipse. we'll talk about them together, because they are almost identical. when adding a circle or ellipse emitter from a library, the click point determines the "center" of the emitter, and the initial radius of the emitter is determined by its radius emitter property.

circle emitter

the dotted line indicates the radius at which the particles will emit from. the small point at the right edge of the emitter is the “radius handle”. to change the radius of the emitter we can click and drag the radius handle. the mouse cursor changes to a crosshair, and moving the mouse changes the radius.

we notice that as we change the radius, the graph window displays the radius graph and the changes we are making. (the radius property in the hierarchy window is only present when the emitter is a circle emitter.) we can also change the radius of the emitter by changing the radius property graph directly.

to convert the circular emitter to elliptical (oval), alt-click on the radius handle, or r-click on the emitter and select make ellipse. a second radius handle will appear at the bottom of the emitter. each of the two radius handles moves independently, so the emitter can be made elliptical. notice that the hierarchy window no longer has a radius property, but shows x radius and y radius instead.

to convert the elliptical emitter back to circular, alt-click on either of the radius handles. the resulting circular emitter will have the radius of the handle on which you alt-clicked. alternately, r-click on the emitter and select make circle.

(note that in the same way that the number of particles that a line emitter creates is based in part on the length of the line, the number of particles that an ellipse emitter creates is based on the size of the ellipse. small ellipses may emit too few particles, and large ellipses may emit too many. use the emitter number property to compensate.)

the last emitter shape is area. area emitters are rectangular, and particles are created everywhere within the rectangle. when adding an area emitter to the stage, the first click determines the "center point" of the area rectangle; the width and height of the area emitter are set by the corresponding properties of the library emitter.

changing the width and height of an area emitter

to change the width and/or height of an area emitter you can click and drag the handle located in the lower right corner of the emitter's rectangle on the stage, in the same way a circle or ellipse emitter was resized. similar to the way that the radius graph was displayed when dragging a circle emitter handle, the width graph is displayed when dragging to change an area emitter's size. you can also modify the width and height properties directly by selecting either in the hierarchy and modifying the data keys in the graph window.

area emitters in the properties dialog

there are a few additional options available for area emitters in the emitter properties dialog; we'll look at them now. way back in tutorial 3 we discussed the emit at points option.

more options with area emitter

with an area emitter, you can see that there are two values that can be entered, allowing you to create a grid of emission points. the following examples show 1 by 1, 3 by 1, and 3 by 3 emission points with the "heavy fire sparkles" emitter:

1 by 1     3 by 1     3 by 3

area emitter mask

below the emit at points options is a checkbox titled mask emitter with image(s). before we check this option, we'll need an appropriate emitter. start with the "heavy fire sparkles" emitter and convert it to an area emitter. make sure emit at points is not checked. select the particle type life variation property in the hierarchy and drag the data key in the graph window down to 0. now select the emitter life property in the hierarchy and set it to 20%. (if the percentage sign is not displayed in the graph title, then you've probably selected the particle type life property instead of the emitter life property.) then change the width to 320 and the height to 240. you should have something that looks like this:

sparkles area emitter

now check the mask emitter with image(s) option. you'll see the particles disappear from the preview window, and an options button will appear. click the options button.

mask options dialog

we can see the reason for the particles disappearing from the preview window: there are "no images selected". click the small button to the right of this message, browse to the "sample projects" folder, and select the "attackbotbehind.png" image. you will see the preview window look something like this:

sparkles area masked       the image used to mask

the image we loaded contains an alpha channel, which is being used to determine where in the area emitter particles are allowed to be created. in areas where the alpha channel is transparent (value of 0), no particles will be created. semi-transparent or fully opaque areas will allow creation of particles. you can see that the particles are being created in an area that looks like our robot only, but it's difficult to see. increase the number of particles to see the effect more clearly:

sparkles area masked more particles

if you open the mask options dialog again, clicking the invert alpha option creates particles only in the transparent (value 0) areas of the image's alpha channel:

invert alpha

although using a single image as a mask can be quite useful in many cases (for emitting particles from a logo, text, etc.), it is also possible to use a sequence of images for the mask. if you select an image that is detected to be part of a sequence, you will be asked if you want to use the sequence (as we've seen in other tutorials). answer yes and the sequence will be used. a few more controls appear in the mask options dialog:

sequence options for mask images

you can choose whether to use the frames in order or randomly using the sequential and random options, and can start the sequence at some frame within the sequence using the start image option. the hold frames option determines how many times each mask image is used before advancing to the next image in the sequence. the default is 2, because having the frames change too quickly makes it difficult to determine the shape of the mask from the particles.

you may be thinking that the area emitter mask feature is the same as using a background image as a stencil. they're similar, but the difference is that stencil doesn't show any particles or parts of particles that are outside of the stencil area, but area emitter mask just defines where particles are created. the particles can move outside of the mask area after they are created. so it's possible to create bubbles rising from your company logo -- stencil will not allow you to do that.

now we're finished with looking at area emitters. as we stated at the start of this section, it is possible to convert stage emitters from one shape to another.

emitter context menu showing emitter shapes

to convert an emitter to a different shape, just select the shape from the menu make point, make line, make ellipse, make circle, or make area. not all choices are available at all times, since the emitter's current shape will not be shown (when a point emitter is r-clicked on, the make point option will be missing).

we briefly looked at the emitter angle property in an earlier tutorial, but didn’t go into it since point emitters aren’t really affected by the angle property (unless the attach to emitter option is used). angle makes more sense when applied to line, ellipse, and area emitters. clear the stage and add a "matrix falls" emitter to the stage. adjust the angle property value (in the graph window) and we can see the emitter rotate on the stage.


ok, so we've seen how to convert an emitter into a different shape. what if we want to convert one emitter on the stage into a totally different emitter? of course you can just edit the emitter's properties, but that could be a lot of work. fortunately there is a function that will replace a stage emitter with any library emitter: the replace function.

first, select the library emitter that will replace the stage emitter. then r-click on the stage emitter and select replace. you'll be asked to confirm the replacement:

confirmation of replace

after clicking yes, you'll see the replace emitter options dialog which allows you to determine which stage emitter properties to save, and which to replace with the library emitter properties.

replace emitter options dialog

[错误报告] [推荐] [收藏] [打印] [关闭] [返回顶部]

  • 飞特网大部分教程属网友投稿,并不代表飞特网立场。如果您的教程在飞特网发布后没有注明作者和出处请联系我们处理。
    访问本站推荐使用分辨率1280*1024,internet explorer7.0浏览器。