Jump to content

All Activity

This stream auto-updates

  1. Past hour
  2. Fixed, shader update required.
  3. Fixed rotation mouse tool acting wrong No longer using SPIR-V for terrain shaders, as there was some inconsistent behavior between the shaders and the compiled binaries.
  4. Today
  5. With the latest terrain and selection changes the terrain editing has some small bugs: 1. no indicators are shown in the viewport. (the sculpt and paint ranges) 2. instead of the indicator, the multiselection box is drawn. But the editing in both cases works, just no overlay is shown. A side question: Now that i can choose the texture size. Are the brushes (or textures) resized internally to match the size? I ask because the default dirt layer has textures with 1k size, but when i create a terrain with 2k or 512 textures it just works but the texture size in the material is still 1k.
  6. Drag to select functionality should be 100% accurate now and working correctly.
  7. sorry late response was away fishing . yes it is a leadwerks game . i cant change the script because when i open leadwerks engine and open my project half of it is missing.. i am just double clicking the game.exe from a published game. i had previously downloaded the zip file from a old post where josh helped me find my game as leadwerks game launcher no longer works and i thought i lost all of my work. so when i double click game.exe it launches and the whole game is working (nothing missing) but it only runs in a little window. i am sure that years ago there was a key shortcut to make fullscreen ....like alt enter, or shift f ? and im sure i had this problem before but cant find the solution in forum .... maybe too old.
  8. Drag-to-select-area functionality is back, now plays nicely with all mouse tools. Fixed bad brush picking behavior.
  9. Yesterday
  10. While doing simple mapping, I've ran into an issue with my session where the editor thinks I'm holding control when selecting objects when I'm not. This results in multiple objects getting selected unintentionally. Also, clicking the void doesn't deselect the objects.
  11. Fixed vertex and face tools, which could get weird results that did not align to the current mouse position. Vertex and mouse tools now display the up/down mouse cursor when Alt key is pressed. For now, I will keep the trenchbroom-style controls for these two tools.
  12. It would be good if we could get more input options for components in the editor. Such as lists for entities, strings, floats, Vec3 and files. Like in the example bellow.
  13. Changed the translation tool to use an axis gizmo, like people were asking for. Some backfaces on the gizmo model are currently missing and cannot be picked, and its appearance will improve in future updates.
  14. Some code I used to resize a cubemap. I think the mipmaps might not be correct, but that's okay: Pasting here in case I need it again auto plug = LoadPlugin("Plugins/ISPCTexComp.dll"); auto tex = LoadTexture(GetPath(PATH_DESKTOP) + "/diffuse.dds", LOAD_MIPCHAIN); auto mipchain = tex->mipchain; std::vector<shared_ptr<Pixmap> > chain2; for (auto p : mipchain) { { p = p->Convert(TEXTURE_RGBA16); p = p->Resize(256, 256); p = p->Convert(TEXTURE_BC6H); chain2.push_back(p); } } SaveTexture(GetPath(PATH_DESKTOP) + "/thumbnail_diffuse.dds", TEXTURE_CUBE, chain2, 6); return 0;
  15. There is a problem with the prefabs. If you create a prefab, drag it into the scene and then save the scene, it spawns in the game in the wrong location or is not visible at all. (due to the wrong positioning)
  16. Here is some code that uses it, but I just can't seem to get it to work right. I don't think there is an error in my code. I had to fix this file for C++17. Maybe that is causing it? I do not understand these functions: misc.h int VertMap(const std::vector<int>& collapse_map, int a, int mx) { if (mx <= 0) return 0; while (a >= mx) { a = collapse_map[a]; } return a; } std::vector<linalg::aliases::float3> vert; std::vector<tridata> tri; std::vector<int> collapse_map; std::vector<int> permutation; tridata t; for (const auto& v : mesh->vertices) { vert.push_back(linalg::aliases::float3(v.position.x, v.position.y, v.position.z)); } for (int n = 0; n < mesh->CountPrimitives(); ++n) { t.v[0] = mesh->GetPrimitiveVertex(n, 0); t.v[1] = mesh->GetPrimitiveVertex(n, 1); t.v[2] = mesh->GetPrimitiveVertex(n, 2); tri.push_back(t); } //----------------------------- // Reduce the mesh //----------------------------- ProgressiveMesh(vert, tri, collapse_map, permutation); //----------------------------- // PermuteVertices //----------------------------- // rearrange the vertex Array std::vector<float3> temp_Array; unsigned int i; assert(permutation.size() == vert.size()); for (i = 0; i < vert.size(); i++) { temp_Array.push_back(vert[i]); } for (i = 0; i < vert.size(); i++) { vert[permutation[i]] = temp_Array[i]; } // update the changes in the entries in the triangle Array for (i = 0; i < tri.size(); i++) { for (int j = 0; j < 3; j++) { tri[i].v[j] = permutation[tri[i].v[j]]; } } //----------------------------- // Build new mesh //----------------------------- model->Clear(); mesh->extra = nullptr; mesh = model->AddMesh(); std::vector<int> newvertex(vert.size()); std::fill(newvertex.begin(), newvertex.end(), -1); //Add triangles int a, b, c, p0, p1, p2; int render_num = vert.size() * 0.5; for (unsigned int i = 0; i < tri.size(); i++) { p0 = VertMap(collapse_map, tri[i].v[0], render_num); p1 = VertMap(collapse_map, tri[i].v[1], render_num); p2 = VertMap(collapse_map, tri[i].v[2], render_num); if (p0 == p1 or p1 == p2 or p2 == p0) continue; a = newvertex[p0]; if (a == -1) { a = mesh->AddVertex(vert[p0].x, vert[p0].y, vert[p0].z); newvertex[p0] = a; } b = newvertex[p1]; if (b == -1) { b = mesh->AddVertex(vert[p1].x, vert[p1].y, vert[p1].z); newvertex[p1] = b; } c = newvertex[p2]; if (c == -1) { c = mesh->AddVertex(vert[p2].x, vert[p2].y, vert[p2].z); newvertex[p2] = c; } //int a = mesh->AddVertex(vert[p0].x, vert[p0].y, vert[p0].z); //int b = mesh->AddVertex(vert[p1].x, vert[p1].y, vert[p1].z); //int c = mesh->AddVertex(vert[p2].x, vert[p2].y, vert[p2].z); mesh->AddPrimitive(a, b, c); } mesh->UpdateBounds(); model->UpdateBounds();
  17. Changed the way the preview server works. I think this will be more reliable. Currently it is rather slow to generate new thumbnails but I think it will get faster.
  18. Last week
  19. Asset browser search bar now acts as a filter, includes a drop-down box with some pre-defined file types. Removed grab-object-to-rotate behavior.
  20. Press space to add text for left button. Right button have a several lines initially but looks as should be. #include "UltraEngine.h" using namespace UltraEngine; int main(int argc, const char* argv[]) { //Get the displays auto displays = GetDisplays(); //Create window auto window = CreateWindow("Ultra Engine", 0, 0, 1280, 720, displays[0]); //Create framebuffer auto framebuffer = CreateFramebuffer(window); //Create world auto world = CreateWorld(); //Create main camera auto camera = CreateCamera(world); camera->SetPosition(0, 0, -3); //Load a font auto font = LoadFont("Fonts/arial.ttf"); //Create user interface with a semi-transparent background auto ui = CreateInterface(world, font, framebuffer->size); ui->background->SetColor(0, 0, 0, 0.5); //Create widget iVec2 sz = ui->background->ClientSize(); auto button = CreateButton("Button", 100, 200, 150, 30, ui->background); auto button2 = CreateButton("Button2", 500, 200, 150, 30, ui->background); for (int i = 0; i < 5; i++) { button2->AddText("\ntest"); } //Create camera auto orthocamera = CreateCamera(world, PROJECTION_ORTHOGRAPHIC); orthocamera->SetClearMode(CLEAR_DEPTH); orthocamera->SetPosition(float(framebuffer->size.x) * 0.5f, float(framebuffer->size.y) * 0.5f, 0); //UI will only appear in orthographic camera orthocamera->SetRenderLayers(2); ui->SetRenderLayers(2); while (true) { if (window->KeyHit(KEY_SPACE)) { button->AddText("\ntest"); } while (PeekEvent()) { const Event ev = WaitEvent(); switch (ev.id) { case EVENT_WINDOWCLOSE: if (ev.source == window) { return 0; } break; default: ui->ProcessEvent(ev); break; } } world->Update(); world->Render(framebuffer); } return 0; }
  21. Nevermind, loading is fine, saving is the remaining issue. For the record, this is how I'm saving my json files. bool JSON::Save(nlohmann::json& j3, const std::string& path) { std::ofstream o(path); o << std::setw(4) << j3 << std::endl; return (bool)FileSystem::GetFileType(path); }
  22. This is for a Leadwerks project and over the few months I've fell in love with tableplusplus and I've used it for my input system in Ultra Engine. I'm trying to port it to Leadwerks but it seems my implementation of the loading and saving isn't correct. My JSON parsers work fine but no data loads, and tables don't save as pretty as when using the json library alone. Anything I'm doing wrong? #ifdef __TABLE_PLUS_PLUS table Table::Load(const std::string& path) { auto j3 = JSON::Load(path); table t(j3); return t; } table Table::Load(Stream* stream) { auto j3 = JSON::Load(stream); table t(j3); return t; } bool Table::Save(table& t, const std::string& path) { nlohmann::json j3 = t.to_json(); return JSON::Save(j3, path); } table Table::Load(const std::wstring& path) { auto j3 = JSON::Load(path); table t(j3); return t; } table Table::Load(shared_ptr<FileStream> stream) { auto j3 = JSON::Load(stream); table t(j3); return t; } bool Table::Save(table& t, const std::wstring& path) { nlohmann::json j3 = t.to_json(); return JSON::Save(j3, path); } #endif
  23. It seems the resize bounds are set to the sprite's bounds instead of the entity's bounds. You can't resize it like if it was a brush anymore.
  24. Fixed Camera::SetUniform texture overload. Added Camera::SetUniform material overload. Added Camera::SetUniform entity overload.
  25. "No source file found" just means the original image file the file was converted from does not exist, or might not be included. Leadwerks does not save image files, it just converts images into the custom texture format. Ultra can actually load Leadwerks .tex files and save in different image formats.
  26. Here's a few videos I've found on how to deal with animated objects in blender. Specifically transforming them to new locations, and scaling an armature with animations. (Like from mixamo) In this video the only thing that needs to be done different for armatures with animation tracks, is instead of going "Ctrl+A->Apply Transformations". Go "Ctrl+A->All Transforms to Deltas". This will scale the keyframes for the animations as well.
  27. 0.9.6 In this build the terrain creation works more like Leadwerks, where it is created by first selecting the terrain tool. You don't have to worry about selecting the terrain to edit it, it just works. Try it and let me know what you think. The way it is stored in the map file has not changed. LOD for orthographic cameras is fixed.
  1. Load more activity
×
×
  • Create New...