Block Editor Comments

From Blue Mars Developer Guidebook

Jump to: navigation, search


The Block Editor is used for placing objects on a block. Creating Blocks is done in the City Editor. This page is about using the Block Editor or City Editor to build complex objects. Where ever this refers to Block Editor, it can also be done in the City Editor.

Contents

Why Build in the Block Editor?

To save download memory.

Instancing

It's perfectly possible to build very complex objects like buildings or entire landscapes in an external editor, e.g. Blender and after conversion bring it into the Block or City Editor. The problem is that unless your editor allows Instancing (reusing the same mesh for multiple copies of an item), any duplicated meshes in the single complex object will be duplicated and waste download memory. This can be non-trivial, for many architectural objects the download size can be reduced by a factor of 4 or more by instancing.

Reusing Geometry with Different Materials and Transformations

The geometry (cgf) files are generally much bigger than the material (mtl) files so it saves download memory if you can reuse them. This can be done if objects are brought in separately by using the materials editor inside the Block Editor. The materials editor can be used to assign a different material to an instance of an object. With the materials editor open, select the desired object, then select the material or sub material in the materials editor list, then use the icon at the top to assign the material to the selected object.

It is also possible to translate, scale and rotate instances of an objects. In conjunction with assigning different materials and placing them in different relative positions it's quite possible to make many visually different objects from a small number of geometry and texture (dds) files, potentially saving a lot of memory.

Working with Instances

Placing

To place an object instance as part of a more complex object, generally you use the Rollup Bar Brush button. That produces directory view to navigate to the list of cgf files you want to use. Just drag an object into the editor and left click to place it. There's an icon at the top of the editor that allows setting the height above the terrain.

Transformations

You can directly drag the object around by going into translate mode (shortcut key is "1") and selecting the axis to drag over. Two axes can be selected using the planes near the pivot point of the object selected. Similarly rotation and scaling can be done directly, although these work a little differently. Select the axis to rotate around, then move the mouse up or down, not along the selected axis. Scaling has the individual axes as options, or the box in the center scales on all at once.

The numeric boxes at the bottom can be used for transformations. Set the transformation mode (translate, rotate, scale) then type or paste in the desired values. This is very useful for precision editing, but be aware that at the time of writing changes made in the numeric boxes don't go into the undo stack.

Once you start typing in the numeric entry boxes, the keyboard focus is fixed there no matter where the cursor is. This can be awkward if you want to change from say scale to rotate, because the shortcut keys are numbers and will go into the numeric box. OTOH if you left click in the perspective window you're likely to select another object. To avoid this, right click in the perspective window which shifts the focus there but seems to have no other effect. Then when you type a numeric value it is interpreted as a shortcut key to change the transformation mode.

Copying

Ctrl C makes a copy of the selected object, thereby creating a new instance. This can be transformed or assigned different materials. Be careful when doing this because moving the cursor moves the new instance no matter what transformation mode you are in even just select, until a left mouse click. Also if another operation is done before the left mouse click, the clone is lost. It is often wise to do the clone with Ctrl C, then immediately left mouse click so it doesn't move.

Grouping

To rapidly duplicate and transform more than one object, they can be grouped. To do this and have control of where the group's pivot point is, first select an object whose pivot point you want for the group. Then select all the other objects to be part of the group and use the Group -> Attach command and select the object whose group you want to attach to, or in the selection window select the group and hit the Pick button. If you don't want the reference object as part of the group, select the group from the selection window, open it, then select the reference object and in the group menu remove it from the group. Then reselect the group and close it. The group will still have the original pivot point even though the reference object is no longer a member.

Grouped objects have a green outline.

Groups can be copied and transformed as if they were a single object and appear in the selection list. If you need to edit a single object, select the group, then use the Group -> Open command at which point all the group members remain but can be individually edited. Group -> Close restore the unity of the group.

There are two icons in the tool bar next to the named selection pulldown to save an load groups.

Coordinate Systems

These determine the origin for the coordinates and rotations shown in the numeric boxes and the grid.

Local - Local to the selected object, once changes are entered, the numbers always revert to 0. This isn't used by the grid.

View - Unknown, appears identical to World

Parent - Unknown, appears identical to World

World - Relative to the level's origin

User Def. - The origin can be set in the Grid Setup dropdown. This is very useful for complex construction by selecting an object and in the Grid Setup check "User Defined Grid" and use the "Get Translations from Selected" and / or "Get Angles from Selected". Essentially it resets the coordinate system to the selected object.

Be careful because the editor tends to force the coordinate system back to Local.

Problems with this wiki page? Contact us either by: Support Email or Support Ticket System

Blue Mars Guidebook Privacy Policy
Blue Mars Guidebook Community Guidelines

Personal tools