Jump to content

Josh

Staff
  • Posts

    23,141
  • Joined

  • Last visited

Everything posted by Josh

  1. I think this approach does not work with partial builds. I am seeing some values that appears twice and make no sense. The only thing you can do is declare all your custom event IDs in a single file.
  2. Something I started doing in the code is using strings for properties like this: void ModelEditor::ApplyProperties(shared_ptr<Material> material) { materialproperties->SetText("Material", "Name", material->name); materialproperties->SetValue("Material", "Metalness", material->GetMetalness()); materialproperties->SetValue("Material", "Roughness", material->GetRoughness()); materialproperties->SetState("Material", "Tessellation", material->GetTessellation()); materialproperties->SetValue("Material", "Color", material->GetColor()); materialproperties->SetValue("Material", "Emission", material->GetEmission()); materialproperties->SetState("Material", "Alpha mask", material->GetAlphaMask()); materialproperties->SetState("Material", "Transparent", material->GetTransparent()); materialproperties->SetState("Material", "Shadows", material->GetShadow()); materialproperties->SetState("Material", "Two-sided", not material->GetBackFaceCullMode()); materialproperties->SetValue("Material", "Displacement", material->GetDisplacement().x); materialproperties->SetValue("Material", "Offset", material->GetDisplacement().y); } Instead of declaring a million widget variables I just set values and detect events based on the property name. This cuts the size of the code down by a lot, probably 4x less code. It's very easy to add new properties without modifying any headers. I want user-made extensions to be able to add their own properties and store them in glTF and scene files. My main focus for extensions is editing and storing custom data, and creating custom tools. Not so much concerned with the user's ability to drastically modify the existing features or program layout.
  3. I feel my concern about handling models and materials is resolved nicely.
  4. Question: Do you have a matching depth pass shader you are using for the depth pre-pass? You can disable camera depth pre-pass to test this.
  5. You can modify each limb's orientation, and all the basic entity properties, and they get saved into the model file:
  6. When you select an embedded texture in the tree view the view switches over to the texture, and texture properties are shown. This is much better than what I had before:
  7. In fact, it probably is not necessary to show a list of embedded materials in the file. That would be designed from the programmer's point of view. It could be more relevant to the end user if the material properties are listed on the mesh the material is applied to: I feel like this approach is designed with the end user in mind, instead of worshipping the code/data and treating the end user like garbage.
  8. It might not be hard to export the Blender mass value in the glTF file: https://github.com/KhronosGroup/glTF-Blender-IO
  9. That's a good point. I think we should draw the line at trying to store other entity types in glTF. However, you can set the mass and other properties of a limb and save that in the glTF file, so it does eliminate the need for some simple prefabs. In my experience 90% of prefabs are just a model with a collider and a setting for mass to make the model physically interactive.
  10. A lot of the objects in glTF have an "extras" property in the spec, so for things that you have no intention of usage outside your own app, that's the place to put that information. So the extended properties extension mentioned above is axed.
  11. This can actually get rid of the need for prefabs because every engine property can be embedded in the glTF. However, if the model is resaved in another program those properties will probably be lost.
  12. The best way to describe it is that the tabs make me feel "claustrophobic".
  13. One big difference between glTF and Leadwerks models is all the materials are embedded in a glTF file. You can apply an external material file to it, but its contents will get copied into the glTF, instead of referencing the original material file. So material files are really just for CSG solids.
  14. Here's an idea. Add a property grid in the bottom half of the hierarchy panel. When an embedded material or texture is selected, show its properties there where you can edit them and see the effect on the model.
  15. Here's a revision. The relative file path is shown in the window titlebar. I also made the menu and status bars span the entire window. This wastes some vertical space the side panel was using before, but the lines looks a lot cleaner this way.
  16. I'm thinking the Leadwerks way is probably perfect. It shows everything at once, and it prevents you from opening too many files at once.
  17. Something like this might be better for models with embedded assets, where you can select a material or texture in the tree on the left, and then the properties on the right show the item properties. If you use tabs for a window like this, then you end up with something that looks kind of odd when a texture or material is selected. Since there is no need for any left-side pane for these assets, the window looks quite wide for them.
  18. I uploaded another build that opens each asset in its own window, called "UltraEngine_b.exe", so you can run both and compare. It would be better if a new window was offset from the previous one a little bit, instead of being in the same default position/size but that can be added later. Right now I just want to get this out to you as fast as possible so your input can help steer the design.
  19. Here we have three items opened with the tabs removed so each asset opens in its own window. I also replaced the window text with the name of the file:
  20. Here's a quick test. I opened a model in one window and two textures in the other window. Not sure about the tabs, they make things confused and complicated...
  21. Here's a mockup. I don't know if I like it. When you open a material's texture, what would happen? Would it open on the left panel? What if you change a texture setting and want to see the effect on the model? There are some other options: Make each asset open in its own window (one Asset Editor window for each opened file) Make a model editor, material editor, and texture editor window like in Leadwerks Don't worry about this and leave the behavior as-is Leadwerks, for comparison. What I like about this is you can instantly see all the properties for every file at a glance. If you focus on one of these files, you find what you are looking for with a picture, instead of searching for the right file name in a tab.
  22. Josh

    Dungeon Skank

    So the walls you are creating, they are from a pre-formed piece segment, right?
  23. The one part of the new editor I am experiencing some friction is when I adjust material settings and want to see their effect on a model that uses that material. Switching back and forth between tabs each time you change something is tedious. Leadwerks avoided this problem by opening textures, materials, and models in separate editor interfaces that were designed differently from one another, and Ultra is using a single interface with tabs. Do you have any ideas of how to get around this without making the interface confusing? I'd rather not have a bunch of options like "Open asset in new window" / "Open in new tab" because it forces the user to craft their own UI. I'd rather things just work simply and intuitively by default, without the user even noticing. Do you have any other suggestions to improve the workflow so far?
  24. This is the code I used to make the tessellation comparison screenshot: #include "UltraEngine.h" #include "ComponentSystem.h" using namespace UltraEngine; int main(int argc, const char* argv[]) { //Get the displays auto displays = GetDisplays(); //Create a window auto window = CreateWindow("Ultra Engine", 0, 0, 1280, 720, displays[0], WINDOW_CENTER | WINDOW_TITLEBAR); //Create a world auto world = CreateWorld(); //Create a framebuffer auto framebuffer = CreateFramebuffer(window); //Create a camera auto camera = CreateCamera(world); camera->SetClearColor(0.125); camera->SetFov(70); camera->SetPosition(0, 1.5, 0); camera->SetRotation(90, 0, 0); camera->SetWireframe(true); world->SetAmbientLight(1); //Create a box auto p1 = CreatePlane(world, 1, 1, 1, 1, MESH_TRIANGLES); p1->SetPosition(-0.75, 0, 0); auto p2 = CreatePlane(world, 1, 1, 1, 1, MESH_QUADS); p2->SetPosition(0.75, 0, 0); auto mtl = CreateMaterial(); mtl->SetTessellation(true); p1->SetMaterial(mtl); p2->SetMaterial(mtl); camera->SetTessellation(20); //Main loop while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false) { if (window->KeyDown(KEY_UP)) camera->Move(0, 0, 0.01); if (window->KeyDown(KEY_DOWN)) camera->Move(0, 0, -0.01); world->Update(); world->Render(framebuffer); } return 0; }
×
×
  • Create New...