rjmelter Posted February 14, 2023 Share Posted February 14, 2023 Removed By User. Quote Link to comment Share on other sites More sharing options...
Josh Posted February 14, 2023 Share Posted February 14, 2023 It's not currently supported, but it would not be hard to add: https://www.ultraengine.com/learn/CreateMesh?lang=cpp Can I ask what you want to use it for? 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...
rjmelter Posted February 14, 2023 Author Share Posted February 14, 2023 Removed By User. Quote Link to comment Share on other sites More sharing options...
rjmelter Posted February 14, 2023 Author Share Posted February 14, 2023 Removed By User. Quote Link to comment Share on other sites More sharing options...
Josh Posted February 14, 2023 Share Posted February 14, 2023 I will add this in an update to Ultra Engine 1.0.2 this week. It won't be difficult. Vertex colors are supported. I'm assuming this will be just one big mesh with millions of vertices. I honestly don't know if Ultra Engine will be much faster than Unity in this situation, because the bottleneck will probably be the vertex pipeline, and both engines are probably running at the hardware's max speed under those conditions. This is actually the exact reason why I keep telling everyone it is important to keep the vertex structure as compact as possible: 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...
rjmelter Posted February 14, 2023 Author Share Posted February 14, 2023 Removed By User. 1 Quote Link to comment Share on other sites More sharing options...
rjmelter Posted February 14, 2023 Author Share Posted February 14, 2023 Removed By User. 1 Quote Link to comment Share on other sites More sharing options...
Alienhead Posted February 15, 2023 Share Posted February 15, 2023 13 hours ago, rjmelter said: I do not however understand what exactly you did to save the data and achieve performance. He's been writing, games, lightmappers, csg modelers and engine code since age 2. 4 Quote I'm only happy when I'm coding, I'm only coding when I'm happy. Link to comment Share on other sites More sharing options...
Josh Posted February 16, 2023 Share Posted February 16, 2023 I am kind of curious to see what these look like. Looks like NASA uses the LAS file format for LIDAR data. https://gliht.gsfc.nasa.gov/index.php?section=34 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...
rjmelter Posted February 18, 2023 Author Share Posted February 18, 2023 Removed By User. 1 Quote Link to comment Share on other sites More sharing options...
Josh Posted February 18, 2023 Share Posted February 18, 2023 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 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...
rjmelter Posted February 18, 2023 Author Share Posted February 18, 2023 Removed By User. 1 Quote Link to comment Share on other sites More sharing options...
Josh Posted February 19, 2023 Share Posted February 19, 2023 I was able to load your text file, but I am getting this Vulkan validation error: Quote Validation Error: [ VUID-VkGraphicsPipelineCreateInfo-Vertex-07722 ] Object 0: handle = 0x3f36830000000078, type = VK_OBJECT_TYPE_SHADER_MODULE; | MessageID = 0x5e7d87fa | vkCreateGraphicsPipelines(): Pipeline topology is set to VK_PRIMITIVE_TOPOLOGY_POINT_LIST, but PointSize is not written in the Vertex shader. The Vulkan spec states: If the pipeline is being created with a Vertex {ExecutionModel} and no TessellationEvaluation or Geometry {ExecutionModel}, and the topology member of pInputAssembly is VK_PRIMITIVE_TOPOLOGY_POINT_LIST, a PointSize decorated variable must be written to (https://vulkan.lunarg.com/doc/view/1.3.236.0/windows/1.3-extensions/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-Vertex-07722) 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. 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...
Solution Josh Posted February 19, 2023 Solution Share Posted February 19, 2023 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. 3 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...
Josh Posted February 19, 2023 Share Posted February 19, 2023 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; } 2 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...
rjmelter Posted February 19, 2023 Author Share Posted February 19, 2023 Removed By User. Quote Link to comment Share on other sites More sharing options...
rjmelter Posted February 19, 2023 Author Share Posted February 19, 2023 - Quote Link to comment Share on other sites More sharing options...
Josh Posted February 19, 2023 Share Posted February 19, 2023 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. 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...
Josh Posted February 19, 2023 Share Posted February 19, 2023 The whole system should be instant. I will check this out tomorrow. Sorry for the inconvenience. 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...
rjmelter Posted February 19, 2023 Author Share Posted February 19, 2023 Sent you a DM. Quote Link to comment Share on other sites More sharing options...
Josh Posted February 19, 2023 Share Posted February 19, 2023 The issue is fixed now. Just log in and it will work fine. 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...
Josh Posted February 20, 2023 Share Posted February 20, 2023 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. 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...
rjmelter Posted February 20, 2023 Author Share Posted February 20, 2023 - Quote Link to comment Share on other sites More sharing options...
Josh Posted February 21, 2023 Share Posted February 21, 2023 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. 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...
rjmelter Posted March 2 Author Share Posted March 2 - 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.