Jump to content

SpiderPig

Developers
  • Posts

    2,205
  • Joined

  • Last visited

Everything posted by SpiderPig

  1. Oh I just have some simple meshes rendering to the UI camera, and I move them about, in and out of view for reasons too complex to explain. I've mentioned before that especially in debug mode the culling is quite slow at the moment. I thought If I could turn off culling for the UI camera it would probably solve the small issue, that's all.
  2. It's for Ultra. Not sure if I'll make it work for Leadwerks yet.
  3. Still churning away at this. Working on the geometry shader at the moment and custom outputs.
  4. Can I turn off culling for a particular camera?
  5. There's bloom.lua in the posteffects folder under the shaders folder in your project. I think you add that to your camera as a post effect. For an emission shader I think you just need to change the shader from diffuse.shader to emission.shader in the material editor. I haven't used Leadwerks in a while though.
  6. A bloom post effect maybe? Or if your talking about the lens of the light you'll need an emission material.
  7. I thought I'd better post this here as I think it's a bug. Though I'm not sure... I can't seem to get the mesh to collide with the falling cube - I think I got the collider in the right spot to catch the cube. #include "UltraEngine.h" #include "Components/Mover.hpp" 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, 1, -5); camera->SetDebugPhysicsMode(true); //Create a light auto light = CreateBoxLight(world); light->SetRotation(35, 45, 0); light->SetRange(-10, 10); bool flip = true; float extents = 3.0f; vector<Vec3> verts; if (flip == false) { verts.push_back(Vec3(-extents, 0.0f, -extents)); verts.push_back(Vec3(extents, 0.0f, -extents)); verts.push_back(Vec3(0.0f, 0.0f, extents)); } else { verts.push_back(Vec3(-extents, 0.0f, -extents)); verts.push_back(Vec3(0.0f, 0.0f, extents)); verts.push_back(Vec3(extents, 0.0f, -extents)); } auto c = CreateMeshCollider(); c->AddFace(verts); c->Finalize(); auto pivot = CreateModel(world);//Works // auto pivot = CreatePivot(world);//Dosn't Work pivot->SetCollider(c); pivot->SetCollisionType(COLLISION_SCENE); world->SetCollisionResponse(COLLISION_SCENE, COLLISION_PROP, COLLISION_COLLIDE); //Main loop vector<shared_ptr<Entity>> cubes; while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false) { if (window->KeyHit(KEY_SPACE) == true) { auto cube = CreateBox(world); cube->SetPosition(0.0f, 10.0f, 0.0f, true); cube->SetMass(1.0f); cube->SetCollisionType(COLLISION_PROP); cubes.push_back(cube); } world->Update(); world->Render(framebuffer); } return 0; }
  8. Can a texture be saved to a stream and then loaded back again with LoadTexture(stream)? auto stream = WriteFile(filename); //Write some stuff texture->Save(stream); stream.Close();
  9. I made a bug report for the Collison thing.
  10. It needs refining, but currently I create a collider per voxel. This can be up to 5 or so triangles in total per collider. It worked the old way because I was able to set the indices as well.
  11. I think the answer is yes... would it be practical to add the ability to set the indices? Just that going through this and adding vertices in order is going to be a headache to figure out.
  12. The collider is not visible on a pivot. I use pivots as the hubs for Collison patches on voxel terrain, mainly due to the fact it doesn't need a visible model. The code below shows the problem but I have just found out it will work on a model even if it doesn't have a mesh. Should a pivot be used like this? Or is is there any harm in using a model without a mesh assigned to it this way? #include "UltraEngine.h" #include "Components/Mover.hpp" 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, 1, -5); camera->SetDebugPhysicsMode(true); //Create a light auto light = CreateBoxLight(world); light->SetRotation(35, 45, 0); light->SetRange(-10, 10); vector<Vec3> verts; verts.push_back(Vec3(-3.0f, 0.0f, -3.0f)); verts.push_back(Vec3(3.0f, 0.0f, -3.0f)); verts.push_back(Vec3(3.0f, 0.0f, 3.0f)); auto c = CreateMeshCollider(); c->AddFace(verts); c->Finalize(); auto pivot = CreateModel(world);//Works // auto pivot = CreatePivot(world);//Dosn't Work pivot->SetCollider(c); pivot->SetCollisionType(COLLISION_SCENE); world->SetCollisionResponse(COLLISION_SCENE, COLLISION_PROP, COLLISION_COLLIDE); //Main loop vector<shared_ptr<Entity>> cubes; while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false) { if (window->KeyHit(KEY_SPACE) == true) { auto cube = CreateBox(world); cube->SetPosition(0.0f, 10.0f, 0.0f, true); cube->SetMass(1.0f); cube->SetCollisionType(COLLISION_PROP); cubes.push_back(cube); } world->Update(); world->Render(framebuffer); } return 0; }
  13. So I should take care to add them in a certain order? Like a triangle_strip in GLSL, otherwise I might get overlapping faces...?
  14. Can AddFace() only take 3 vertices in the array?
  15. Can we enable physics shape visualization from within code yet?
  16. Ah awesome! I had a little freak-out when it didn't compile, but that way sounds much better, thanks.
  17. Hmm, that doesn't seem to have worked for me. @reepblue Did it work for you?
  18. Does CreateMeshCollider() not need a mesh as an argument any more? I may have missed something in one of the blogs...
  19. If you open the VS22 Installer the option to rollback is under the More tab. I think you can open the installer from within Visual Studio by going to Tools->Get Tools and Features.
  20. I was wondering if that were possible. I'll take a look at it.
  21. You've defiantly made some good progress these last few weeks. I think once we see our games take shape motivation levels go way up, at least for me anyway.
  22. I don't think there is an exact date but Josh has said it's moving along fast and I don't think there is much big stuff left to do on the editor.
×
×
  • Create New...