How to use Chaos Scatter with Corona for Cinema 4D - Getting Started
This is "Getting Started with Chaos Scatter". It is a part of a larger collection of articles:
- Getting Started (you are here)
- Advanced Features
- Using Chaos Scatter with Other Features of Corona
- Performance and Troubleshooting
Getting Started with Chaos Scatter
This simple guide shows how to use the basics of Chaos Scatter to set up a scene featuring a forest, grass, and rocks on a large surface.
First, let's get familiar with the basic naming used in Chaos Scatter:
- Distribute-on - this is the object on which we are scattering other objects. Multiple objects can be used for this as well.
- Instanced children - this is the object which we are scattering on the distribute-on target object. Multiple objects can be used as well.
We will start by setting the correct scene units in Cinema 4D. It is important to keep the units adequate to the scene scale. For example, if our scene is a forest, it will be extremely uncomfortable to specify object dimensions in millimeters; and if our scene is a macro close-up, it will not make sense to work in meters.
Since we will be rendering a large area, we can use meters:
We need a base to scatter our objects on. In this example, we will use a landscape object, 500x500 meters large, with enough subdivisions to make it look smooth:
We also need some assets for scattering. We will use a tree, a rock, and a grass model:
Note: you can use Chaos Cosmos, which comes with Corona 8 and newer, to quickly load assets into your scene for free and without having to visit any external services.
Note: pay attention to the pivot of the object that you are scattering! The pivot's position defines the point which will be placed on the distribute-on object and the pivot's Y-axis defines the up-axis (upwards along the normals of the distribute-on object). If your trees are flying above the ground - most likely the pivot of the original tree model is placed too low below the tree trunk. Moving the pivot up should fix the issue.
Once the ground plane and the assets are in place, we can create a Chaos Scatter object anywhere in the scene. You can create it from the menu Corona > Chaos Scatter:
Once the Chaos Scatter object is in the scene, you can select it and pick:
- The ground object as a "Distribute-on" object
- The tree model as an "Instanced child"
Note: You must nest the tree model inside the Chaos Scatter object so this way the Chaos Scatter can scatter the tree model over the landscape/ground object
You will immediately see the trees scattered on top of the ground plane in the viewport, and also if you render your scene:
Note: by default, the scattered objects are aligned to the normals of the distribute-on geometry. If you want your scattered objects to always remain vertical (in the case of trees you probably want them to be growing straight up, not to lean according to the underlying surface curvature), you can use the "Normal Alignment" option for this. The value of 0 means that the objects are aligned to the surface normals. The value of 1 means that the objects are aligned to the +Y axis (vertical upwards). The value of -1 means that the objects are aligned to the -Y axis (vertical downwards).
At this point, we can see that the trees are not scattered in a very natural way. We can use some of the Chaos Scatter features to improve this.
First, we can increase the number of trees using the "Count" value under the Surface Scattering tab:
To prevent trees from intersecting with each other, we can enable the "Avoid collisions" option under the "Config" tab:
If the forest becomes too sparse, we can lower the Spacing value under Avoid collisions. The value considers the size of the tree's bounding box, in percent. 100% means that no bounding box can touch each other. More than 100% means that there will be an even larger distance between the trees. Values lower than 100% mean that some overlapping is allowed, but since the tree model does not take all space inside its bounding box, we can go ahead and use values around 30% - 50%. This will make the distances between the trees more natural without visible overlapping:
The forest already looks good, but we can make it even more natural by randomizing the rotation of the trees. We don't want all trees to be growing in exactly the same direction. For this, we can use Rotation randomization under the "Transformations" tab. We can set it as follows:
- X rotation from -5 to 5 (this will slightly lean the trees in the X axis)
- Y rotation from -5 to 5 (this will slightly lean the trees in the Y axis)
- Z rotation from 0 to 360 (this will result in random Z rotation)
Note: Z randomization is actually enabled by default
Note: The first column will define rotation in the X-axis, the second will define it for the Y-axis, and the last one for the Z-axis.
Additionally, we can make use of one of Chaos Scatter's most powerful features: the Slope Limitation. This can be used to decide on how steep surface the trees should grow. For example, a very low limit like from 0 to 10 degrees will only allow the trees to grow on an almost flat surface. Increasing the limit, for example from 0 to 20 degrees, will let the trees grow in slightly more steep areas. A very high limit, like from 0 to 90 would mean that the trees can grow even perpendicular to the ground, which we probably don't want.
Another powerful feature of Chaos Scatter is Spline Includes and Excludes, which can be found under the "Areas" tab. This can be used to only allow the scattered models to appear inside a specific spline (or a list of splines) or to exclude them from a specific spline area (or a list of splines). Typical uses for spline excludes would be making sure that trees or grass are not growing where a house is placed, or excluding the trees from the area where the camera is placed, to make sure that the camera does not intersect with a tree:
A circle spline is used as a Spline Include, and the Slope limitation is set to work from 0 to 25 degrees (this is why you can see there are some missing trees inside the circle area):
The same circle spline is used as a Spline Exclude, and the Slope limitation is set to work from 0 to 25 degrees, this is why you can see there are some areas with missing trees:
Note: when using the spline includes and excludes option, you can use the additional controls (Near, Far, Scale, Density, Axis) to further control the behavior of the instances affected by the spline includes and excludes:
|Circle used for spline includes. Default settings (Near and Far set to 0).||Circle used for spline includes. Far value increased. This creates a falloff effect outside of the include spline.||Circle used for spline excludes. Far value increased. This creates a falloff effect inside the excluded spline.|
Remember you can animate Chaos Scatter parameters and objects! This unlocks many possibilities, like growing a forest, making rocks levitate, making certain parts of the scatter disappear, and so on:
Lastly, we can introduce some additional randomization:
We can randomize the scale under the "Transformations" tab within the 25% to 100% range. This means that the scale of the trees will be random, and the smallest allowed models will have 25% size of the original model:
We can also randomize the tree colors a bit by using the Corona Multi shader in "Randomize by: Objects" mode. Note that the Corona Multi shader and other maps, materials, and Corona features are fully supported by Chaos Scatter. We can plug the original bitmap, which is used to texture the tree leaves, into the Corona Multi shader. We can then use it as the only item in the Multi shader and use the built-in hue and gamma controls to randomize its colors:
We can then use similar scattering and randomization techniques to add grass and rocks to our scene. The result is a realistic hill with trees growing on it, accompanied by some grass and rocks scattered on the ground:
Tips and Tricks
Using Chaos Scatter with Chaos Cosmos
Remember that you can use Scatter with Cosmos to:
- Load Scatter presets which are included in Cosmos (either import them into the scene, which will create a whole new Scatter; or select an object and then import a preset - this will treat the selected object as the distribute-on object).
- Import any Cosmos model into your scene and manually scatter it.
Chaos Scatter Presets are available in the Cosmos browser ready to assign to a surface or a spline.
How to use Chaos Scatter Presets:
- Open the Cosmos browser. (menu Corona -> Cosmos Browser)
- You can navigate to the “3D models” category and then click on “Presets” or search for the keyword “Scatter” in the search bar.
- Find the required preset, then download it.
- Once the preset is downloaded, import the preset into the scene using the Import button- this will create a whole new Chaos Scatter object which will include all the necessary assets.
Note: some presets are intended only for use on surfaces, and others for use on splines. If you are not sure whether a preset should be applied to a spline or a surface, you can check a visual hint in the preset thumbnail itself (e.g. a blue glowing path suggesting that a preset should be used on a spline), and an additional icon with a tooltip that appears if you hover over it:
- Finally, go to Cinema 4D app and modify the Chaos Scatter properties as you wish!
To learn more about the Chaos Scatter, see also: Chaos Scatter