Jump to content

Josh

Staff
  • Posts

    23,094
  • Joined

  • Last visited

Everything posted by Josh

  1. Every SketchFab model is available in glTF format. glTF is the only file format I know of that supports a PBR material system. FBX does not. The channel splitting and compression stuff PBR materials require is pretty complex: https://www.ultraengine.com/learn/pbrmaterials For trees it might not matter, but if you get into metal surfaces I think you might start to appreciate the glTF export process more.
  2. It sounds like you are moving a lot of work from the Ultra editor into Blender, and you are setting up a very specific scene in Blender so it works with your export process. This is fine if it works for you. Note that Blender's DDS file format support is 15 years outdated and they seem uninterested in fixing it, so it does not support artifact-free texture compression (BC7 and BC5 for normal maps). DXT-compressed texture data looks blocky and often develops a greenish tint that look especially pronounced in dark areas: Interestingly, I came across a neural network designed specifically to remove these artifacts: https://github.com/n00mkrad/cupscale/releases/ https://developer.valvesoftware.com/wiki/Restoring_Texture_After_DXT_Compression https://drive.google.com/file/d/1WXBNdlqDWV10a3L1_U7zuNkSpN9aBF0M/view?usp=sharing My point is, if you want artifact-free compressed textures, PNG textures in Blender aren't going away, and you need some post-export step to convert them to BC7 and BC5 DDS files. This tool is the easiest way to do that for glTF files: For your purposes, it sounds like it's not the file format that matters so much, but the export process you have set up. If so, you could probably export glTF files just as easily using the same process, but if your current approach is working then by all means use it. In my view, there is no need for any "source file" anymore because glTF is the source file, as well as the final game-ready file. Fortunately, the export capabilities of the engine are quite good, so even if data does get sent into a proprietary format, it can still be saved as a glTF or OBJ without much trouble...
  3. The reason it is tied to the terrain is because each instance's position is determined programmatically, and not stored in memory. The x and z position are calculated by the instance number, and the y position is based on the terrain heightmap elevation. There is no position for each instance stored in memory, which is why each instances consumes only one bit. Without the terrain, how would the algorithm figure out the position of each instance?
  4. You probably need to restart Visual Studio after editing the env var. If you launch VS from the Ultra Editor, you would need to restart the editor, since I think child processes inherit the env vars the parents have, which are loaded at process start and do not update when the user changes them.
  5. Wouldn't that be a post-processing effect? You can not write to and read from the same color texture at the same time.
  6. I am guessing this is probably a circular reference in one of my components but will need to test more to find out...
  7. The effect in the editor is part of the Windows compositor. To have this effect in your game you would need to blur the screen, then use that texture in the background of the layer on top. I'm not sure what the best way to do this would be.
  8. It appears the cursor constants are not exposed to Lua. I will add that now. In the meantime you can do this: window:SetCursor(0)
  9. Something like this might help: const int guardbandSize = 8; FILE* fs = fopen("action.ani", "rb"); fseek(fs, 0,SEEK_END); int dwSize = ftell(fs); fseek(fs, 0,SEEK_SET); char* memory = new char[dwSize + guardbandSize]; fread(memory, 1, dwSize, fs); memset(memory + dwSize, 0, guardbandSize); fclose(fs); cursor = (HCURSOR)CreateIconFromResource((PBYTE)memory,dwSize,FALSE,0x00030000); delete memory;
  10. Please let us know if it happens again!
  11. I posted a similar video years ago when I was first implementing the vegetation system in Leadwerks:
  12. Version 0.9.5 uses OpenGL 4.6. It is available on the beta branch. If you switch to using it, you must update your project to get the new shaders.
  13. No need to: #include "UltraEngine.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, 720, displays[0], WINDOW_CENTER | WINDOW_TITLEBAR); //Create a world auto world = CreateWorld(); //Create a framebuffer auto framebuffer = CreateFramebuffer(window); //Create light auto light = CreateBoxLight(world); light->SetRange(-10, 10); light->SetRotation(15, 15, 0); light->SetColor(2); //Create camera auto camera = CreateCamera(world); camera->SetClearColor(0.125); camera->SetPosition(0, 0, -3); camera->SetFov(70); //Create scenery auto box = CreateBox(world); auto cone = CreateCone(world); cone->SetPosition(1.25, 0, 0); cone->SetColor(0, 0, 1); auto sphere = CreateSphere(world); sphere->SetPosition(-1.25, 0, 0); sphere->SetColor(1, 0, 0); //Create camera and texture buffer auto texbuffer = CreateTextureBuffer(256, 256, 1, true, 0); auto cam2 = CreateCamera(world); cam2->SetClearColor(1, 1, 1); cam2->SetRenderTarget(texbuffer); cam2->SetMSAA(2); //Create material auto mtl = CreateMaterial(); auto tex = texbuffer->GetColorAttachment(); mtl->SetTexture(tex); box->SetMaterial(mtl); cone->SetMaterial(mtl); sphere->SetMaterial(mtl); //Main loop while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false) { //Orient the texturebuffer camera cam2->SetPosition(0, 0, 0); cam2->Turn(0, 1, 0); cam2->Move(0, 0, -3); world->Update(); world->Render(framebuffer); } return 0; }
  14. Okay, here it is. I will let you guys experiment with this and see what you think: modelimport.zip
  15. I am guessing there is somehow two active components being updated, which causes the mouse to be moved back to the center twice each frame...
  16. Copy the /Shaders folder from a new project into the project you are trying to import.
  17. For this reason, I was considering making 3D viewports render twice in the editor each time, if SSR is enabled.
  18. 0.9.5 Today's bug fixes included. Added Texture::GetIndex(). (Returns the OpenGL texture name / id, only use this in a rendering hook). Added Texture::GetHandle() (Returns the OpenGL bindless sampler handle).
×
×
  • Create New...