1 Star 0 Fork 0

spwx820 / rusty-editor

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

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.

How to build

Fresh 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
  • [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.
    • 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
      • Light
        • Directional light
        • Spot light
        • Point light
      • Particle system
      • Camera
      • Sprite
      • Pivot
  • 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
      • 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.
    • Properties
  • Navmesh editor
  • Configurator
    • History
  • 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.

MIT License Copyright (c) 2020 Dmitry Stepanov Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

暂无描述 展开 收起
Rust
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/spwx/rusty-editor.git
git@gitee.com:spwx/rusty-editor.git
spwx
rusty-editor
rusty-editor
master

搜索帮助