Scene Design

  • warning: Parameter 1 to generic_productapi() expected to be a reference, value given in /home/visual3d/ on line 386.
  • warning: Creating default object from empty value in /home/visual3d/ on line 35.
  • warning: Creating default object from empty value in /home/visual3d/ on line 35.
  • warning: Creating default object from empty value in /home/visual3d/ on line 35.
  • warning: Creating default object from empty value in /home/visual3d/ on line 35.
  • warning: Creating default object from empty value in /home/visual3d/ on line 35.
  • warning: Creating default object from empty value in /home/visual3d/ on line 35.
  • : preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/visual3d/ on line 311.

Scene Design User Manual

 The user manual describes how to use the Scene Editor in the Visual3D All-in-One Toolset for adding entities and assets to your scenes.  It also covers user controls for moving the camera in the scene editor and for placing andmanipulating (moving, scaling, and resizing) entities, as well as default user controls (though these are user editable) for controlling character and vehicle avatars in the Run mode tab (or when toolset and in-game design mode are not active), as well as In-Game Design Mode editing without the Toolset  (enabled by F2 after hiding the toolset with the F3 hotkey if needed).

Scene Editing Video Tutorial


A written version of this video tutorial, including screenshots and references to time position in the video, can be found in the Scene Design and Editing tutorial.


Creating a New World Project, New Scenes, and New Terrains


Placing Objects into the Scene

Different ways of Placing Objects and Assets:

1. Drag-dropping them into the scene from Asset Explorer

See the Adding Entities tutorial section for more details.
Also, this is shown in the Scene Editor overview video tutorial and Bridge Building (with Physics) video tutorial, both of which show how you can add and manipulate entities in a live running game or simulation scene or with real-time instant editing mode with the runtime editor toolset.

2. Adding Assets via Right-click (Context) Menus

You can right click anywhere in the Scene Editor and then "Add Asset > ..." to select nearly any asset from Asset Explorer, just navigating through a sub-menu for the Asset Group and one for each "Category Folder" for how its organized in Asset Explorer. 
You can also use right click > Add New > ... context menu to select from common asset types to place an instance of in the scene.  What is shown here can be edited by users by drag-dropping assets in Asset Explorer into the "Base Types" asset group (top-level folder), and can rename existing ones, or group them into subfolders.  This allows you to create your own "shortcuts" for your own custom asset types (eg. a custom "Weapon" or "Vehicle" class, or even specific prefabs / presets you commonly use.

You can also attach other types of Assets to the Scene this way, such as Behaviors, Scripts, Cinematics, etc.

3. Brush Placement Mode for "Painting" Objects into the Scene

You can click on the Brush Placement Mode button in the Scene Editor toolbar to enter a mode where every time you left click an instance of the last selected prefab asset (or last selected object in the scene) will be placed into the scene at the mouse position.  In this mouse you can also hold down the left mouse button and an instance will be placed at the mouse position every half second (where this frequency is configurable under World Settings).  When you are done you should then click on the Normal Object Placement mode toolbar button to allow selecting and dragging (moving, resizing, rotating) objects with the mouse again.

Also, in normal Scene Editor Object Placement mode you can use Brush Placement by Ctrl+middle click or by Ctrl+holding down the middle mouse button to avoid needing to switch between modes using the toolbar buttons.  

For Object Brush mode, you should configure the Instancing Type property for the prefab you select for brush use to be Instance (the default) to ensure that each instance is a cheap reference (very compact definition of primarily position, size/scale and orientation mostly) instead and so you can edit the prefab and have all instances of it update automatically when the scene is saved and reloaded (such as via Ctrl-S then Ctrl-Shift-R).


4. Duplicating Objects

You can use Ctrl-D to duplicate the currently selected object (entity) in scene editor, for quickly creating many copies of an object, as an alternative to using Brush Placement Mode.

5. Land Cover Brushes and Procedural Vegetation

You can use the Land Cover Brushes in Terrain Editor for procedurally generated trees, vegation, rocks and other ground cover or models.  This uses a land cover painting map to efficiently define what areas of the terrain are covered by which layers or types of objects.  This allows user configurable density (number of trees, vegetation, etc.) based on graphics settings and user preferences and also enables use of automatic sprite (imposter) LODs and automatically pages (loads and unloads) land cover sectors from memory.  This also allowing trees, etc to optionally be physical - collidable up to a certain distance from the camera based, instead of always having a collider used for it. Due to the procedural nature of Land Cover, it should not be used in cases where exact placement of objects, since the exact position and number of land cover objects can vary based on user preferences and performance.

See our Land Cover and Procedural Vegetation Brushes tutorial for more details. 

6. Attaching Assets as Children (or Components or Parts) of an Object

You can right click on any Scene Object in Scene Editor, World Explorer or Asset Explorer (as well as a few other types of assets) and select from the "Attach Asset" or "Attach New" context menus, which are used in the same way as "Add Asset" and "Add New" are for adding objects to the scene, except that they are "attached" to an object, so that they are "moved" (as well as scaled and rotated) with the parent object.  
You can also attach other types of Assets this way to an Object (or Entity / Actor), such as Behaviors, Scripts, Actions, etc.

7. Advanced Drag-drop for Selecting Attachment Site, Slot, or Parent

If you hold down the right (instead of left) mouse key when drag-dropping an Asset / Object onto another Object (or the Scene), then you can select "how" you would like to attach an object, or specifically "which" object you would like to attach to (which is useful when you might want to attach to a parent object, instead of the specific Object Part you had drag-dropped onto). 
You can select from the "Attach To" context menu to attach to a certain "slot", such as Moint Points / Actor Attachment slots.

See Equipping Weapons and Apparel using Attachment Slots for more details.

Using Models: Importing, Editing and Placing Models in the Scene

 Place your model files (either directly or in a subfolder of choice) into either your world project folder (which is auto created for you when creating a new world project) or one of the referenced project folders (which usually includes My Assets, Standard Assets, and sometimes Demo Assets) and you will find it under the Models/ folder (organized by the same folders you had put the model file under, if any) in Asset Explorer.  You can easily search for the model by starting to type its file name into the search/filter box at the top of the Asset Explorer tool window.  

You can double click on the model to view and edit it in the Model Editor (Entities > Model tab in the toolset) or can edit its advanced settings with Object Editor after selecting it (such as to change its Entity Type or Object Type or collision settings quickly).  You can drag-drop the model into the scene to place a ModelEntity for it.  
The first time the model is viewed it will automatically be imported.  However, you can use the button at the top-right of the Model Editor (or right click on it in Asset Explorer and select from the context menu) to force reimporting of the model, either with edits reapplied or ignored after reimporting. The model may also be automatically reimported (with certain types of edits made in Model Editor reapplied after reimporting), however if issues occur in reimporting, you can click on the Reimport button drop-down arrow and select to reimport with all existing edits ignored instead of being reapplied.

If you want to adjust the scale of your model after importing, then select the model in Asset Explorer (or click on the Entities > Model tab) and then use Object Editor to expand the Spatial Adjustments property and adjust the scale there.  If you want to adjust the scale for individual parts, you can use the Spatial Adjustments panel in Model Editor instead.

You can also right click on the model and select > Create Actor (or Model Entity Prefab) to create a prefab and then change its Prefab Instancing (also known as Entity Persistence) mode in Object Editor to control whether each instance added to a scene after that will be a smart reference copy (with centralized editing) or whether each instance will be unique.

More about importing, exporting, and editing models is found in the Asset Creation: Import/Export manual.

Adding Entities and Assets to Your Scene

Video Tutorial for Adding Entities and Avatars to a Scene

Drag-dropping Entity Prefabs, Components (Entity Abilities, States, Actions, Events, etc.), Models, Textures (for v1.0 Terrain Decals) into Scene Editor and World Explorer
Find the model you want to place in Asset Explorer (tool window on the left hand side of the Visual3D Architect toolset).
You can type part of the name or category/folder for the asset you are trying to find in the Search Filter box (at the top right of the Asset Explorer) to quickly find something, if you have an idea of what you are looking for.



Camera Controls

  • Standard "WSAD" keys move the camera in Free Fly mode "forward, backward, and strafe".
  • Right-Click + Drag to turn the camera.
  • Middle-Click + Drag to do quicker analog motions of the camera.
  • Mouse-Wheel levitates the camera (very convenient!).
  • When using a different camera controller the controls may vary from this, at least in run mode (when no avatar entity is focused for user control).  
  • The default camera controller can be changed by selecting the Scene and going to Scene Settings > Camera > Camera Input Controller property in Object Editor selecting a different existing Input Controller prefab asset or a custom one)

See the Camera User Controls Video or Keyboard and Mouse Reference for more details.  


Object Placement and Manipulation (Moving, Rotating, Resizing) Controls

  • Left-Click + Drag to move objects horizontally relative to camera.   (Now press SHIFT to shift the plane of motion from horizontal to vertical!)
  • Press ALT key to slow down the manipulations for more refined control.
  • Left+Right buttons + Drag to Yaw/Rotate the selected object (convenient for quick placement). (Press CONTROL to toggle between group or local based rotations.)
  • Left-Click + CONTROL Key + Drag to Resize your selected objects (also convenient). (Press CONTROL to toggle between scaling the relative object spacing for Object Groups.)
  • Double click on an object to enter "Object Focus Mode", which has the following differences in user controls
    • Mouse Wheel now does Zoom In/Out relative to your focus object.
    • Middle-Button + Drag to pivot your camera view around the focus object.
    • Right-Button + Drag to Yaw/Rotate the object (if allowed). 
    • Press Escape to exit Object Focus Mode (or press Escape or Tab to show mouse cursor and double click on the object again to exit this mode)

 See the Placing and Manipulating Objects Video or Keyboard and Mouse Reference for more details.


Avatar User Controls

See Controlling Avatars Video or Keyboard and Mouse Reference for more details about the default controls (WASD, mouse, attack, jump, atc) for Avatar (character, vehicle, etc.) and first-person game/simulation camera user controls.
See tutorials linked to from the Avatars & Entities user manual for details on how to customize these default avatar user controls.

Prefab Instancing: Using Prefab Assets for Smart Copy and Compact Reference Persistence of Entities in the Scene

 If you set the Instancing (or Entity Persistence) property to Instance (or Reference, or previously ExtendedPrefabReference) for a prefab before creating instances of it or for entities that have already been created (for example, in the scene or attached to prefab assets), then those entities will be saved as a smart copy of a prefab (which can be changed later for instances by editing their Prefab property), so that edits made to the prefab will often be applied to the instances (once the scene they are in is next loaded, or reloaded through Ctrl-Shift-R).  This also results in smaller saved scene and prefab .v3dx files.  Usually you can still attach new components to existing entities even when they are saved as smart copy instances.  However, for v1.0, if you want to in some cases have unique instance-specific edits to a component inherited from a prefab and still benefit from Smart Copy instance persistence, you can can change the Persistence or Instancing property to Customized or Always Saved for the component you were editing (such as Physics, AppearanceSettings, etc.).  Often when the edits are made in Object Editor, the component will automatically have its Persistence property changed from Default to Customized, so you can also change it back to Default if you want to ignore or reset edits to inherit settings from the prefab again when the entity is next reloaded.
 This allows for "smart copies" of centrally defined entity "prefab assets" which makes it a lot easier to manager large scenes with many instances of entities which have similar settings or behaviors, and it also allows for smaller scene definition files. 

Creating Custom Component Classes and Gameplay or Simulation Logic (in C#, VB.NET, and other .NET languages)

You can configure where such component classes get automatically added as prefab assets to in the Visual3D toolset Asset Explorer by applying ComponentTypeAttribute (for example: [ComponentType("Entities/Areas", Name="My Area")]) to your component classes..  Also, you can derive from ModelEntity class (if the logic/scripting applies to a 3D object represented by a model, such as an .obj or .dae file) or one of its derived classes like AvatarBase, VehicleBase, etc, and then drag-drop those into the scene (eg. onto the Scene Editor viewport) as well as Ability, ActionBase, BehaviorSystem, and other component classes which automatically are added to the appropriate Asset Group folder in Asset Explorer without needing ComponentTypeAttribute applied to them.  You can then drag-drop such components onto the Scene viewport to add to the scene, or right-click drag-drop onto a specific entity in the viewport and select which one to attach a component like an Ability (or an attached child entity) to, or drag-drop onto an Entity in World Explorer (for the scene) or Asset Explorer (to attach a component to a prefab asset).

This is covered in more detail in the following user manuals and tutorial sequences:

Previously users had derived from a Scene class or created a (GUI) Form derived class in order to define their game logic, however it is now suggested this be done by creating Scenario, ModelEntity, AvatarBase, Abtility, BehaviorSystem, BaseVehicle, (Scene)Area, (Gui)Form or ActionBase derived classes instead.  
An older example showing how a custom GUI Form class and Scene class is created via code can be found here World, Scene, and UI Creation in Code (C#).