martin-t / rusty-editor

Scene editor for rg3d engine

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

rusty editor

Scene editor for rg3d engine.

CI Status Discord Lines of code

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.

How to build

Platform specific

Linux

sudo apt install libxcb-shape0-dev libxcb-xfixes0-dev libxcb1-dev libxkbcommon-dev libasound2-dev

Clean build

git clone https://github.com/mrDIMAS/rg3d
git clone https://github.com/mrDIMAS/rusty-editor
cd rusty-editor
cargo run --release

Update to latest and run

cd rg3d
git pull
cd ../rusty-editor
git pull
cargo run --release

Screenshots

1

Controls

  • [Click] - Select
  • [W][S][A][D] - Move camera
  • [Space][Q]/[E] - Raise/Lower 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")
	.await
	.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()).await.unwrap();

...

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

Plan

  • Interaction modes.
    • Select.
    • Move.
      • Grid snapping
    • Scale.
      • Grid snapping
    • Rotate.
      • Grid snapping
    • Navmesh
    • Terrain
  • Undo/redo.
  • Camera controller.
  • Save scene.
    • Validation
  • 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
        • Quad
      • Light
        • Directional light
        • Spot light
        • Point light
      • Sounds
        • 2D
        • 3D
      • Particle system
      • Camera
      • Sprite
      • Pivot
      • Terrain
  • 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
      • Physical binding
    • Light node
      • Cast shadows
      • Enable scatter
      • Scatter
      • Color
      • Point light
        • Radius
      • Spot light
        • Hotspot angle
        • Falloff angle delta
        • Distance
      • Directional light
    • Camera node
      • Fov
      • Z near
      • Z far
    • Particle system node.
      • Acceleration
      • Select emitter
      • Add/remove emitter
      • Position
      • Spawn Rate
      • Max Particles
      • Min Lifetime
      • Max Lifetime
      • Min Size Modifier
      • Max Size Modifier
      • Min X Velocity
      • Max X Velocity
      • Min Y Velocity
      • Max Y Velocity
      • Min Z Velocity
      • Max Z Velocity
      • Min Rotation Speed
      • Max Rotation Speed
      • Min Rotation
      • Max Rotation
      • Resurrect Particles
      • Sphere emitter
      • Color-over-lifetime curve (requires curve editor)
    • Sprite node.
      • Size
      • Rotation
      • Color
    • Mesh node
      • Cast shadows
    • Joints
      • Ball joint
      • Prismatic joint
      • Fixed joint
      • Revolute joint
    • Colliders
      • Multiple colliders per body
      • Translation
      • Rotation
    • Rigid body
  • Shape editors - many things in the engine has shapes: colliders, emitters, etc. There should be shape editor that will allow to edit them using mouse. Currently, editing is performed by setting values directly in side bar.
  • Curve editor - many parameters can be expressed as a curve, we need a way to edit such curves.
  • Sound - we need a way to add/remove/edit sounds.
    • Move via Move interaction mode
    • Properties
  • Navmesh editor
  • Terrain editor
    • Push/pull
    • Draw on mask
    • Add/remove layers
  • Configurator
    • History
  • Settings window
    • Graphics
    • Debugging
    • Move interaction mode
    • Rotate interaction mode
    • Scale interaction mode
    • Navmesh interaction mode
    • Terrain interaction mode
  • Asset browser.
    • Asset previewer
    • Folder view
    • Asset view
    • Drag'n'drop resource import to scene
    • Sync with file system on changes
  • Command stack viewer
    • Undo/redo buttons
    • Command stack visualization
  • Animation graph editor
    • Simple node-based animation blending machine editor is needed.
  • Scene preview in runtime. Currently, an editable scene is static: no physics simulation, particle systems are frozen, etc. We need an ability to clone a current scene and put it into the engine for preview with free camera. This is somewhat similar to "play mode" in Unity, Unreal Engine, etc. but much more restrictive because it should allow only to observe your scene in dynamics.

... Lots of stuff.

About

Scene editor for rg3d engine

License:MIT License


Languages

Language:Rust 99.9%Language:GLSL 0.1%