Object placement methods

SceneCity creates a lot of instances from the building and road models. Up to several thousands.

Blender’s performances are directly affected by so many objects in the scene. This can have a very negative impact on the viewport performance, rendering performance, memory usage, and file size. If the models used are very detailed with lots of vertices and polygons, things get worse very fast.

Luckily Blender offers several ways to handle large scenes efficiently, each with their own advantages and drawbacks. So you will choose the method depending on your needs.

The placement method is set per road or building model, and is located in its mesh/object group settings. So you can mix different methods in the same city, depending on your needs for each model.

_images/placement_methods.png

As individual objects

Overall performance: medium
Flexibility: high

Use this option when:

  • you don’t care about performance or the placement method
  • you need to transform or hide/delete some instances, or to apply modifiers on them
  • you need to customize the mesh of some instances

This is the default setting and offers a good balance between performance and usability.

Each road portion/building instance is an object, with its datablock (mesh or object group) being the same as the model. So you can edit the model, and the changes will apply immediately to all the instances. It is quite cheap on memory since only the objects are unique, the datablocks are not duplicated for each instance.

Since each instance is an object, you can do everything an object allows you to, like adding modifiers, hiding/showing it, transforming it (move, rotate, scale), deleting it, making it unique and editing its datablock etc...

With dupliverts

Overall performance: best
Flexibility: lowest

Use this option when:

  • you need maximum performance
  • you don’t need to transform (move, rotate, scale) or delete any instance at all

This option offers the best performance, but is the least flexible.

It uses the duplivert feature of Blender: basically a vertex is placed where an instance of a road/building should be, and the instance rotation is specified by the vertex normal. So it’s extremely cheap (an instance represented by a single vertex), and is extremely optimized when rendering, especially in the viewport.

You can still change the model, and all the instances will reflect that change immediately.

However you cannot change an instance’s position, scale and rotation because...

Warning

...going into edit mode for the mesh containing the placement vertices will reset their normals to some default, and you’ll lose the rotation of all the instances. (Is it a bug or an expected behavior in Blender?)

As single merged mesh

Note

This option is available for road/building meshes only, not object groups.

Overall performance: medium
Flexibility: medium

Use this option when:

  • you need to treat the city as a handful of objects
  • you need to customize the mesh of a lot of instances
  • you don’t need to change the road/building model afterwards

This method puts all the road/building instances into a single mesh datablock. Therefore it has low object overhead for Blender, as it is more efficient to have in the scene few objects with lots of verts, rather than lots of objects with few verts. In addition, each instance can be edited very easily, by simply going into edit mode for the whole mesh.

Two main drawbacks: highest memory usage, because the instances data (vertices and faces) is duplicated, even when they are the same. And the link to the model is lost, so the changes you make to the model later on will not affect the instances.