Jump to content

Josh

Staff
  • Posts

    22,901
  • Joined

  • Last visited

Everything posted by Josh

  1. You probably want your Update method to do something like this: bool System::Update() { if (window->KeyDown(KEY_ESCAPE)) return false; world->Update(); world->Render(framebuffer); return true; } And then your main loop in main.cpp would be something like this: while (true) { if (not system.Update()) break; } If you are looking for a way to structure and compartmentalize your code, you may want to check out the entity component system.
  2. Josh

    Moon

  3. Josh

    Moon

    First pass at rendering the lunar surface with real moon GIS data from NASA.
  4. Mesh construction will be much faster if you create an STL vector for the vertices, and another for the indices, get the total size for each, resize them, and then fill them in. Then use the CreateMesh() overload that accepts the data: https://www.ultraengine.com/learn/CreateMesh?lang=cpp That will be much much faster than adding one vertex at a time. Regarding VR, although it is very important I decided it would be okay to defer that for now because everyone is still just learning the new engine. When I add support, it will take less than four weeks to do. In Leadwerks I was using the SteamVR library, and it Ultra I can using Khronos OpenVR. I don't think it will be much different than what I did before. I don't really recommend trying to hack VR support right now because anything you do will just get replaced by something that will probably be better integrated. I have a meeting this week that will give me a better idea of what the immediate next steps will be, but I don't have a definitive answer about the VR question today.
  5. Maybe a denoise filter would help: https://github.com/BrutPitt/glslSmartDeNoise I have used this code before. It's good.
  6. It would be really cool if you could convert a heightmap terrain into a voxel terrain and start carving caves.
  7. An update is now available in the 1.0.2 channel. You must also sync your project files to get some updated shader binaries. Loading 2 million vertices from a text file is very slow, especially in debug builds, so you definitely will want to load this type of data from some binary format.
  8. Updated 1.0.2 Added support for point meshes. The current implementation is not optimal.
  9. The issue is fixed now. Just log in and it will work fine.
  10. The whole system should be instant. I will check this out tomorrow. Sorry for the inconvenience.
  11. Oh boy...I will check it out tomorrow. I need to change your password so I can log into your account in the client. Is that okay? The point rendering also is not available yet. I'll publish the update for that tomorrow. I don't recommend messing around with shaders yourself unless you want to. I think I can make a special shader family just for rendering point clouds, with almost everything stripped out of it.
  12. This is the code I used to load that... #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(); world->SetAmbientLight(0); //Create a framebuffer auto framebuffer = CreateFramebuffer(window); //Create a camera auto camera = CreateCamera(world); camera->SetClearColor(0.125); camera->SetFov(70); world->SetAmbientLight(1); //Camera controls auto actor = CreateActor(camera); actor->AddComponent<CameraControls>(); auto stream = ReadFile(GetPath(PATH_DESKTOP) + "/T1.txt"); auto model = CreateModel(world); auto mesh = model->AddMesh(MESH_POINTS); while (not stream->Eof()) { auto s = stream->ReadLine().Trim(); if (s.empty()) continue; auto sarr = s.Split(""); if (sarr.size() < 6) continue; auto v = mesh->AddVertex(sarr[0].ToFloat(), sarr[2].ToFloat(), sarr[1].ToFloat()); mesh->SetVertexColor(v, sarr[3].ToFloat() / 255.0f, sarr[4].ToFloat() / 255.0f, sarr[5].ToFloat() / 255.0f); } model->UpdateBounds(BOUNDS_ALL); //Main loop while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false) { world->Update(); world->Render(framebuffer); } return 0; }
  13. All you are doing is calling Time::Update twice, in a really convoluted manner.
  14. Josh

    Rendering Lidar Data

    Rendering a point cloud with data provided by @rjmelter
  15. Here's a first pass at this. Point cloud meshes don't need an indice array, so I need to go in and figure out how to get rid of that when MESH_POINTS is used, as it will be more optimal without that. The vertex structure also includes a lot of data a point cloud does not use, like texture coordinates and normals, so maybe I can create a special optimized vertex buffer just for point cloud rendering. It would make a significant difference in speed, as LIDAR data is one of the rare cases where the vertex pipeline actually is the bottleneck.
  16. I was able to load your text file, but I am getting this Vulkan validation error: So I will need to muck around in Vulkan a bit more before it works. I actually thought point sizes had vanished from the pages of history.
  17. Updated 1.0.2 Pixmap::CopyRect now much faster, especially when a streambuffer pixmap is used Fixed errors in Pixmap::Sample linear filtering Fixed Pixmap::WritePixel bug Fixed it so Pixmap::ReadPixel and WritePixel will now work with very big images Pixmap conversions now all work without calling Buffer::Data, for compatibility with StreamBuffers Added a few missing pixel format conversions Added Pixmap::Blit Added Pixmap::Extract Fixed Entity::AlignToVector bug Fixed joint deletion bug Fixed component collision bug Stream::Read and Write are now broken into 8 Mb chunks
  18. Do you know what the text info means? I am guessing it's vertex position / RGB color / some other info I don't know: -1.38699996 -5.33300018 0.15500000 0 36 218 -2032.000000 9.000000 9.000000 9.000000 9.000000 -1.88900006 -5.35699987 0.19300000 0 44 210 -1991.000000 9.000000 9.000000 9.000000 9.000000 -2.05200005 -5.37300014 0.22499999 0 52 202 -1982.000000 9.000000 9.000000 9.000000 9.000000 -2.07200003 -5.36299992 0.22300000 0 51 203 -1975.000000 9.000000 9.000000 9.000000 9.000000 -2.06599998 -5.36199999 0.22400001 0 51 203 -1973.000000 9.000000 9.000000 9.000000 9.000000 -2.10800004 -5.36899996 0.22300000 0 51 203 -1988.000000 9.000000 9.000000 9.000000 9.000000 -2.09500003 -5.37099981 0.22600000 0 52 202 -1979.000000 9.000000 9.000000 9.000000 9.000000 -2.08899999 -5.36800003 0.22499999 0 52 202 -1976.000000 9.000000 9.000000 9.000000 9.000000 -2.12100005 -5.36299992 0.22499999 0 52 202 -1996.000000 9.000000 9.000000 9.000000 9.000000
  19. Josh

    ChatGPT

    What a great future. We're going to scolded and punished by AI cat ladies.
  20. The reason for this is that on Linux I don't know if it is possible to change the color of a drawn image. I am using XRenderComposite to draw the picture.
  21. This will be fixed in the next update to 1.0.2.
  22. Congratulations. Everyone should try this game.
×
×
  • Create New...