Jump to content

Josh

Staff
  • Posts

    23,251
  • Joined

  • Last visited

Everything posted by Josh

  1. Whatever material the sprite uses should be using the unlit shader.
  2. You need quaternions and Slerp(). It's the only way to interpolate between arbitrary rotations.
  3. It seems like all that stuff is in there: void Sprite::BindClass(sol::state* L) { L->set("SPRITEVIEW_DEFAULT", SPRITEVIEW_DEFAULT); L->set("SPRITEVIEW_BILLBOARD", SPRITEVIEW_BILLBOARD); L->set("SPRITEVIEW_XROTATION", SPRITEVIEW_XROTATION); L->set("SPRITEVIEW_YROTATION", SPRITEVIEW_YROTATION); L->set("SPRITEVIEW_ZROTATION", SPRITEVIEW_ZROTATION); L->new_usertype<Sprite> ( "SpriteClass", sol::base_classes, sol::bases<Entity>(), sol::meta_function::index, &Entity::dynamic_get, sol::meta_function::new_index, &Entity::dynamic_set, "SetClipRegion", &Sprite::SetClipRegion, "size", sol::property([](Sprite& s) { return s.size; }), "mesh", sol::property([](Sprite& s) { return s.mesh; }), "SetViewMode", &SetViewMode, "SetText", [](Sprite& s, std::string t) { s.SetText(t); } How is sprite_ledgemarker being created? Are you sure the variable is a sprite? I noticed the sprite casting is missing, so I am adding it now. You may need to do this, once it is updated: local sprite = Sprite(entity) sprite:SetViewMode()
  4. Call Camera->SetLighting(false) on any cameras that do not use lights! This will prevent directional light shadows from calculating for that camera, and will prevent it from uploading a light grid to the GPU each frame.
  5. Ah, that makes sense. The depth range has a limited precision, so this is behaving pretty much as I would expect. What you are seeing is z-fighting.
  6. The entity method takes roll into account, and tries to make the best decision. The Mat4 method is simpler.
  7. It may. Aligning an object to a vector is an ambiguous operation.
  8. Is this after calculating GI or after loading the scene from a file?
  9. I think those are the mipmaps, being fed into the wrong position.
  10. I can't find any thread about this issue, but I remember talking about it in last week's meeting. I was able to produce the error in @Andy90's program, but in a new project the error did not occur: Do you think there might be some code you added that could be causing this?
  11. Use mat.GetQuaternion() to get the exact rotation.
  12. Oh, I think I know why. It's pointing straight down, so you activated Gimbal lock.
  13. 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));
  14. See void Mat4::MakeDir(const Vec3& dir, const int axis)
  15. 0.9.6 Today's fixes are uploaded...
  16. This would not be too difficult to do, if you just had a hook that got called in the right place...
  17. Can't you just use camera->SetRenderTarget to render to a texture?
  18. 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.
  19. 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; }
  20. Josh

    Build 785

    Both issues are fixed.
  21. 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.
  22. 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...
  23. 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?
×
×
  • Create New...