SpiderPig Posted November 24, 2023 Share Posted November 24, 2023 Is it possible to create 2 or more windows each one with UI with 3D? I can't think of a way to do it that doesn't involve multiple framebuffers. Quote Link to comment Share on other sites More sharing options...
klepto2 Posted November 24, 2023 Share Posted November 24, 2023 The editor does it, so it should be possible. Do you need different worlds? with one world I would create multiple cameras and rendertargets. And draw a panel in each window with the correct texture applied to it. i will come back with a sample in a few minutes. 1 Quote Windows 10 Pro 64-Bit-Version NVIDIA Geforce 1080 TI Link to comment Share on other sites More sharing options...
SpiderPig Posted November 24, 2023 Author Share Posted November 24, 2023 That's what I was thinking too. Though it seems a panel can only have texture assigned to it if the interface has been created with a world and I can't get two interfaces working with one world. I can create another world for this purpose but I need two framebuffers, one for each window, and that dosn't work very well. Quote Link to comment Share on other sites More sharing options...
klepto2 Posted November 24, 2023 Share Posted November 24, 2023 instead of a panel you could maybe use a simple sprite and an orthographic camera. Quote Windows 10 Pro 64-Bit-Version NVIDIA Geforce 1080 TI Link to comment Share on other sites More sharing options...
SpiderPig Posted November 24, 2023 Author Share Posted November 24, 2023 Wouldn't I still need a framebuffer for the second window? The problem seems to be with two framebuffers... Quote Link to comment Share on other sites More sharing options...
SpiderPig Posted November 24, 2023 Author Share Posted November 24, 2023 So far the only way I can get something to work is by rendering a camera to a texture buffer, then taking a snapshot of that buffer per frame and setting the resulting pixmap to the panel. Dreadfully slow, but no extra framebuffer required. I may have to be satisfied with just one window then. Quote Link to comment Share on other sites More sharing options...
SpiderPig Posted November 24, 2023 Author Share Posted November 24, 2023 I have three screens and wanted to put one window on each, but another option might be to create one window and stretch it across all three screens. Then create what 3D viewports I need inside the interface. Quote Link to comment Share on other sites More sharing options...
klepto2 Posted November 24, 2023 Share Posted November 24, 2023 Do you need multiple worlds? or is one world, but rendered on multiple windows (with different cameras) enough? Quote Windows 10 Pro 64-Bit-Version NVIDIA Geforce 1080 TI Link to comment Share on other sites More sharing options...
SpiderPig Posted November 24, 2023 Author Share Posted November 24, 2023 I only need one world. But if it needed more to work that's fine too. Quote Link to comment Share on other sites More sharing options...
klepto2 Posted November 24, 2023 Share Posted November 24, 2023 I have tried some approaches, but none of them is satisfying. I have an approach where i share the world between windows, but only create standalone ui_worlds. This is still laggy and i guess as Josh stated comes from the culling thread. For plane ui rendering it should be possible to disable culling on a camera or world at all. This would resolve this issue i think. Quote Windows 10 Pro 64-Bit-Version NVIDIA Geforce 1080 TI Link to comment Share on other sites More sharing options...
Josh Posted November 24, 2023 Share Posted November 24, 2023 What are you trying to do that requires this? This design seems very strange and does not sound like any 3D application I have ever seen. The editor renders to multiple framebuffers, but rendering performance is not much of a concern because it is not a real-time app. Additionally, it disables asynchronous rendering in the engine initialization settings, which gives it overall slower rendering performance (if it was continuously rendering, which it is not), but lower latency, so it is more responsive to user input. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
SpiderPig Posted November 24, 2023 Author Share Posted November 24, 2023 I'm using Ultra as a simulator for a A.I that will eventually be deployed to physical hardware. I just wanted a few diagnostic screens that represented data in a few real-time 3D viewports. But I think there are other ways I can achieve similar results. Multiple 3D windows was just the preferred option. Ultimately, if a panel could have a texture assigned without being a 3D interface, that would work best. 9 hours ago, klepto2 said: I have tried some approaches, but none of them is satisfying. I have an approach where i share the world between windows, but only create standalone ui_worlds. This is still laggy and i guess as Josh stated comes from the culling thread. For plane ui rendering it should be possible to disable culling on a camera or world at all. This would resolve this issue i think. Thanks for giving it a try. Quote Link to comment Share on other sites More sharing options...
Josh Posted November 24, 2023 Share Posted November 24, 2023 You can disable asynchronous rendering like the editor does, use a 2D GUI, or make the extra display windows a separate process and communicate with them through UDP or some other method. 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
SpiderPig Posted November 24, 2023 Author Share Posted November 24, 2023 Yeah I think I'll just use 2D GUI and anything 3D just overlay in my main window. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.