|
|
OK. How about this?
1. This technique uses the normals read at random locations on a
height_field to calculate the bending angle and orientation of reed
stalks as if they were blown by the wind.
2. Any height_field might do. However, a wave pattern is often observed
when watching corn or reed fields, so a height_field based on a ripple
or wave pattern will be most effective.
3. The first step is the creation of an image_map showing such a wave
pattern. This is done by setting parameter Mapping to 'on'. The code
provides a selection of settings but anything can changed until you get
an image satisfying to you. When this is indeed the case, you can set
parameter Mapping to 'off'.
4. Before going on, you will need one or more sets of reed stalks. Those
stalks need to be articulated following the Inverse Kinematic (IK)
procedure. This sounds more complicated than it is in reality when using
a modelling program. Just remember that each section of the stalk is
rotated /at the origin/ *and* /at its base/ and nested hierarchically
from extremity to base.
5. Now build a height_field using the wave pattern image_map. Play in
particular with the vertical scale of the height_field as this
influences the normals and hence the /strength/ of the wind to some degree.
6. To determine the random locations on the height_field, VRand_In_Obj()
is used as basis for the trace() function. This means that /any/ object
can be used to select the points. This can be useful to model irregular
reed fields with open patches of water for instance. In the provided
example, a simple box is used. The object can have any size but is only
effective when situated over the height_field of course.
7. A parameter WindStrength is provided to control the impact of the
wind on the bending of the reed stalks. Small amounts will already have
important effects, so be careful with this.
8. Provide the number of locations you need for filling the reed or corn
field.
Thomas
Post a reply to this message
|
|