/rusty-editor

Scene editor for rg3d engine

Primary LanguageRustMIT LicenseMIT

rusty editor

Scene editor for rg3d engine.

Motivation

rg3d engine getting bigger, but still does not have scene editor what makes creation of scenes harder - you have to use 3d editors (like Blender, 3ds Max, etc.) to create scenes in them, no need to say that this looks like "hack" instead of normal solution. This editor is planned to be relatively small; not tied to any type of game. It will be used to compose scene from existing 3d models, setup physics, and all such stuff.

Limitations

It should be noted that this editor is the scene editor, it does not allow you to run your game inside like many other editors do (Unreal Engine, Unity, etc.). This fact means that each prototyping iteration of your game will take more time. Having the ability to run game inside editor would be nice indeed, but this is too much work for one person and I just don't want to spend time on this.

Screenshots

1

Controls

  • [Click] - Select
  • [W][S][A][D] - Move camera
  • [1] - Select interaction mode
  • [2] - Move interaction mode
  • [3] - Scale interaction mode
  • [4] - Rotate interaction mode
  • [Ctrl]+[Z] - Undo
  • [Ctrl]+[Y] - Redo

How to use produced scenes.

rgs files can be loaded as standard model resources:

use rg3d::scene::Scene;

// Create test scene, this step is unnecessary, if you already have some scene
// you can instantiate model into your scene.
let mut scene = Scene::default();

// There is no difference between scene created in rusty-editor and any other
// model file, so any scene can be used directly as resource. 
let root = resource_manager
	.request_model("your_scene.rgs")
	.unwrap()
	.lock()
	.unwrap()
	.instantiate(&mut scene)
	.root;
	
let scene_handle = engine.scenes.add(scene);
	

Alternatively rgs can be loaded by Scene::from_file method:

use rg3d::core::visitor::Visitor;
use rg3d::scene::Scene;

// Load scene
let mut scene = Scene::from_file("your_scene.rgs", &mut engine.resource_manager.lock().unwrap()).unwrap();

...

// and add to engine
let scene_handle = engine.scenes.add(scene);

Plan

  • Interaction modes.
    • Select.
    • Move.
    • Scale.
    • Rotate.
  • Undo/redo.
  • Camera controller.
  • Save scene.
  • Load scene.
  • Docking windows.
  • Scene preview
  • Side bar with interaction modes.
  • Multi selection
  • Menu
    • File
      • New scene
      • Save
      • Save as
      • Load
      • Close scene
      • Exit
    • Edit
      • Undo
      • Redo
    • Create
      • Mesh
        • Cube
        • Sphere
        • Cone
        • Cylinder
      • Light
        • Spot light
        • Point light
      • Particle system
      • Camera
      • Sprite
  • World outliner
    • Syncing with graph.
    • Syncing selection with scene selection and vice versa.
    • Drag'n'drop hierarchy edit.
    • Icons for nodes
    • Visibility switch
    • Nodes context menu
  • Node properties editor
    • Base node
      • Name
      • Position
      • Rotation
      • Scale
      • Physical body
    • Light node
      • Cast shadows
      • Enable scatter
      • Scatter
      • Color
      • Point light
        • Radius
      • Spot light
        • Hotspot angle
        • Falloff angle delta
        • Distance
    • Camera node
      • Fov
      • Z near
      • Z far
    • Particle system node.
      • Acceleration
      • Other
    • Sprite node.
      • Sprite properties.
  • Asset browser.
    • Proof-of-concept version
  • Animation graph editor
    • Simple node-based animation blending machine editor is needed.

... Lots of stuff.