Jump to content

Josh

Staff
  • Posts

    23,228
  • Joined

  • Last visited

Community Answers

  1. Josh's post in VR: Index Controllers are represented as 2 right controllers. was marked as the answer   
    fixed
  2. Josh's post in Custom table properties get overwritten. was marked as the answer   
    Fixed.
    Note that your custom properties should be stored in an "extras" object:
    { "material": { "shaderfamily": "Shaders/PBR.fam", "texture0": "./grid01.dds", "extras": { "myproperty": 3 } } }  
  3. Josh's post in Failed to convert from png to dds was marked as the answer   
    Fixed
  4. Josh's post in When Terrain is selected the editor is painfully slow was marked as the answer   
    The terrain shader was not set up to handle when a camera has lighting disabled, so it was just accessing random video memory in the light render function.
    It's super fast now. You need to sync your project to get the new shader.
  5. Josh's post in BlendTree Animation was marked as the answer   
    The animation system will automatically blend to make smooth transitions between animations:
    https://www.ultraengine.com/learn/Model_Animate
    You can also specify a "track" in that command to mix multiple animations at once.
  6. Josh's post in Ultra Engine Pro Steam was marked as the answer   
    The problem is that your camera is pointing the wrong way / wrong position.
    cam.zip
    This suggestion can help your situation in the future when I add it:
     
  7. Josh's post in Can't log into client was marked as the answer   
    Issue is resolved.
  8. Josh's post in GLTF model crashing editor and program was marked as the answer   
    It looks like the image indexes aren't correct and this is not a valid glTF file. I added some checks to prevent crashing, but the image indexes are wrong. It would appear this indicates an error in the Ultra glTF saver.
    If you can provide the original file, before it was saved from Ultra, I will test with that.
    The images section only contains four images:
    "images": [ { "uri": "PineLeaves_DIFF.png" }, { "uri": "PineLeaves_NORM.png" }, { "uri": "PineTrunk_DIFF.png" }, { "uri": "PineTrunk_NORM.png" } ], But the textures section is referencing images greater than 3:
    "textures": [ { "extensions": { "MSFT_texture_dds": { "source": 1 } }, "source": 0 }, { "extensions": { "MSFT_texture_dds": { "source": 3 } }, "source": 2 }, { "extensions": { "MSFT_texture_dds": { "source": 5 } }, "source": 4 }, { "extensions": { "MSFT_texture_dds": { "source": 7 } }, "source": 6 } ]  
  9. Josh's post in Blank Viewports on Frame Selection was marked as the answer   
    Fixed. Cameras bounds will be treated as a single point for this functionality.
  10. Josh's post in Display bug was marked as the answer   
    Fixed!
  11. Josh's post in UI is broken at one of displays. Fullscreen window creates only on display 0. was marked as the answer   
    I am going to close this because there is no way for me to investigate this further. Please let me know if any new information arises.
  12. Josh's post in Culling seems to get slow quickly was marked as the answer   
    Implemented Camera:SetSweptCulling and it works nicely. Will be in next build.
    #include "UltraEngine.h" #include "ComponentSystem.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*2, 720*2, 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->SetPosition(0, 0, -4); camera->AddComponent<CameraControls>(); bool swept = true; camera->SetSweptCulling(true); window->SetText("Swept culling enabled"); //Create a light auto light = CreateDirectionalLight(world); light->SetRotation(45, 35, 0); light->SetColor(2); std::vector<shared_ptr<Entity> > boxes; //Create a model auto model = CreateBox(world); for (int x = 0; x < 100; ++x) { for (int y = 0; y < 5; ++y) { auto inst = model->Instantiate(world); inst->SetPosition(x * 2 - 100, y * 2 - 4, 8); boxes.push_back(inst); } } model = nullptr; //Main loop while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false) { if (window->KeyHit(KEY_SPACE)) { swept = not swept; camera->SetSweptCulling(swept); if (swept) { window->SetText("Swept culling enabled"); } else { window->SetText("Swept culling disabled"); } } world->Update(); world->Render(framebuffer); } return 0; }  
  13. Josh's post in Ultra Engine internal fbx to gltf converter bug was marked as the answer   
    I will try this if you provide the model.
  14. Josh's post in Skybox clipped by higher camera near range was marked as the answer   
    Easy shader fix in Sky.vert
    void main() { texCoords = normalize(VertexPosition.xyz); mat4 cameraMatrix = ExtractEntityMatrix(CameraID); vec4 pos = VertexPosition; pos.xyz *= CameraRange.x + (CameraRange.y - CameraRange.x) * 0.5f; pos.xyz += cameraMatrix[3].xyz; gl_Position = CameraProjectionViewMatrix * pos; gl_Position.z = (gl_Position.z + gl_Position.w) * 0.5f; }  
  15. Josh's post in Slice miss creates brushes which can't be copied was marked as the answer   
    There is a bug where a brush will crash in its UpdateBounds routine if it has no vertices. I am fixing it now...
  16. Josh's post in Package::LoadDir("") returns nothing on large package was marked as the answer   
    Apparently this version of minizip would maybe work, as long as you have less than 65536 files:
    https://github.com/zlib-ng/minizip-ng
    However, adoption of Zip64 appears to be almost non-existent in the real world. Writing a new archive format isn't exactly difficult, and may be less work than implementing another library, then dealing with all the bad design decisions a programmer who isn't me will invariably make.
    If I were to make an encryption format, I would include:
    unsigned 64-bit integers for everything so we don't have this stupid size limitation bullshit file table would be at the end of the file file removal without shifting all other files Maybe for really big archives we should be looking at something like that. The advantage would be that you can upload a new version of the archive on Steam and it would only upload the sections that changed, because each build would not shift the entire contents around. I think Valve did something like this with their packages files, which is why they have a defragment feature.
    In the immediate term, I recommend splitting your data up into multiple zip archives.
  17. Josh's post in Child Widgets visible beside parent widget area was marked as the answer   
    Fixed. Update is incoming...
  18. Josh's post in Render issuses in custom widgets was marked as the answer   
    Okay, I was able to fix this once I saw what was going on.
    Thank you @Andy90 for reporting it, and thank you @Dreikblack for making it easy to debug.
    An update will be available later today.
  19. Josh's post in Ultra Engine doesnt load texture for gltf models (Deleting texture "Models/xxx") inside console was marked as the answer   
    Maybe your program does not load the FreeImage plugin for loading PNG and JPEG textures?
  20. Josh's post in Runtime Error was marked as the answer   
    I copied the Materials and Models folders from a Leadwerks project into an Ultra project, browsed around using Ultra 0.9.3, and had no problems.
    I downloaded this package: https://steamcommunity.com/sharedfiles/filedetails/?id=1147729191&searchtext=mod+builder
    Ultra 0.9.3 was able to browse through it and generate thumbnails with no issues.
  21. Josh's post in How to get a SteamID? was marked as the answer   
    Actually, there is some more advanced functionality available. You can see an event is emitted with ID EVENT_LOBBYUSERDISCONNECT and the event source is a LobbyEventInfo object. You have to cast like this:
    auto info = event.source->As<LobbyEventInfo>()
    And that has the lobby and user IDs.
    void CallbackManager::OnLobbyChatUpdate(LobbyChatUpdate_t* pCallback) { auto info = std::make_shared<LobbyEventInfo>(); info->lobbyid = pCallback->m_ulSteamIDLobby; info->userid = pCallback->m_ulSteamIDUserChanged; if ((k_EChatMemberStateChangeEntered & pCallback->m_rgfChatMemberStateChange) != 0) { __queuedevents.push_back(Event(EVENT_LOBBYUSERJOIN, info)); SteamNetworking()->AcceptP2PSessionWithUser(pCallback->m_ulSteamIDUserChanged); } if ((k_EChatMemberStateChangeLeft & pCallback->m_rgfChatMemberStateChange) != 0) __queuedevents.push_back(Event(EVENT_LOBBYUSERLEAVE, info)); if ((k_EChatMemberStateChangeDisconnected & pCallback->m_rgfChatMemberStateChange) != 0) __queuedevents.push_back(Event(EVENT_LOBBYUSERDISCONNECT, info)); }  
  22. Josh's post in Widgets flashes purple while fasting changing icon or pixmap was marked as the answer   
    Okay, I was able to identify the cause...sort of. I was getting very aggressive with optimization. Some say too aggressive, but I say not enough.

    I'll wait until tomorrow morning to update.
  23. Josh's post in Components Inner Workings was marked as the answer   
    It doesn't. All the components I wrote come in a C++ or a Lua version.
  24. Josh's post in How to change level? was marked as the answer   
    If you just call LoadMap and assign the returned value to the variable you used the first time, all the old objects will be automatically deleted.
  25. Josh's post in Docs - Thread::GetResult() - Resume() not found was marked as the answer   
    Fixed, thank you. Page will re-cache in a few hours.
×
×
  • Create New...