Using Modeler it is easy to model landscaping elements. This may include large landscaping areas like forest/tree areas as well as generating small details on proposed terrain surface.
This part of the tutorial will introduce the capability of modeling existing forest/tree areas that are represented by 2D polylines. In this way you can quickly populate existing and proposed areas with trees or other landscaping/greenery objects.
Tutorial file location (folder)
From the folder you can see the sub-folder structure that is explained below:
- VM - *.vm file format is used for Modeler generations. In that way you can convert 2D data to 3D or deploy native AutoCAD / AutoCAD Civil 3D objects into *.vm format. From this folder you will also find a *.dwg file as well as already generated *.vm file. They both share the same name. To generate a *.vm file you also need a definition file that is saved with an *.ini extension.
We start by applying material based tree objects (textures) onto areas that are defined by 2D polylines. Therefore we start from a *.dwg file and use Modeler tools to add parameters (rules) that convert those polylines to tree areas. As a separate sub-model, this can be used in the final VDC model, using Explorer. You have one *.dwg file in your folder:
You start from that *.dwg file. You also find special definition files with an *.ini extension that are automatically opened when you use Modeler tools inside AutoCAD Civil 3D. You also have completed versions in *.vm formats that can be directly used inside Explorer. In addition you see *.vm files that have an ending *_Only.vm. Those are used in final VDC model, because all duplicate information (like duplicate terrain object that was used for reference) is removed. One specified *.dwg file represents tree areas:
- Existing_Forest.dwg - 2D polylines that represents existing tree areas. There is also one specific polyline that represents the area, from where you want to remove tree objects, because it is a project construction area.
Step-by-step guidelines to create a sub-model with tree areas
Open drawing Existing_Forest.dwg inside AutoCAD Civil 3D. You should see a similar picture:
Using AutoCAD ribbon tab, go to Modeler and click on Rules. Modeler main toolbar opens:
Note: Modeler toolbar is the place where you create different rules that are applied to AutoCAD objects. All defined rules are kept in a separate file with an *.ini extension. Although it is possible to have only one *.ini file throughout your whole VDC project, where you define each and every rule that you want to use in separate drawing, in this tutorial we use the second method - we have separate *.ini file for each and every *.dwg file that we gonna use for generating data for VDC model. Using the latter method, please ensure that *.ini file is with the same name as your *.dwg file, then it will be selected automatically when you open up Modeler tools in your active *.dwg drawing session. Because with the current tutorial the proper *.ini file is already created, it will be automatically used. All rules are defined and we take a quick look to those rules that are important for each sub-task.
Next to each node, you will see a "+" icon if it holds some rules. And vice-versa, you can click on "-" icon, if you want to close that node. Also please note that in some nodes (ex Materials) you may have several rules. But those that are applied to current drawing are in bold. That feature is controlled through a menu: View > Gray Non-Existing Items.
We will first include the reference surface (terrain) into our VDC sub-model. This has been done through design package LandXML export. Please refer back to folder: 01_Existing\01_Terrain\Remain\LandXML, from where you also find two major LandXML files that represent the context and project area:
You include both files under Modeler node LandXML. Because it has been already done for you, you can double click on each rule and see its parameters.
Double-click on a Terrain_ProjectArea (note: if you want to include your own reference, you just double-click the node LandXML itself and similar dialog as below, appears):
During a LandXML import you should fill in the following major parameters:
- Use Browse button to locate your LandXML file (in our example it is in: 01_Existing\01_Terrain\Remain\LandXML).
- Enter the group (subgroup) name to where this information is attached (this is important to keep your project organized).
- Select what data you want to include into your model, selecting rows (if multiple present) under Groups section.
- For a reference purpose, the material is not important, also the Cut Mode is not important (refer to general help topics if you plan to use those in your own projects).
Click OK to accept the values and close the dialog.
Double-click on another predefined rule, Terrain_Context.
This represents the project area inside the context area. Check the settings and click OK to close the dialog. Because we use those LandXML files as reference surfaces for our forest areas, we need to generate layers by which our forest rules know about the elevation of our project area (Modeler is using layer-based or object-based rule mapping).
For an automatic generation of that layer, click on Generate Model
Although it generate a *.vm file to the same location as your *.dwg file, it is not yet ready to use inside our final VDC model. Because it is not correctly defined. During this generation, two new layers were added (because we use two LandXML rules). The new layer is always generated as long as you change the group or content (in our case, surface) name. Therefore it is good if you always clean-up those layers, that you do not need. Because this layer is not a real layer (no AutoCAD objects are on that), please be careful when you use AutoCAD Purge command. This will remove those layers as well. Still, Purge command is the easiest way to clean up your drawing.
Let's take a look into Forests section. As you see there is one rule. If it is in bold, it is used in the current project (meaning that Modeler understands, that with that particular layer there are some objects in your *.dwg). Rules in general can be taken so, that you have different rule for different object type you want to get/see. Therefore if some parameter value inside one rule is different from another rule, you have made two different rules.
Open up (double-click) a rule under Forests node.
Let's go through some major settings that help to define your forest area:
- layer - all 2D closed polylines should be mapped onto that layer if you want to convert it into forest areas (layer name can be anything you want, just ensure that you have selected correct layer).
- materials - select one or multiple materials that you want to apply for your forest area definition (in large areas, it is recommended to select multiple materials, because in that way you can easily define some randomness into your context).
- description - this can be used to shorten the name that is visible in Modeler main toolpalette. Not a required parameter. In this example the same name is used, as for layer parameter.
- info text - additional description, text that you may want to include that is available in the model.
- randomness - how much in % terms your tree height can change (default tree height is defined in material properties dialog).
- density - number of elements per hectare.
- buffer - expand forest area to inwards (negative value) or outwards (positive value).
- interpolate_mode - how materials are attached.
- interpolate_to_layers - this is where you select those layers that will be used to raise your tree areas to.You can select multiple layers here, but please be aware that if those references do overlap (or your footprint can follow both references at its X,Y location, you also get multiple objects to your final VDC model - typically you do not want that to happen).
- group - select a group to where your tree areas are assigned.
Note: Groups are automatically generated/added when you write those into group field in Change Setting dialog (remember to add a "/" for a subgroup). Alternatively you can create groups through a menu: Model > Groups...
It will open up a separate dialog where you can see a group selection tree. Although some prefer to include all group levels into each and every *.ini file, please be aware that even if you have not mapped any object onto that subgroup, it will be still included into your *.vm file. Of course it is an empty node there, but sometimes it makes it difficult to find objects that you need, if you have loads of empty group nodes.
Click OK to close the dialog Change Setting. You are now ready with one of your tree area rule. But because you do not want to have tree areas at project construction site, you need to define that area by different rule. Please notice that on your drawing area you have one green polyline in where you do not want to see any of the trees.
Go to Element areas node and double-click on the predefined rule. Dialog Change Setting opens.
Main settings are:
- layer - select the layer on where you have polyline(s) that define empty areas.
- materials - select materials that you want to remove (basically same materials that you selected during tree areas definition).
- negate - select a value yes to indicate that you want to remove those materials that are defined by material setting.
Close the dialog by clicking OK. All you rules are now defined. Click on a button: Generate and View Model.
This will regenerate your model (as you did before) and also opens up a MAGNET Explorer as a viewer package for your *.vm file. Please also note that your *.vm file is automatically placed to the location where your *.dwg resides. Your sub-model should look similar to the following image:
If you take a closer look to your model, you can see that it includes the terrain (surface) from LandXML files. Those are included in another group and therefore we want to get a clean Existing Forest sub-model for our final VDC model.
To remove those references, just follow those easy steps:
Go to tab Output and select Export to File:
New dialog will open, from where you use:
- Groups - select groups that you want to export into new *.vm file (you can select multiple groups). In the current case it will be only: Existing/Landscaping/Remain/
- Export Format - select: VM File
- File Name - point to a location where your original *.vm file is, but do not overwrite it, use a special ending like: *_Only.vm
Click Save to export your model into a new file. You can now reopen that file, and see if you have only tree areas.
Note: In your group selection tree you still see those LandXML reference nodes, but those are now empty. That is why it is important to keep everything with the same group logic.
After checking your existing forest area sub-model, you can close the Explorer window. Later you can open those *.vm files directly with Explorer and you do not need to follow Modeler workflow again. Of course, when the design changes, then you recreate the *.vm file.
As you have successfully generated an existing forest area sub-model, it is also good to save your Modeler *.ini file. For that, just select from the menu: File > Save Configuration...
You can re-select the location and name for your *.ini file, but in this tutorial it is recommend that you always keep the same name for your *.ini file as you have named your *.dwg. And also ensure, that both files (*.ini and *.dwg) are saved to the same location.
You can close the Modeler
dialog. It will warn you, if you want to save your settings. Because you just did it, you can simply dismiss that warning. Click No
, if you think that you need to re-save your settings).
Close the AutoCAD drawing file.
You can practice with various parameters that define the density of forest areas (or selection of materials). You can also divide your polylines into different groups and include a separate rule for each group. You may want to do that when you need more detailed look for your project site area.
Note: When you work with Modeler and save your *.ini files, system automatically creates backup versions of the previous file. Sometimes it is good to think that you have some previous definition files still available. In this tutorial we have not kept those *.bak files as well as no separate backup folders. If something goes wrong, you can extract (copy) needed definition (and *.dwg) files into your current working folder and start again. Therefore in a clean system (with no backups, no *.dwg backups as well) you folder may look like this: