-
Posts
2,411 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Downloads
Posts posted by SpiderPig
-
-
4 minutes ago, Josh said:
Did they go away?
I haven't been getting them since your upgrade...
-
Are windows notifications coming back?
-
Not sure if this is a bug or I'm not using it right - should SetTorque() on a kinematic joint disable all rotation? I just want to position the joint and no matter what happens to it, have it never rotate. Here moving the joint makes it rotate all over the place.
#include "UltraEngine.h" using namespace UltraEngine; int main(int argc, const char* argv[]) { auto plugin = LoadPlugin("Plugins/LELegacy.dll"); //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); //Create a light auto light = CreateDirectionalLight(world); light->SetRotation(35, 45, 0); light->SetRange(-10, 10); auto floor = CreateBox(world, 100, 0.1, 100); floor->SetPosition(0, -1, 0); auto hub_pivot = CreateBox(world, 0.25f); hub_pivot->SetCollider(nullptr); hub_pivot->SetMass(1.0f); hub_pivot->SetColor(0, 1, 0); auto slider_pivot = CreateBox(world, 0.25f); slider_pivot->SetMass(1.0f); slider_pivot->SetColor(0, 0, 1); auto cam_pivot = CreatePivot(world); cam_pivot->SetParent(slider_pivot); cam_pivot->SetPosition(0.0f, 2.5f, 0.0f, true); camera->SetParent(cam_pivot); camera->SetPosition(0.0f, 1.8f, -5.0f, true); camera->SetRotation(25.0f, 0.0f, 0.0f); auto k = CreateKinematicJoint(Vec3(0, 0, 0), hub_pivot); k->SetMaxTorque(0.0f); auto s = CreateSliderJoint(Vec3(0, 0, 0), Vec3(0, 1, 0), hub_pivot, slider_pivot); Vec3 mousepos; float lookspeed = 0.1f; float looksmoothing = 0.5f; //Main loop while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false) { auto _displaySize = window->GetSize(); float cx = Round((float)_displaySize.x / 2.0f); float cy = Round((float)_displaySize.y / 2.0f); auto mouse_position = Vec3(window->GetMousePosition().x, window->GetMousePosition().y, window->GetMousePosition().z); window->SetMousePosition(cx, cy); mouse_position = mouse_position * looksmoothing + mousepos * (1 - looksmoothing); auto dx = (mouse_position.x - cx) * lookspeed; auto dy = (mouse_position.y - cy) * lookspeed; auto camrot = cam_pivot->GetRotation(); camrot.x += dy; camrot.y += dx; cam_pivot->SetRotation(camrot); mousepos = mouse_position; float angle = cam_pivot->GetRotation().y; Vec3 pos = hub_pivot->GetPosition(true); Vec3 up = Vec3(0.0f, 1.0f, 0.0f); Vec3 direction = Vec3(Sin(angle), 0, Cos(angle)); Vec3 strafe = direction.Cross(up).Normalize(); if (window->KeyDown(KEY_W)) { k->SetPose(pos + direction, Vec3()); } if (window->KeyDown(KEY_S)) { k->SetPose(pos - direction, Vec3()); } if (window->KeyDown(KEY_A)) { k->SetPose(pos + strafe, Vec3()); } if (window->KeyDown(KEY_D)) { k->SetPose(pos - strafe, Vec3()); } world->Update(); world->Render(framebuffer); } return 0; }
-
8 hours ago, Josh said:
Fixed culling bug, I think
Seems to be fixed in both examples and my larger project.
-
I threw together a quick example for you showing some of the issues I'm still seeing with entities popping in and out. The green cube pops in and out and in my other project so does the player cylinder, doesn't seem to happen here though. The entities are always in the centre of the camera and they still pop in and out. If you remove the player cylinder the blue cube seems to fine, it's just the cube attached the slider.
#include "UltraEngine.h" #include "ComponentSystem.h" using namespace UltraEngine; int main(int argc, const char* argv[]) { auto plugin = LoadPlugin("Plugins/LELegacy.dll"); //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); //Create a light auto light = CreateDirectionalLight(world); light->SetRotation(35, 45, 0); light->SetRange(-10, 10); auto floor = CreateBox(world, 100, 0.1, 100); floor->SetPosition(0, -1, 0); auto hub_pivot = CreateBox(world, 0.25f); hub_pivot->SetCollider(nullptr); hub_pivot->SetMass(1.0f); hub_pivot->SetColor(0, 1, 0); auto slider_pivot = CreateBox(world, 0.25f); slider_pivot->SetMass(1.0f); slider_pivot->SetColor(0, 0, 1); auto player = CreateCylinder(world, 0.5f, 1.8f); player->SetCollider(nullptr); player->SetParent(slider_pivot); auto cam_pivot = CreatePivot(world); cam_pivot->SetParent(slider_pivot); cam_pivot->SetPosition(0.0f, 2.5f, 0.0f, true); camera->SetParent(cam_pivot); camera->SetPosition(0.0f, 1.8f, -5.0f, true); camera->SetRotation(25.0f, 0.0f, 0.0f); auto k = CreateKinematicJoint(Vec3(0, 0, 0), hub_pivot); auto s = CreateSliderJoint(Vec3(0, 0, 0), Vec3(0, 1, 0), hub_pivot, slider_pivot); Vec3 mousepos; float lookspeed = 0.1f; float looksmoothing = 0.5f; //Main loop while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false) { auto _displaySize = window->GetSize(); float cx = Round((float)_displaySize.x / 2.0f); float cy = Round((float)_displaySize.y / 2.0f); auto mouse_position = Vec3(window->GetMousePosition().x, window->GetMousePosition().y, window->GetMousePosition().z); window->SetMousePosition(cx, cy); mouse_position = mouse_position * looksmoothing + mousepos * (1 - looksmoothing); auto dx = (mouse_position.x - cx) * lookspeed; auto dy = (mouse_position.y - cy) * lookspeed; auto camrot = cam_pivot->GetRotation(); camrot.x += dy; camrot.y += dx; cam_pivot->SetRotation(camrot); mousepos = mouse_position; float angle = cam_pivot->GetRotation().y; Vec3 pos = hub_pivot->GetPosition(true); Vec3 up = Vec3(0.0f, 1.0f, 0.0f); Vec3 direction = Vec3(Sin(angle), 0, Cos(angle)); Vec3 strafe = direction.Cross(up).Normalize(); if (window->KeyDown(KEY_W)) { k->SetPose(pos + direction, Vec3()); } if (window->KeyDown(KEY_S)) { k->SetPose(pos - direction, Vec3()); } if (window->KeyDown(KEY_A)) { k->SetPose(pos + strafe, Vec3()); } if (window->KeyDown(KEY_D)) { k->SetPose(pos - strafe, Vec3()); } world->Update(); world->Render(framebuffer); } return 0; }
-
-
This has me extremely puzzled - I just started working with kinematic joints again, and all was good, I could set its position with SetPose() and other things, but then a few builds later CreateKinematicJoint() started returning nullptr for no reason same as the slider joint too. I uninstalled Ultra and reinstalled with no luck.
Here's an example project where 'k' is empty.
#include "UltraEngine.h" #include "ComponentSystem.h" using namespace UltraEngine; int main(int argc, const char* argv[]) { auto plugin = LoadPlugin("Plugins/LELegacy.dll"); //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, 1, -3); //Create a light auto light = CreateBoxLight(world); light->SetRotation(35, 45, 0); light->SetRange(-10, 10); auto p = CreatePivot(world); auto k = CreateKinematicJoint(Vec3(0, 0, 0), p); //Main loop while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false) { world->Update(); world->Render(framebuffer); } return 0; }
-
Have you got physics shape visualization implemented yet?
-
I wonder if the backups for files that have been updated should be moved to a single folder in the project directory rather than having mountains of .bak's lurking about, especially in the shaders folder. It could keep the same hierarchy in the backups folder so you can find stuff. I take it Ultra is going to be heavily updated over the coming months / years so it could get out of hand pretty quick. Just a thought
EDIT : Or has is been done already..
-
On 12/5/2022 at 6:32 PM, Josh said:
I don't plan to support raw Basis files. KTX2 includes Basis compression and is a better format. All mentions of the Basis plugin should be removed from the documentation, although you can still use it if you want.
Are there any tools available to convert to KTX2? I can't seem to find any...
-
I ran the 3D GUI example in a new project and they still have the same problem I showed above.
-
1 hour ago, reepblue said:1 hour ago, Josh said:
Does GUI work in 3D?
I might want to check this out for myself as I was getting weird issues when making an in-game console a few months ago.
I have noticed with 3D GUI that the borders of the buttons don't line up, and on LoadGame I'm holding the mouse down and you can see the triangles that make up the background mesh. I think there are various issues like this with other widgets too. Haven't tested with a small fresh project though, if you'd like an example I can put one together for you tonight.
-
Is the Basis plugin meant to be missing?
-
The project is pretty big and it only happens like 1 in 20 times, I think even if I sent you the whole project you'd be trying for ages to actually make it happen.
-
-
Not sure if this a bug, if I set a material to a model and then add a mesh to that model, the material is not assigned to the new mesh. You have to re-apply the material. Should it be so? I don't know...
-
Looks amazing now, good job 🙂
-
That's looks good. Is this an infinite water plane or will it work with any custom shape?
@Josh A lots changed since I've last compiled a custom shader - is this still possible? I get a few errors currently, I see Base.frag is now base_frag.glsl but I'm not sure if I should be suing that anymore...
-
Error: Failed to load shader module "Shaders/Downsample.frag.spv"
Most of the loading errors are gone - just have this one still.
-
1
-
-
I have been very good. They are called on the main thread.
-
1
-
-
If I create more threads than currently available, will the excess threads essentially wait for an available slot to execute in or do I have to manage this somehow?
EDIT : It appears to
-
Wow, with the new CreateMesh() arguments the largest patch can now be created 3x faster! Thankyou.
-
Would it be possible to remove a mesh from a model?
my_model->RemoveMesh(this_mesh)
Instead of deleting and remaking a model to remove the meshes it might save some time.
-
Might even be better again to create the new mesh instance and add it to a model as a different LOD mesh and let the shaders take care of LOD - is that how LOD works in Ultra? My only thoughts here are for a massive terrain over time the RAM and GPU memory could increase to large numbers (more so thinking GPU memory).
I could create the mesh on a separate thread and then assign it the model. If memory does become a problem I could create an entirely new model for patches that haven't been visited for a while or are so far away and then delete the old model with all the extra meshes.
Deleting a model will remove all the mesh information from the GPU and renderer?
Website upgrade
in General Discussion
Posted
Welcome. They're pretty nifty. I click it every time one goes off