-
Posts
2,600 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Downloads
Everything posted by reepblue
-
Pulled an update just now, and now it works. 🤷
-
Broken again. Also, the DDS conversion isn't working.
-
I think this was caused by the fix discussed here. As of writing, trying to delete any model from the map will cause an "Cannot delete Model Limbs" error when the model has no limbs to begin with.
-
It seems to me with a little elbow grease, this can be converted into a tool in which an extension can be written to use to generate hdr cubemaps.
-
I know if you look at any cubemaps texture in the Asset Browser it's also black despite it working in the world renderer. Did you try Setting the background to your generated cubemap?
-
Read your compile errors. Simply looking at your code, you need to define texrture0. Not a shader expert, but I made my shaders by trial and error.
-
Understandable. I'll await for it's return.
-
Hmm, this does solve my problem of identifying what is level geometry and what is a decorative model. I can just use the As<Brush>() cast. I guess if brush collapsing returns, please put back the public "collapsedbrush" bool or something like you had in Leadwerks. I also want to mention that when I loaded my save file with Map::Load(), I noticed my materials lost their normal maps. These kinds of things are hard to write examples for as it requires a lot of code and assets to showcase the problem. Maybe it's a side effect from the same problem here.
-
Every easy to recreate, just hard to notice without any shiny materials unless you look at the probe directly.
- 1 reply
-
- 1
-
Top one is from the Asset browser, correct. Sorry for not making that clear. The bottom screen is from the Map Tab.
-
Found a new bug with the Save/Load system. I think the brushes are being re-created. This example has a transparent material in the scene, and it gets opaquer after each reload. Load the map, Press F5, and then press F6 to see the results. #include "UltraEngine.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(); //Create a framebuffer auto framebuffer = CreateFramebuffer(window); //Load scene auto scene = LoadMap(world, "Maps/savetest3.ultra"); //Main loop while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false) { if (window->KeyHit(KEY_F5)) { //Save the starting scene to a file scene->Save("game.sav"); } //Reload the starting scene when space key is pressed if (window->KeyHit(KEY_F6)) { scene->Reload("game.sav"); } world->Update(); world->Render(framebuffer); } return 0; } SaveTest3.zip
-
Speaker::Pause() Set's it's state to SPEAKER_STOPPED
reepblue replied to reepblue's topic in Bug Reports
Diffrent problem, but related. When the sound is resumed, it starts from the beginning. Replace the sound with the one attached. radio_dreamlandloop_mono.zip -
In the asset browser, I can't seem to change the Collision Type or gravity settings for a gltf+bin model. Might be a carry over from a previous bug. Also, for appearance, it's missing the "Static Reflection" option. Checked items are marked as False on the Map panel. I'll report more when I find them...
-
Pausing/Resuming speakers aren't working as expected. #include "UltraEngine.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(); //Create a framebuffer auto framebuffer = CreateFramebuffer(window); //Create a camera auto camera = CreateCamera(world); camera->SetClearColor(0.125); camera->SetFov(70); camera->SetPosition(0, 0, -3); camera->Listen(); //Create a light auto light = CreateBoxLight(world); light->SetRotation(35, 45, 0); light->SetRange(-10, 10); //Create a box auto box = CreateBox(world); box->SetColor(0, 0, 1); //Sound auto sound = LoadSound("https://raw.githubusercontent.com/UltraEngine/Documentation/master/Assets/Sound/notification.wav"); auto speaker = CreateSpeaker(sound); speaker->SetPosition(box->GetPosition(true)); speaker->SetRange(10); auto speakerloop = CreateSpeaker(sound); speakerloop->SetPosition(box->GetPosition(true)); speakerloop->SetRange(10); speakerloop->SetLooping(true); auto speakerstate = speaker->GetState(); auto speakerloopstate = speakerloop->GetState(); bool paused = false; //Main loop while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false) { // P Plays the normal non-looping speaker if (window->KeyHit(KEY_P)) { speaker->Play(); } // L Plays the looping speaker if (window->KeyHit(KEY_L)) { speakerloop->Play(); } // Space pauses both speakers if (window->KeyHit(KEY_SPACE)) { if (!paused) { speaker->Pause(); speakerloop->Pause(); paused = true; } else { speaker->Resume(); speakerloop->Resume(); paused = false; } } // Report the state if (speaker->GetState() != speakerstate) { Print("Normal Speaker state at: " + String(speaker->GetState())); speakerstate = speaker->GetState(); } if (speakerloop->GetState() != speakerloopstate) { Print("Looping Speaker state at: " + String(speakerloop->GetState())); speakerloopstate = speakerloop->GetState(); } //Move and turn with the arrow keys - best experienced with headphones if (window->KeyDown(KEY_UP)) camera->Move(0, 0, 0.1); if (window->KeyDown(KEY_DOWN)) camera->Move(0, 0, -0.1); if (window->KeyDown(KEY_LEFT)) camera->Turn(0, -1, 0); if (window->KeyDown(KEY_RIGHT)) camera->Turn(0, 1, -0); world->Update(); world->Render(framebuffer); } return 0; } Right now, I have to do this hack in my project. void GameSpeaker::Pause() { if (speaker) { if (speaker->GetState() == SPEAKER_PLAYING) { pausetime = speaker->GetTime(); speaker->Pause(); } } } void GameSpeaker::Resume() { if (speaker) { if (speaker->GetState() == SPEAKER_PAUSED || pausetime > 0) { speaker->SetTime(pausetime); speaker->Play(); pausetime = 0; } } }
-
I'm trying to make an editor extension that'll create new files from the editor. I'm working on a "Create New Material" function, but I get an error with the Save command saying it expects usedata type and not a string, although I feel like this code is correct. local extension = {} function CreateNewMaterial() local file = RequestFile("Select Material Location", "", "Ultra Engine Material File (*.mat):mat", 0, true) if file ~= nil then local mat = CreateMaterial() if mat ~= nil then mat:SetColor(1,1,1,1) local shaderfamily = LoadShaderFamily("Shaders/PBR.fam") if shaderfamily then mat:SetShaderFamily(shaderfamily) shaderfamily = nil end mat:Save(file); end end end function extension.hook(event, extension) if event.id == EVENT_WIDGETACTION then if event.source == extension.menuitem then CreateNewMaterial() end end end -------------------------------------------------------------------- -- Add menu item -------------------------------------------------------------------- local menu = program.menu:FindChild("Create", false) if menu ~= nil then local submenu = menu:FindChild("Asset", false) if submenu == nil then submenu = CreateMenu("Asset", menu) end extension.menuitem = CreateMenu("Material", submenu) end ListenEvent(EVENT_WIDGETACTION, extension.menuitem, extension.hook, extension) I also tried making a table and saving it, but it didn't work ether. local a = ctable() a["material"] = nil a["material"]["shaderFamily"] = "Shaders/PBR.fam" SaveTable(a, file) What am I doing wrong here?
-
Old attachment but this demonstrates that the components are no longer being loaded although it's registered. savetest2.zip
-
Rebuilding Global Illumination Resets Probe's Apperence.
reepblue replied to reepblue's topic in Bug Reports
Color is the most important but I can check the others. -
I still see DDS as the engine's native texture format as you don't need a plugin to load such textures.
-
I assumed it was DDS for traditional games, basis for simulations, and ktx for if Ultra runs on something like the quest. The question I've ran into is what is the best modeling format since gltf is technically 3 formats.
-
This map demonstrates the crash. lighttest.zip
-
I'm playing around with the editor and noticed when I set a light (Such as a point light) to static, my app crashes as soon as it renders in the camera. I'm noticing this from the editor, but I think this example will reproduce the results when pressing space. #include "UltraEngine.h" #include "Components/Motion/Mover.hpp" using namespace UltraEngine; int main(int argc, const char* argv[]) { //Plugin for texture loading auto plugin = LoadPlugin("Plugins/FITextureLoader"); //Get display auto displays = GetDisplays(); //Create window auto window = CreateWindow("Ultra Engine", 0, 0, 1280, 720, displays[0], WINDOW_TITLEBAR | WINDOW_CENTER); //Create framebuffer auto framebuffer = CreateFramebuffer(window); //Create world auto world = CreateWorld(); world->SetAmbientLight(0.1); world->RecordStats(true); //Create camera auto camera = CreateCamera(world); camera->SetClearColor(0.25); camera->SetPosition(0, 2, 0); camera->Move(0, 0, -5); //Build scene auto tunnel = LoadModel(world, "https://github.com/UltraEngine/Documentation/raw/master/Assets/Models/Underground/tunnel_t.glb"); tunnel->SetRotation(0, 180, 0); tunnel->Staticize(); auto cage = LoadModel(world, "https://github.com/UltraEngine/Documentation/raw/master/Assets/Models/Underground/fancage.glb"); cage->Staticize(); auto fan = LoadModel(world, "https://github.com/UltraEngine/Documentation/raw/master/Assets/Models/Underground/fanblades.glb"); fan->SetPosition(0, 2, 0); auto mover = fan->AddComponent<Mover>(); mover->rotation.z = 300; auto light = CreatePointLight(world); light->SetColor(2, 2, 2); light->SetRange(10); light->SetPosition(0, 2, 2); light->SetColor(4.0); //Display text auto orthocam = CreateCamera(world, PROJECTION_ORTHOGRAPHIC); orthocam->SetClearMode(CLEAR_DEPTH); orthocam->SetRenderLayers(128); orthocam->SetPosition(float(framebuffer->size.x) * 0.5, float(framebuffer->size.y) * 0.5f); auto font = LoadFont("Fonts/arial.ttf"); auto text = CreateSprite(world, font, "Shadow polygons: 0", 14.0 * displays[0]->scale); text->SetPosition(2, framebuffer->size.y - 16.0f * displays[0]->scale); text->SetRenderLayers(128); auto text2 = CreateSprite(world, font, "Press space to make the light static.", 14.0 * displays[0]->scale); text2->SetPosition(2, framebuffer->size.y - 16.0f * 2.0f * displays[0]->scale); text2->SetRenderLayers(128); //Main loop while (!window->KeyHit(KEY_ESCAPE) and !window->Closed()) { world->Update(); world->Render(framebuffer); if (window->KeyHit(KEY_SPACE)) { light->Staticize(); text2->SetHidden(true); } text->SetText("Shadow polygons: " + String(world->renderstats.shadowpolygons)); } return 0; }
-
1. Place a probe in the map 2. Build GI. 3. Edit the Probe's appearance (Like Color). 4. Rebuild GI. 5 Notice the Probes go back to how they were.
-
FYI, don't do this, The window didn't draw correctly at 100% scaling. #include "UltraEngine.h" #include "Components/Motion/Mover.hpp" #include "Components/Player/CameraControls.hpp" using namespace UltraEngine; int main(int argc, const char* argv[]) { auto cl = ParseCommandLine(argc, argv); RegisterComponent<Mover>(); RegisterComponent<CameraControls>(); //Get the displays auto displays = GetDisplays(); //Create a window auto window = CreateWindow("Ultra Engine", 0, 0, 1280 * 2, 720 * 2, displays[0], WINDOW_CENTER | WINDOW_TITLEBAR); //Create a world auto world = CreateWorld(); //Create a framebuffer auto framebuffer = CreateFramebuffer(window); //Load the map WString mapname = "Maps/start.ultra"; if (cl["map"].is_string()) mapname = std::string(cl["map"]); auto scene = LoadMap(world, mapname); //Main loop while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false) { world->Update(); world->Render(framebuffer); } return 0; } Do something like this. #include "UltraEngine.h" #include "Components/Motion/Mover.hpp" #include "Components/Player/CameraControls.hpp" using namespace UltraEngine; int main(int argc, const char* argv[]) { auto cl = ParseCommandLine(argc, argv); RegisterComponent<Mover>(); RegisterComponent<CameraControls>(); //Get the displays auto displays = GetDisplays(); //Create a window auto window = CreateWindow("Ultra Engine", 0, 0, 1280 * (int)displays[0]->GetScale(), 720 * (int)displays[0]->GetScale(), displays[0], WINDOW_CENTER | WINDOW_TITLEBAR); //Create a world auto world = CreateWorld(); //Create a framebuffer auto framebuffer = CreateFramebuffer(window); //Load the map WString mapname = "Maps/start.ultra"; if (cl["map"].is_string()) mapname = std::string(cl["map"]); auto scene = LoadMap(world, mapname); //Main loop while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false) { world->Update(); world->Render(framebuffer); } return 0; } Only thing is that you need to cast the float to an int which might cause problems.
-
Maybe have the asset browser also prompt for a name change when the user saves other Leadwerks assets.
-
Browse option in dropdowns reopens file browser multiple times
reepblue replied to klepto2's topic in Bug Reports
I mean that it wasn't a big deal when the environment settings didn't save in the map files, but now that bug was fixed, the multiple dialog boxes became more annoying as there was a reason to apply skyboxes and such. 🤣 I haven't tried Ultra since Sunday, I probably should boot up my PC after work and check everything out.