Professional Documents
Culture Documents
Our goal is to speed up this quiet flow making it turbulent. To achieve this we have to
add some obstacles to the river channel. Suppose that our river has just come to the
forest from a mountain country so that its bottom may be stony and some stones may
be seen from under the water.
First of all let us outline an area on the river where we want to see stones.
Area
Select River_0 in the Objects Tree. When the river is selected the Area Creation
button appears in the object-specific part of the toolbar:
Click this button to enter the Area Creation / Editing tool. Now you can create area
points by left clicks at any viewport. However, you have always remember that area's
points must belong to the river surface. That is why the mouse cursor may change its
icon when you move it over some viewport.
This icon shows that an immediate left click at the cursor location in the
viewport will add a new vertex to the area being created. The vertex will appear just
at the point of intersection of a ray outgoing from the current mouse location in the
direction of the current view with the river.
This icon shows that a new vertex cannot be created because a ray outgoing
from the current mouse location in the direction of the current view does not intersect
the landscape. Thus, a new area on the landscape may be created in a viewport if the
mouse cursor lies within the landscape projection onto this viewport.
Tip: The best view for area creation on the river surface is the top view. However, we
want to see how the new area is seen through the camera viewport. To make the
camera view re-draw immediately every area point being created in the top view,
button at the main
render the scene in the camera view using Skeleton mode (
toolbar)
In the top view locate the mouse cursor somewhere inside River_0 in the vicinity of
the camera, press the left mouse button and draw a closed shape without releasing the
button. The area (shown by the red line in the picture below) should look
approximately like:
To finish with the river area release the left mouse button and press the right button.
The area on the river surface is ready. Its default name in the scene is Area 2. Now we
have to add some stones to the area.
As you have dropped stone1 to Area 2, the program will ask you about the type of
object distribution:
Scattering Parameters.
Size and Density.
In the Property Tree of Area 2 select Area 2 :ON / Scattered Object / Size & Density.
The Size and Density dialog appears in the bottom window of the Property Editor:
This property sets the overall size and spacing of the objects. The size of individual
objects varies randomly between minimum and maximum settings.
The default value 50 units for the average distance between scattered objects is too
large for our river area. To make our stones more dense, decrease the default value of
the average distance from 50 to 8. Also, we have to make the stones smaller. Set the
height range to maximal height 4, minimal height 3 and render the camera view.
Distribution
In the Property Tree of Area 2 select Area 2 :ON / stone1 / Distribution. The
Distribution dialog appears in the bottom window of the Property Editor:
We will set negative values to both maximal and minimal heights to sink a little the
scattered stones in the water. We need this to create an impression of stones lying on
the ground. Set the max height to 2, while the min height to 2.5 (remember that the
average height of the stones varies from 4 to 3 units) so that the stones will not be
fully sunk.
and choose Convert in the pop-up menu appeared. The 3DS-material will just be
converted into the inner WB material. In the updated Property Tree expand KAM01
as shown on the left panel in the figure below and select Phong Photometry. The
Phong Photometry dialog appears in the bottom window of the Property Editor (the
right panel):
Set the coefficients of the Phong photometry model to what shown on the right panel
above. Notice that we have just increased the diffuse and specular components of the
material increasing its reflection ability.
If we render the camera view in the AA buffer mode (
toolbar) we will see the following image:
Incremental Design
In what follows we will adjust river flow parameters and thus we will need to draw
our river many times. In order not to waste time for the landscape drawing let us use
the so-called incremental design approach. In the Objects Tree select River_0. In the
Property Tree for River_0 select Settings. The following dialog appears in the bottom
window of the Property Editor:
Click at Invisible. Now River_0 surface will not be drawn, while the stones scattered
on it will be seen. Render the camera view. When the image in the camera view is
ready, click Incremental Design Step Forward (
button in the main toolbar). All
the renderable objects in the scene are hidden. The camera image with depths (ZBuffer) has been stored in the computers memory. In the River Settings dialog
(above) uncheck Invisible to make the river visible again. Now all is ready for
multiple river drawing.
External Perturbations.
Up to now the only animation of our river was the procedural flow. WB allows also to
add some extra animation to the water surface by means of the so-called External
Perturbations. The main idea of this kind of animation is that we place an external
object to the river channel and tell the river to create some kind of surface
perturbations from the object. The perturbations are created automatically. All the
External Perturbations are subdivided into two big groups perturbations created by
the scene objects (objects, seen in the Objects Tree) and perturbations created by the
objects scattered in areas. Perturbations also differ by their types. There are four types
of perturbations: Circular Waves for Dropped, For Oblong Dropped, Waves for Static
Object and Cavity.
To add any kind of external perturbation to the river surface select River_0 in the
Objects Tree and then click at External Perturbations in the Properties Tree. The
External Perturbations dialog appears in the bottom window of the Properties Editor.
Click at the small green cross at the dialogs toolbar. A list of possible External
Perturbations appears. Select Cavity and click OK. The selected External Perturbation
is added to the river.
Cavity.
Cavity is an external perturbation of special type simulating the decrease of the water
level in an confined region just after the obstacle immersed into the river.
If Cavity is attached to the river and this property is selected in the Property Tree (the
left panel in the picture below) the following dialog appears in the bottom window of
the Property Editor (the right panel):
Depth defines the maximal decrease of the water level behind the obstacle.
Set Length to 15 units, Central Angle to 60 degrees and Depth to 0.25 units. These
values are resonable for the size of our river and stones immersed into it.
It is well seen that the flow in the river channel became remarkably more turbulent.
Compare the latest picture to the previous one. Obviously, the stones produce a
chaotic flow pattern and the only thing we still have to do is to add some foam to the
turbulent stream.
Foam
Up to now the rivers Area 2 contained only the distributed stones in it. It seems to be
reasonable to add the foamy material just to the same area in which perturbations are
created.
Foam Material.
In the Property Tree for Area 2 select Area 2: ON. The main area dialog appears in
the bottom window of the Property Tree:
Click at the little green plus at the top of the dialog. The list of possible area contents
appears (left panel below). Select Material in Area and click OK. A new material is
added to Area 2. In the Property Tree select the new string Material in Area and right
click on it. The following pop-up menu appears:
Select Add. The list of all possible materials appears (right panel below):
Select Foam and click OK. Foam is added to Area 2. Now we have to fit parameters
of this shader. First of all, adjust the fractalization of the foam.
Color Gradient.
In the Properties Tree for Area 2 select Material / Foam / Color Gradient. The
Gradient Editor appears in the bottom window of the Properties Editor. Its default
view is shown in the left panel below. Using the short command reference below, set
the gradient to what is shown on the right panel. This will result in more chaotic color
distribution in the foam material.
Default Gradient
Final Gradient
Apply Color - When selected, provides a pencil mouse pointer that enables you to
apply the current color anywhere along the color gradient. Click the button and move
the mouse anywhere along the color gradient, clicking where you want the current
color added.
Select Color - When selected, provides an eye dropper pointer that enables you to
select a color anywhere along the color gradient. The selected color becomes the
current color as displayed in the Current Color button.
Delete Color - Enables you to click and thus delete any color in the color gradient.
Reset Gradient - Resets the color gradient using the left-most and right-most
colors.
Current Color - Enables you to select a color from the Color Picker. Click the
button, select the color you desire and click OK.
Noise 2D.
In the Properties Tree for Area 2 select Material / Foam / Noise 2D. The noise dialog
appears in the bottom window of the Properties Editor (see above).
The noise parameters should be adjusted empirically (that is why we asked you to use
the Incremental Design approach, see above). The values shown in the figure above
lead to the following camera view:
It is well seen that the foamy stuff occupies all Area 2. Now we have to confine the
application of the foam material by the cavities created by the stones. To do so we
shall use the Placing Conditions.
In the Property Tree for Area 2 select Area 2: ON / Material in Area / Foam / Placing
Conditions. The following dialog appears in the bottom window of the Property
Editor:
First of all unselect Ignore All check box. In our case we shall deal with the altitude
range only. Note that above and below the edit lines controlling the altitude range
there are a pair of informational controls showing you the actual heights range in the
river mesh. Obviously, the negative minimal value results from the Cavity action. If
you set the range as shown in the figure above (from 3 to 0.5) the foam will be
applied only within the cavities.
Render the scene to get the camera view:
If you will now render the animation you will see that some flow parameters should
be re-set. First, the flow is still too slow. Second, it is shifted to the right shore so that
the foam drift is almost suppressed in the vicinity of the left shore.
Let us correct these faults. We shall do two things. First, increase the river flow speed.
Second, change the rivers speed profile to make the flow occupy nearly all the
channel.
Background
The first step is to create the background image. It is very similar to what was
described in Incremental Design part with the only additional detail. You have to save
the camera image before clicking Incremental Design Step Forward (
button in
the main toolbar). To save the image click Window / Save picture at the main
toolbar. The standard Save File dialog appears. Important: you have first to set the file
type filter to *.zbf files. Than type the file name and click Save. The background
image is saved.
Camera part.
In the Objects Tree select Camera01. In the Properties Tree for Camera01 select
Output. The Camera Output dialog appears in the bottom window of the Properties
Editor. Select Window Bitmap among the list of possible file formats. The Path
control at the bottom of the dialog is no longer gray. Type the full path of the output
file or use the Browse button to specify the file name and the path. Finally, check
Replace if exists box to overwrite the existing files.
The next step is to assign the background image. In the Properties Tree for Camera01
select Image Composer. The Image Composer dialog appears appears in the bottom
window of the Properties Editor. Click at Static to ensure the static background. Use
the Browse button to specify the path to the *.zbf camera image file you have just
saved. When you have chosen the file and clicked OK in the standard Open File
dialog, World Builder asks you about the Units System you use in the current project:
Click OK to accept metric system or choose your system using the pull-down box and
then click OK. The background image is assigned.
Final Rendering.
Click the Final Rendering button (
) at the main toolbar to begin render series of
images for the movie. The Render Options dialog appears. Set Frames to All to
render all the frames allowed (the default number of frames is 100). Set Rendering to
Production to ensure anti-aliasing of the final images. All other values in this dialog
are taken from Camera object and may be changed here. Make sure that the rest
parameters are that you want and click Render. The series of frames has started.
Appendix.
The river foam shader imposes some important restrictions on the usage of the shader.
Before rendering an image with foam on the river in A- and AA- buffer mode make
sure that rivers shores are assigned correctly. Under correctly I mean that the left
river shore is really left with respect to the flow direction; the same to the right shore.
The figures below demonstrate correct and incorrect shores assignement.
Correct shores assignement. Note that the flow direction is shown by little arrows.
The right part of the figure shows Select Shores dialog. The gray informational lines
read the names of skeletons chosen as shores.
Incorrect shores assignement. For example, SkeletonLine0 is in fact the left shore.
Meanwhile, it is assigned as the right shore. This situation may lead to rendering
artifacts when A- or AA-buffer rendering modes are chosen.
How to correct the shores assignement. Click at Select Shores in the Properties Tree.
The Channel Definition dialog is loaded to the bottom window of the Properties
Editor:
Click at Left Shore. The Select Object from Scene dialog (right panel above) appears.
Select a skeleton you want to be the left shore and click OK. The left shore is
assigned.
Repeat the same actions for the right shore. The right shore is assigned.