Jump to content

Josh

Staff
  • Posts

    23,315
  • Joined

  • Last visited

Everything posted by Josh

  1. BTW, the asset editor will not load Lods when a model is loaded, since each LOD is contained in a separate file.
  2. I hacked it a bit to produce a valid file: { "accessors": [ { "bufferView": 0, "componentType": 5126, "count": 9231, "max": [ 3.081611156463623, 25.591766357421875, 3.6851890087127686 ], "min": [ -4.146778583526611, -1.0971499681472778, -3.647721290588379 ], "type": "VEC3" }, { "bufferView": 1, "componentType": 5121, "count": 9231, "type": "VEC3" }, { "bufferView": 2, "componentType": 5126, "count": 9231, "type": "VEC3" }, { "bufferView": 3, "componentType": 5121, "count": 9231, "type": "VEC3" }, { "bufferView": 4, "componentType": 5126, "count": 9231, "type": "VEC2" }, { "bufferView": 5, "componentType": 5121, "count": 9231, "type": "VEC3" }, { "bufferView": 6, "componentType": 5123, "count": 9759, "type": "SCALAR" }, { "bufferView": 7, "componentType": 5126, "count": 1472, "max": [ 0.35914069414138794, 25.17479705810547, 1.9243559837341309 ], "min": [ -1.3300083875656128, -0.49771878123283386, -1.2738277912139893 ], "type": "VEC3" }, { "bufferView": 8, "componentType": 5121, "count": 1472, "type": "VEC3" }, { "bufferView": 9, "componentType": 5126, "count": 1472, "type": "VEC3" }, { "bufferView": 10, "componentType": 5121, "count": 1472, "type": "VEC3" }, { "bufferView": 11, "componentType": 5126, "count": 1472, "type": "VEC2" }, { "bufferView": 12, "componentType": 5121, "count": 1472, "type": "VEC3" }, { "bufferView": 13, "componentType": 5123, "count": 2028, "type": "SCALAR" } ], "asset": { "generator": "Ultra Engine glTF Exporter", "version": "2.0" }, "bufferViews": [ { "buffer": 0, "byteLength": 110772, "byteOffset": 0 }, { "buffer": 0, "byteLength": 9231, "byteOffset": 110772 }, { "buffer": 0, "byteLength": 110772, "byteOffset": 138466 }, { "buffer": 0, "byteLength": 9231, "byteOffset": 249240 }, { "buffer": 0, "byteLength": 73848, "byteOffset": 276934 }, { "buffer": 0, "byteLength": 9231, "byteOffset": 350784 }, { "buffer": 0, "byteLength": 19518, "byteOffset": 378478 }, { "buffer": 0, "byteLength": 17664, "byteOffset": 397996 }, { "buffer": 0, "byteLength": 1472, "byteOffset": 415660 }, { "buffer": 0, "byteLength": 17664, "byteOffset": 420076 }, { "buffer": 0, "byteLength": 1472, "byteOffset": 437740 }, { "buffer": 0, "byteLength": 11776, "byteOffset": 442156 }, { "buffer": 0, "byteLength": 1472, "byteOffset": 453932 }, { "buffer": 0, "byteLength": 4056, "byteOffset": 458348 } ], "buffers": [ { "byteLength": 462404, "uri": "PineLarge_001.bin" } ], "extensionsUsed": [ "ULTRA_mesh_displacement", "MSFT_texture_dds", "ULTRA_extended_material" ], "images": [ { "uri": "PineLeaves_DIFF.png" }, { "uri": "PineLeaves_DIFF.dds" }, { "uri": "PineLeaves_NORM.png" }, { "uri": "PineLeaves_NORM.dds" }, { "uri": "PineTrunk_DIFF.png" }, { "uri": "PineTrunk_DIFF.dds" }, { "uri": "PineTrunk_NORM.png" }, { "uri": "PineTrunk_NORM.dds" } ], "materials": [ { "emissiveFactor": [ 0.007843137718737125, 0.007843137718737125, 0.007843137718737125 ], "extensions": { "ULTRA_extended_material": { "shaderFamily": "PBR", "shadow": true, "tessellation": false } }, "normalTexture": { "index": 1 }, "pbrMetallicRoughness": { "baseColorTexture": { "index": 0 }, "metallicFactor": 0.0, "roughnessFactor": 1.0 } }, { "extensions": { "ULTRA_extended_material": { "shaderFamily": "PBR", "shadow": true, "tessellation": false } }, "normalTexture": { "index": 3 }, "pbrMetallicRoughness": { "baseColorTexture": { "index": 2 }, "metallicFactor": 0.0, "roughnessFactor": 1.0 } } ], "meshes": [ { "primitives": [ { "attributes": { "NORMAL": 2, "POSITION": 0, "TEXCOORD_0": 4 }, "extensions": { "ULTRA_mesh_displacement": { "DISPLACEMENT": 5 } }, "indices": 6, "material": 0, "mode": 4 }, { "attributes": { "NORMAL": 9, "POSITION": 7, "TEXCOORD_0": 11 }, "extensions": { "ULTRA_mesh_displacement": { "DISPLACEMENT": 12 } }, "indices": 13, "material": 1, "mode": 4 } ] } ], "nodes": [ { "mesh": 0, "name": "PineLarge_001" } ], "scene": 0, "scenes": [ { "nodes": [ 0 ] } ], "textures": [ { "source": 0 }, { "source": 2 }, { "source": 4 }, { "source": 6 } ] }
  3. The file "PineLarge_001.gltf" is invalid. There are texture sources listed that exceed the size of the images array.
  4. This was happening because I changed the terrain data format to use half-floats, so there is no clamped range, and you can lower the ground as well as raise it. Fix is incoming...
  5. I uploaded it to the wrong folder. Try again please.
  6. Okay, I think it will work now. Update is available. #include "UltraEngine.h" using namespace UltraEngine; int main(int argc, const char* argv[]) { //Get the displays auto displays = GetDisplays(); //Create window auto window = CreateWindow("Ultra Engine", 0, 0, 1280, 720, displays[0]); //Create framebuffer auto framebuffer = CreateFramebuffer(window); //Create world auto world = CreateWorld(); //Load a font auto font = LoadFont("Fonts/arial.ttf"); //Create user interface auto ui = CreateInterface(world, font, framebuffer->size); //Create widget iVec2 sz = ui->root->ClientSize(); auto button = CreateButton("Button", sz.x / 2 - 75, sz.y / 2 - 15, 150, 30, ui->root); auto plg = LoadPlugin("Plugins/FITextureLoader"); auto quakeLoaderPlugin = LoadPlugin("Plugins/QuakeLoader"); //Load model WString path = "D:/SteamLibrary/steamapps/common/Quake/id1"; auto pak = LoadPackage(path + "/PAK0.PAK"); auto pixmap = LoadPixmap(path + "/gfx/bigbox.lmp"); Assert(pixmap); ui->root->SetPixmap(pixmap); //Create camera auto camera = CreateCamera(world, PROJECTION_ORTHOGRAPHIC); camera->SetPosition(framebuffer->size.x / 2, framebuffer->size.y / 2, 0); while (true) { while (PeekEvent()) { const Event ev = WaitEvent(); switch (ev.id) { case EVENT_WINDOWCLOSE: if (ev.source == window) { return 0; } break; default: ui->ProcessEvent(ev); break; } } world->Update(); world->Render(framebuffer); } return 0; }
  7. LMP isn't really a defined file format. This particular file reports that the width and height are both -1... https://six-of-one.github.io/quake-specifications/qkspec_3.htm#PLMP What is bigbox.lmp? Is it the background image?
  8. You know the asset editor can save materials, right?
  9. Looks like it's not currently loaded from files, but I will add it.
  10. It’s bc1/dxt1: https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkFormat.html
  11. 1.0.3 Material color / intensity now works correctly in asset editor. Material shader family controls updated in asset editor, to treat shader family as a file that can be selected from any directory. Material emission property fixed.
  12. The design of this feature has been changed.
  13. You probably want Material::SetAlphaMask. Also, you probably want your transparent pixels to be greenish instead of black so the edges don't appear dark.
  14. Uploaded and tested, it works now.
  15. Fixed, I think. You need to update your project to get the new shader files.
  16. The second UV set was not being copied into the mesh data.
  17. Sorry, I think the upload got cut off. I uploaded it again, should work now.
  18. Your problem might just be that the background is too light. I worked with this a lot in developing the contrast levels for the default UI color scheme. There's not a lot of range before text gets hard to read against the background.
  19. I'm putting it into the EngineSettings structure.
  20. It looks like branches and leaves are two separate children: int l = 0; for (int n = 0; n < model->kids.size(); ++n) { for (auto lod : model->kids[n]->As<Model>()->lods) { auto m = 0; for (auto mesh : lod->meshes) { Notify("lod : " + String(l) + ", mesh : " + String(m), ""); m++; } l++; } }
  21. I think some of your faces are flipped inwards and if you make them all point outwards you won't get the overlapping faces that cause some areas to be darker.
×
×
  • Create New...