jamestkhan / mundus Goto Github PK
View Code? Open in Web Editor NEWA 3D world/level editor built with Java, Kotlin & libGDX.
License: Apache License 2.0
A 3D world/level editor built with Java, Kotlin & libGDX.
License: Apache License 2.0
The current ModelShader is rather limited and does not support animations. Replace the current model shader with PBR shader form gdx-gltf.
Also, when importing GLTF models, the textures get copied to the project folder via GLTFLoader but the project does not load/import them in, so they have to be manually loaded in via UI after model import. Having textures import automatically would be ideal.
Not high priority but once you fill up your scene, you will have a lot of 'stuff' in the ASSETS section at the bottom.
It would be great to have them organized. Having models isolated would help me personally.
One suggestion is to organize by type:
[MODEL],
[TEXTURE],
[MATERIAL]
Another option, but harder to implement, is to organize by parent/child hierarchy:
[MODEL]
[TEXTURE1]
[TEXTURE2]
[SKY]
[TEXTUREfront]
[TEXTUREback]
[TEXTUREtop]
[TEXTUREleft]
[TEXTUREbottom]
[TEXTUREright]
Is your feature request related to a problem? Please describe.
It is easy to end up with lots of unused asset files in Mundus. Deleting assets one at a a time is slow.
Adding a utility that auto-cleans up unused assets would be convenient. We already have the usages interface in place so this should be doable.
There seems to be an issue with terrains when they are given negative height. Paint brushes do not paint in the correct area and the terrain almost becomes unpaintable.
Steps to replicate
When first opening a project, before selecting any game objects, if you select any of the transform tools the application crashes with an NPE due to the tools trying to access currentSelection variable which is null as no object was selected yet.
example code:
Vector3 pos = projectContext.currScene.currentSelection.getPosition(temp0);
[12:20][Fatal][Log] java.lang.NullPointerException
at com.mbrlabs.mundus.editor.tools.RotateTool.scaleHandles(RotateTool.java:283)
at com.mbrlabs.mundus.editor.tools.RotateTool.gameObjectSelected(RotateTool.java:252)
at com.mbrlabs.mundus.editor.tools.ToolManager.activateTool(ToolManager.java:82)
at com.mbrlabs.mundus.editor.ui.modules.MundusToolbar$9.clicked(MundusToolbar.kt:197)
GameObjects and components do not implement disposable. GameObjects should implement disposable which then call dispose on all of its components so that modelInstances for model components are disposed, etc..
Is your feature request related to a problem? Please describe.
Hand painting terrains can be cumbersome.
Describe the solution you'd like
A feature that auto-textures the terrain by utilizing several height/slope layers would be nice to have.
Additional context
I have done something similar for a previous tutorial video : https://www.youtube.com/watch?v=irbOA-hpJkI
Frustum culling should be implemented for models for performance.
When opening the application it attempts to load the previously loaded project in Editor.kt create()
// open last edited project or create default project
var context: ProjectContext? = projectManager.loadLastProject()
if (context == null) {
context = createDefaultProject()
}
if(context == null) {
throw GdxRuntimeException("Couldn't open a project")
}
However if the previously opened project was deleted (or the .pro was corrupted) then the fallback is to create a default project only if the registry is empty or last project is null
private fun createDefaultProject(): ProjectContext? {
if (registry.lastOpenedProject == null || registry.projects.size == 0) {
val name = "Default Project"
var path = FileUtils.getUserDirectoryPath()
path = FilenameUtils.concat(path, "MundusProjects")
return projectManager.createProject(name, path)
}
return null
}
If the fallback occurs and the registry is not empty, a GdxRuntimeException is thrown. The solution may be to have a separate "Project Select" dialog in this situation to choose a project to open or create a new one. It would also be nice to have this dialogue for first time launching the application as well, instead of creating a default project.
Reasoning why this helps a lot: When placing trees/buildings/roads on terrain, the user needs modify all objects and change scale.
Either this or the fixing of the Duplication Bug #61 needs to be done to make object placement easier from a configuration (scale/rotation) perspective.
Original authors of Mundus marked the following variables in Scene.java as deprecated
@Deprecated // TODO not here
public Array<TerrainAsset> terrains;
@Deprecated // TODO not here
public GameObject currentSelection;
The likely reason for deprecation is that currentSelection is only used in the editor module, so it does not belong in Scene.java from the commons module as it serves no purpose outside of the editor. The variable should be moved out of commons and somewhere in the editor module which will result in a large refactor.
When you duplicate a GameObject in the editor, each component is cloned in GameObject.java
this.components = new Array<Component>();
for (Component c : gameObject.components) {
this.components.add(c.clone(this));
}
However, some components do not have cloning implemented due to technical limitations or just not being implemented yet, like terrain component
@Override
public Component clone(GameObject go) {
// Cant be cloned right now
return null;
}
When duplicating a GameObject with components that cannot be cloned the editor crashes as a null component gets created and a NPE happens. We should add logic to handle when a null component is returned, either stop cloning the game object, or clone it partially without the components that could not be cloned. Adding a UI dialog in the editor would be a nice addition as well to notify when this happens.
Describe the bug
Mundus editor don't find the texture if it's name contains space.
To Reproduce
Steps to reproduce the behavior:
Describe the bug
Water reflections break when the camera view is rotated on X or Z axis. Reflections only invert the pitch currently.
To Reproduce
Steps to reproduce the behavior:
Describe the bug
If I select a model from Outline section and delete it then the selection still visible.
To Reproduce
Steps to reproduce the behavior:
Video
Currently to use runtime a custom gradle task must be added to projects to generate an assets.txt file which AssetManager uses to read in all the projects assets during runtime. This is due to limitations on getting a list of all files in a directory.
A better approach for the client side would be to generate the assets.txt file in the editor code instead, to make using the run time easier.
Describe the solution you'd like
I think the rain feature would be useful.
Is your feature request related to a problem? Please describe.
Currently Mundus loads all assets on both the Editor and Runtime when loading a project. This is fine for small projects, and even makes scene switching fast, but becomes less practical in large projects with lots of assets.
Describe the solution you'd like
Look into refactoring asset loading to only load what is needed for the current scene to see if its viable.
Additional context
This could be a pretty sizable refactor of the loading system and is not a high priority.
Is your feature request related to a problem? Please describe.
I think a game object finder/picker method by screen x and y coordinates in the gdx-runtime module would be useful.
Describe the solution you'd like
A GameObject findBy(int screenX, int screenY)
method in SceneGraph
class.
Additional context
The editor uses a finder method in GameObjectPicker
class but it uses opengl hack what is not really recommended ( http://www.opengl-tutorial.org/miscellaneous/clicking-on-objects/picking-with-an-opengl-hack/ ).
An other way that use libgdx's Intersector.intersectRayTriangle(...)
method to check for every model's meshes.
(Examples: libgdx/libgdx#1256 , https://stackoverflow.com/questions/56837626/libgdx-intersect-ray-with-mesh-from-modelinstance ). But I think it is cause huge CPU usage if there are lot of game objects on the map.
There is a Toaster class in Mundus from the original authors which according to comments displays android like toast messages like when a project is saved in the UI class there is this line
UI.toaster.success("Project saved")
This does not appear to be working though, but it would be nice to have as currently actions like saving provide no visual feedback. We should look into this class to see if it can be made to work.
Scratch this request. GameObject has:
public boolean active;
that seems to control visibility.
Due to scroll wheel now being used to move forward/backwards, when entering paint mode in the terrain you can not resize the paint brushes (also used scroll wheel). Maybe use a combo key CTRL+Scroll for brush size.
Is your feature request related to a problem? Please describe.
Objects in the outline pane / scenegraph cannot be repositioned.
Describe the solution you'd like
The ability to move objects in the outline pane up/down/top/bottom
Describe the solution you'd like
I think the snowing feature would be useful.
Currently if we want to use the gdx-runtime then we should put the compiled jar into the project instead of to use a package repository. I think this is a bit uncomfortable.
So I think before the next release we should setup the gdx-runime that someone could use it via package repository, e.g. JitPack.
Is your feature request related to a problem? Please describe.
SimpleNode does not cache the matrix transforms. A call to getTransform recalculates the transform along the entire parent chain every time which is inefficient on the CPU.
Describe the solution you'd like
Implement caching of transforms with an isDirty flag, as described here https://gameprogrammingpatterns.com/dirty-flag.html
Is your feature request related to a problem? Please describe.
Currently reflection and refraction textures on water are expensive because they require additional render passes. Being able to disable these features would be ideal for lower end hardware/GWT. An ubershader would accommodate these changes best so we should look into refactoring the current water shader to be a uber shader.
Is your feature request related to a problem? Please describe.
We can create new scene, but we can not delete an unused scene, only manually.
Describe the solution you'd like
A scene deleting button.
Describe the bug
For models that have multiple materials, they can only be mouse picked by clicking the on the first material somewhere visible on the model.
Issue likely revolves around the PickerColorEncoder logic in PickableModelComponent which appears to use the first material only.
To Reproduce
Steps to reproduce the behavior:
Would like to include Point Lights in the future as a GameObject which can be moved around the scene.
Would like to have a draw count display in the editor, maybe in the bottom right near the FPS counter to allow for easier performance monitoring. We should be able to use the GL Profiler and capture draw counts when rendering the scene.
If I add new water component to the project and exit without saving the application saves the new water component.
I've tried that delete water component and exit without save and if open the application the water component is still there, so the delete function is working correctly.
I've checked the source code and I've seen there is saving when I add new terrain.
Should we save the project if we add new water or terrain component to the project?
Currently when creating a Scene the directional light and ambient light intensity and direction are hard coded (see Scene.java construtor). As far as I can tell these values cannot be adjusted in the UI, only in the runtime. I suggest adding UI settings to change ambient and directional light settings which save with the scene.
In EnvironmentMenu it looks like work was started on ambient light UI but its not enabled
Skybox needs some looking over, overhauling. Not the shaders, just the functionality of updating the textures, persisting those textures and getting them rendering in the runtime (right now, they do not). When I tried to use the skybox UI to change the skybox textures, the code seems to wipe out the changes somewhere along the lines and the new textures do not get accepted or rendered. Looks like the feature was never fully finished but its close, as the UI is already built out.
Is your feature request related to a problem? Please describe.
Model assets can be placed multiple times. For terrain and water assets, once they are removed from the scenegraph they become useless. They cannot be re-added to the scenegraph once removed.
Describe the solution you'd like
The ideal solution is to have placement tools for terrain and water as well.
Is your feature request related to a problem? Please describe.
As a game developer I want Mundus editor to add a new Meta Data Component type for GameObjects so that I can store physics parameters or any other meta data parameters to be used in the runtime.
Describe the solution you'd like
I know long term plans are to integrate a physics engine in Mundus. Also there are many physics engines available. Initially having a simple Meta Data Component type available to GameObjects that will allow you to store one JSON entry and make it available in the runtime.
This Meta Data Component type can be useful not just for storing physics parameters but ANY parameters. Hopefully it will be reusable/useful when and if Mundus is integrated with a physics library.
Additional context
So I was thinking in the editor, if you select Add Component
you currently get a panel asking what type of component you want to add. The drop down will allow a new component type META Data Component. This component has one data field in which you can store any String (i.e. JSON Text or XML or YAML).
This solution has no strong coupling with any physics engine. This solution is simple in my opinion. This feature will allow us to store any custom meta data for each GameObject.
Thoughts? Opinions? Concerns?
Transformations of GameObjects is not loaded on the runtime project, so all GameObjects appear at 0,0,0 when using the runtime. Looks like the runtime libraries scene converter is missing the logic that initialized objects and components as seen in the editors scene converter.
When a larger project is loading all you see is a black screen until it has finished loading. Consider loading on a separate thread and displaying a loading message when opening a project. I suspect the main culprit is asset loading for the delay.
At a per project level, it would be convenient to save the last opened directory from a file chooser. This could be saved in the project Registry which would persist on project close.
Than, when a file chooser is open, it defaults to the last directory viewed on that project.
Is your feature request related to a problem? Please describe.
The scene only support perspective camera.
Describe the solution you'd like
Orthographic camera support in scene.
On model import, model files and dependencies are moved into the .mundus temp directory in users folder. I am not sure why the temp directory was needed as I did not write that part of the code (located in importToTempFolder method, ModelImporter.kt).
One way or another the cache should be cleared at some point. First we need to determine why the temp folder is needed or if we can bypass that entirely.
Describe the bug
When looking directly up or down the camera spasms due to Gimbal Lock.
To Reproduce
Steps to reproduce the behavior:
Describe the bug
If we create a new scene then the application creates scene file(s) in the project directory but doesn't save the project. And if we close the Mundus editor without project saving and reopen it then the new scene is missing but it's file is still in project directory.
To Reproduce
Steps to reproduce the behavior:
Considering adding a way to toggle visibility of objects in the scene graph.
Currently if I select an image what the dimension is not square (e.g. 250px x 300px) then shows it on the skybox settings dialog but the skybox will be black in the editor.
Is your feature request related to a problem? Please describe.
If you are reusing the same model but want to use different materials, you have to create a new material manually and then assign it, and assign all the same attributes that you want to keep the same. This is cumbersome.
Describe the solution you'd like
The ability to duplicate materials would save alot of time and hassle so that materials can be duplicated and then only change what you need changed while keeping everything else the same.
Is your feature request related to a problem? Please describe.
Currently textures can only be manually imported one at a time, it is slow and cumbersome.
Describe the solution you'd like
VisUI FileChooser supports multi-selecting files. Being able to select and import multiple textures would be convenient.
Is your feature request related to a problem? Please describe.
The terrain shader is not an uber shader currently. That means the shader contains multiple branching. If a terrain is not using normal maps, the shader still contains branching for it. As terrains get more features, this will become even worse unless an ubershader is implemented.
Describe the solution you'd like
If practical, convert the Terrain shader to an uber shader that recompiles on the fly as needed to accomodate the terrain it is used for so that the custom built shader only contains logic needed for the individual terrain.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.