Monthly Archives: January 2017

Terrain Intersection

While working on some larger scenes with Terrain objects and Clouds I made a few observations and conclusions.  On a woody hilltop the individual trees can still be made out up to at least 4 miles away, particularly along the ridges.  When making a scene in Carrara we can use the Surface Replicator to easily fill a Terrain object with plants, rocks, etc.  One limitation is that the replicator will only allow for 100,000 maximum objects.  When using real world scaled objects that means we can only use a 2 square mile Terrain object to fill out with a dense forest of mature plants and probably only a 1 square mile or less object for really dense growth and a full canopy.  Carrara can handle a large number of terrain objects filled with replicated trees and render them in good time with low quality GI Sky Light.

Then I saw there were going to be problems when using the replicator with some more complex scenes.  When we have a road over the terrain, a clearing or town, or want to put in a lake or river and bank we might be able to use a Terrain Layer or paint onto a texture map to solve these distribution issues but that there are real problems when Terrain objects overlap.  I always prefer to have a separate Terrain object for a landscape feature, use a Zero Edge Filter and emerge from the Infinite Plane or a larger base and especially to build a mountain range.  If Surface Replicators were used on those overlapping Terrains full of trees then tree tops are going to poke up out of the ground, intersect each other and make a mess.  I couldn’t think of any other solution for that and to help with the other issues above than with a new simple plugin.

The Terrain Intersection Shader can be used with the Surface Replica Shader Distribution to return black or white by itself or to Multiply against a more complex distribution Shader.  Give each Terrain object a list of other overlapping terrains and the plugin will check which is higher and give that the white value.  It can also be used to save time where there are other objects like a tower or town or to make a clearing without needing to paint a texture map for the terrain – especially if you change your mind and want to move things around.

I’ve had trouble in the past with Terrain objects and the Carrara SDK.  Which ever way I try the Rendering Quality Mesh can’t be used, only the Preview Quality Mesh is returned.  The Surface Replicator is able to use it so there must be a way but I’ve never got an answer.  The Terrain Primitive is not included in the SDK.  However since this new plugin is not optimized that isn’t a big issue.  The Preview Quality can be turned up a bit to get a better result but the Preview Quality will give a quicker distribution without me needing to write the extra code.

You can find this plugin in my Laboratory.  Mac version for Carrara 8 will be available soon or on request.