Jump to content

Josh

Staff
  • Posts

    23,143
  • Joined

  • Last visited

Everything posted by Josh

  1. I can try it and see what happens!
  2. I don't know if my downsampling idea is even a good one. It doesn't look like the shader itself is the bottleneck.
  3. I think it will be necessary to get a 1.0 release out, see all the ramifications of how the flowgraph works with the new component system, and then take that knowledge and design something more advanced for a future release. I think I will just focus on delivering the same functionality Leadwerks had, plus zooming. Otherwise I am likely to design something, and then remove and redesign it in another update.
  4. Josh

    Editor progress

    Viewport grids and popup menus now working...
  5. Josh

    Editor progress

    Using a new style for the top four icons in the left-side edit bar that don't distract so much from the main content. Brushes are using a wireframe mesh that only shows brush edges, not full triangulated surfaces. Testing with a map from Cyclone.
  6. In Inkscape Path > Stroke to Path does it
  7. Our SVG loader does not support lines a.k.a. "stroke", it only supports polygons. Is there some way to convert a stroked shape into a polygon? edit-face.zip
  8. I have not gone through and tested every Lua command, but most of it is working now. Debugging Lua in VSCode is very good. I plan to use the ChatGPT API to auto-generate Lua documentation from the C++ docs, and then go through and make fixes by hand. My initial tests at this gave very good results.
  9. I don't like tabs for two reasons: You can't see the two areas of content at once. With the flowgraph, being able to see the selected objects in the 3D viewport and see how that correlates to the nodes in the graph is very helpful. It sacrifices a lot of screen space for something that is rarely used.
  10. I'm going to experiment with placing the logic view in a viewport, so to get to it you just switch the viewport's view to "logic". Then it will appear in the editor main window alongside the 3D view, and you can switch it to a single viewport and back when you need more space.
  11. How did you make the settings UI?
  12. Meshes are shared across different instances of the same model, so if a material is applied to a mesh, it appears on all instances. You can load a model with the unmanaged flag to load a new copy of it, or use Entity::Copy() to make a unique copy.
  13. I'm implementing the new flowgraph editor now. I am going to try to make 'Flowgraph" and "FlowgraphNode" as custom widgets so maybe you can use them if you want.
  14. I'm designing the new flowgraph editor now. This is what I've got: It's using the windowed GUI, not a 3D viewport, and I think this will give it a better appearance. I plan for the entity to display each component it has, with the input and output functions for each component. I want a slider to scale / zoom the interface, and some way to add, edit, and select multiple "pages" (which are separate flowgraphs within the same scene, but not connected to each other). I don't know what the UI for this should look like. Ideas?
  15. That makes sense, because the drawing is being combined into one depth buffer. So I guess you have to choose. Maybe this isn't the best effect to use in your game.
  16. I think the lower price will result in higher revenue. Like, I think more than twice as many people will snatch it up at $99 than would buy it at $199. Standard, Pro, and a possible .NET version will each be a separate app ID on Steam, so that means if everything was exactly the same, sales of Ultra would be three times what Leadwerks sales are now. There is a HUGE pool of people who bought Leadwerks on Steam, and convincing them to upgrade to the new engine is the easiest way to get new users. If 10% of them buy the new engine right away, that's $350,0000, which is not a bad start. Unlike Leadwerks, where I had sort of painted myself into a corner, there is a plan for expansion and paid updates for Ultra for years to come. My goal is to get popular again in the indie space, then use that popularity to get business sales going with a more expensive enterprise version, costing around $999 a year, focusing on VR. We know the indie game developer market, including free users who will never pay for anything, is about 2,000,000 people. Leadwerks got about 1.75% of that. It's not a stretch to imagine that 10% of VR games could be made in Ultra two years from now. In that case, it would not be hard to go to large businesses and say "lol I'm from NASA, look how popular this is becoming, here is why it is so great, how many do you want to buy?...". That's always been my plan, and that's why I did those VR projects and spoke at that conference about VR technology.
  17. In outline.json, I think if you add the previous pass into the samplers it will be available in slot 1 (PostEffectTexture1): "samplers": ["DEPTH", "PREVPASS"], Have not actually tried it.
  18. Right now the color is controlled by setting the color of the overlay sprite. I am saying that instead it could be controlled in the outline shader, by getting the color that was rendered and using that instead of just writing vec4(1,1,1,1) like it currently does.
  19. It would probably be best to create another object for each outlined object, set it to use the unlit shader family, and in the post effect use the object's color as the color written into the texture buffer. Then you can have multiple colors in a single pass.
  20. Yeah, I think it is actually mostly the full-screen transparent blend that is being drawn seven times. I tried combining all the passes into a single texture buffer. You would still need to change the color for each pass somehow, but currently this does not draw anything when I run it: #include "UltraEngine.h" using namespace UltraEngine; enum OUTLINE_TYPE { OUTLINE_RENDER_LAYER = 4, OUTLINE_MOVEMENT = 8, OUTLINE_TARGET_MOVEMENT = 16, OUTLINE_ACTION = 32, OUTLINE_SELECTABLE_UNIT = 64, OUTLINE_SELECTED_UNIT = 128, OUTLINE_ENEMY = 256 }; int main(int argc, const char* argv[]) { //Get the displays auto displays = GetDisplays(); //Create a window auto window = CreateWindow("Ultra Engine", 0, 0, displays[0]->GetSize().width, displays[0]->GetSize().height, displays[0], WINDOW_CENTER | WINDOW_TITLEBAR | WINDOW_FULLSCREEN); //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(3, 0, -5); //Create a light auto light = CreateBoxLight(world); light->SetRotation(35, 45, 0); light->SetRange(-10, 10); auto gameScene = CreateScene(); //------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------ std::vector<Vec4> outlineColors; outlineColors.push_back(Vec4(0.1f, 0.6f, 0.6f, 1)); outlineColors.push_back(Vec4(0.1f, 0.3f, 1.0f, 1)); outlineColors.push_back(Vec4(0.5f, 0.8f, 0.1f, 1)); outlineColors.push_back(Vec4(0.1f, 0.6f, 0.1f, 1)); outlineColors.push_back(Vec4(0.1f, 1.0f, 0.1f, 1)); outlineColors.push_back(Vec4(0.8f, 0.1f, 0.1f, 1)); auto sz = framebuffer->GetSize(); auto texbuffer = CreateTextureBuffer(sz.x, sz.y); //Display overlay auto displayOverlaySprite = CreateSprite(world, sz.x, sz.y); displayOverlaySprite->SetRenderLayers(OUTLINE_RENDER_LAYER); auto displayOverlayMaterial = CreateMaterial(); displayOverlayMaterial->SetTransparent(true); displayOverlayMaterial->SetTexture(texbuffer->GetColorAttachment()); displayOverlaySprite->SetMaterial(displayOverlayMaterial); gameScene->AddEntity(displayOverlaySprite); for (int i = 0; i < outlineColors.size(); i++) { auto renderToTextureCamera = CreateCamera(world); renderToTextureCamera->SetClearColor(0, 0, 0, 0); if (i > 0) renderToTextureCamera->SetClearMode(ClearMode(0)); renderToTextureCamera->SetRenderLayers(OUTLINE_MOVEMENT << i); renderToTextureCamera->SetFov(camera->GetFov()); renderToTextureCamera->SetMatrix(camera->matrix); renderToTextureCamera->AddPostEffect(LoadPostEffect("Shaders/PostEffects/Outline.json")); renderToTextureCamera->SetRenderTarget(texbuffer); gameScene->AddEntity(renderToTextureCamera); //Box auto box = CreateBox(world); box->SetPosition(i, 0, 0); box->SetRenderLayers(1 + (OUTLINE_MOVEMENT << i)); gameScene->AddEntity(box); } auto overlayCamera = CreateCamera(world, PROJECTION_ORTHOGRAPHIC); overlayCamera->SetClearMode(CLEAR_DEPTH); overlayCamera->SetRenderLayers(OUTLINE_RENDER_LAYER); overlayCamera->SetPosition(sz.x * 0.5f, sz.y * 0.5f, 0); gameScene->AddEntity(overlayCamera); //------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------ //Main loop while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false) { world->Update(); world->Render(framebuffer, false); } return 0; }
  21. The shader does a lot of texture lookups. If you increased the thickness, it will be even more. The current implementation could be improved by downsampling either the depth buffer or maybe a first-pass color texture, with linear filtering. This could be used as a preliminary rough check in the final subpass, because if the value of a texture read is non-zero, it means there is some highlighted pixels in that area.
  22. Josh

    Multiple components

    I made an "Add Component" button where unity users will expect it to be. I don't have a lot of strong opinions about how the component system should work, so I think just giving them what they are expecting to see is fine.
×
×
  • Create New...