Jump to content

All Activity

This stream auto-updates

  1. Past hour
  2. Use mat.GetQuaternion() to get the exact rotation.
  3. Oh, I think I know why. It's pointing straight down, so you activated Gimbal lock.
  4. Strange...you would expect a lot of problems if these functions were off... Mat4 m; m.MakeDir(Vec3(0, 0, 1), 1); Print("Mat4"); Print(WString(m[0])); Print(WString(m[1])); Print(WString(m[2])); Print(WString(m[3])); Print("Quat"); auto q = m.GetQuaternion(); Print(WString(q)); Print("Euler"); auto r = q.Euler(); Print(WString(r));
  5. I'm not positive I'm using it right... but no matter what I do the matrix's rotation (r) is always zero. Where as (i) is correct - Vec3(0,90,90); MakeDir() returns nothing, I checked. auto m = Mat4(); m.MakeDir(Vec3(0,0,1), 1); up_pivot->AlignToVector(Vec3(0,0,1), 1); auto i = up_pivot->GetRotation(); auto r = m.GetRotation();
  6. Today
  7. I'm using this code to align a pivot to the up direction of my player controller. up_pivot->AlignToVector(up_direction, 1); target_quat = target_quat.Slerp(up_pivot->GetQuaternion(), 0.1f); kinematic_joint->SetPose(pos, target_quat); The video below shows it working really well when the forward direction is along the X axis (red arrow in the distance). However when moving back and forth along the z axis player spins 90 degrees to face the (+) X axis when the up vector is something like Vec3(0.0f, 0.0f, 1.0f) or Vec3(0.0f, 0.0f, -1.0f). You can see it at around 25 seconds into the video. I know this is a by product of aligning to a vector, but what I'm wondering is - is there is a way to align to an up vector as well as a forward vector? This way I think my player rotation can be more controlled when the up direction changes as I can track both up and forward vectors with ease. Matrix math perhaps?
  8. See void Mat4::MakeDir(const Vec3& dir, const int axis)
  9. 0.9.6 Today's fixes are uploaded...
  10. You mean like a render hook that displayed the inventory when the capture was ready for the inventory shader to use?
  11. This would not be too difficult to do, if you just had a hook that got called in the right place...
  12. Not really, I want to capture a screen shot before I open my inventory and then use that result as a background for my inventory that will be blurred. Like the window transparent effect in the editor. It won't be real time but that's fine. I'm just worried about spending the time waiting for the capture to be ready as a pixmap and then going through all the conversion and re-upload to the GPU when it's already there.
  13. Can't you just use camera->SetRenderTarget to render to a texture?
  14. I have a collection of 57 high quality rock models I have permission to include with Ultra. However, they need LODs and colliders created. The convex hull / convex decomposition tool will work fine, no need to model new colliders by hand. I also have some trees, some of which can be used as-is, but with many of them we want to try to remodel it using what we have learned recently about making game trees. Anyone interested in working on these? It will work better if you have Unwrap3D, MantisLOD, and maybe Gigapixel AI for some upscaling. The results will be freely available to all Ultra users.
  15. I had to change the way hooks are inserted into the object info. In the next build, this example will work: #include "UltraEngine.h" using namespace UltraEngine; struct MyObject : public Object { int count{ 0 }; static void Hook(shared_ptr<Object> source, shared_ptr<Object> extra) { auto world = source->As<World>(); auto o = extra->As<MyObject>(); o->count++; Print(o->count); } }; int main(int argc, const char* argv[]) { //Get the display list auto displays = GetDisplays(); //Create a window auto window = CreateWindow("Ultra Engine", 0, 0, 1920, 1080, displays[0], WINDOW_CLIENTCOORDS | WINDOW_CENTER | WINDOW_TITLEBAR); //Create a world auto world = CreateWorld(); auto o = std::make_shared<MyObject>(); world->AddHook(HOOKID_UPDATE, MyObject::Hook, o); //Main loop while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false) { world->Update(); Sleep(1000); } return 0; }
  16. Josh

    Build 785

    Both issues are fixed.
  17. Okay, I just added a timer that runs when the game is active, so events are continuously being emitted in the editor and it keeps reading the process pipes.
  18. I am seeing something similar. It seems you must move the mouse out of the game window, probably because this is triggering an event in the editor, Maybe the process needs to have its write buffer cleared before it can proceed past a print command...
  19. It looks like the triangle indices are being modified in memory?... I am not seeing anything wrong on an AMD 6600. What GPU is this occurring with?
  20. Yesterday
  21. It's because the FBX file has a child. When multiple objects are selected, the gizmo is placed in the center of the selection bounds. The parent model's pivot is still in the right place. The logic to handle this in an intuitive way is a little tricky. Let me think about this...
  22. Josh

    Third LOD

    The way LOD distances is stored in the MDL file format is a little weird. I am changing this in the next build and this problem will be fixed.
  23. In the current build I am not able to reproduce this error...
  24. If I capture a screenshot with framebuffer->Capture(), is there a way I get the result within a shader without first getting it as a pixmap, then converting it to a texture, then giving it to a material? if (window->KeyHit(KEY_SPACE)) framebuffer->Capture(); auto caps = framebuffer->GetCaptures(); for (auto pixmap : caps) { auto path = GetPath(PATH_DESKTOP) + "/screenshot.jpg"; pixmap->Save(path); RunFile(path); } Maybe something like this might be possible? FRAGMENT SHADER if (capture_result_handle != -1){ vec4 capture_color = texture(capture_result_handle, frag_coords) }
  25. I'm not using the default widget system here, I've made my own and rasterize my fonts to a texture. In this screenshot you can clearly see the problem I have. I added a background shader to the font shader. The text only looks good when on dark backgrounds. You can see the right side is much nicer than the left side. Here's my inventory. I'm unsure if this is a font shader issue - a rasterization issue - or simply I need better font colours depending on the background color. Thought I'd ask to see if any one here might have any tips.
  1. Load more activity
×
×
  • Create New...