Dreikblack Posted April 22, 2023 Share Posted April 22, 2023 Ultra Editor missing Quake Model Loader plugin and idk how to properly build it from: https://github.com/UltraEngine/PluginSDK/tree/master/Plugins/Quake Model Loader I tried to open Quake Model Loader project and build solution but can't due errors: I can fix few incudes but still missing GMFSDK at least. Quote Link to comment Share on other sites More sharing options...
Solution Josh Posted April 22, 2023 Solution Share Posted April 22, 2023 The plugins system presently supports images and packages. The interface for model plugins needs a little more love, and in fact I plan to add Quake model loading into the Quake plugin as the first implementation. 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Josh Posted April 28, 2023 Share Posted April 28, 2023 Now that the thumbnails system is done, my next task is to finalize the model plugin system. 3 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Josh Posted April 28, 2023 Share Posted April 28, 2023 Almost there... 3 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Josh Posted April 28, 2023 Share Posted April 28, 2023 Will have an update tomorrow. 3 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Josh Posted April 29, 2023 Share Posted April 29, 2023 @Dreikblack Were you interested in creating a new plugin? Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Dreikblack Posted April 29, 2023 Author Share Posted April 29, 2023 I was interested in just Quake model plagin for now. I have a problem with it btw. I updated client and project but have no thumbnails and there is error when i'm trying to open model in editor: Quote Link to comment Share on other sites More sharing options...
Josh Posted April 29, 2023 Share Posted April 29, 2023 Since your Quake folder does not contain the required shaders folder, it can't render the models. In my examples I copied the pak files into an Ultra Engine project folder. I am working on a solution to this issue, but I want to approach it carefully and choose the right design. 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Dreikblack Posted April 29, 2023 Author Share Posted April 29, 2023 8 minutes ago, Josh said: In my examples I copied the pak files into an Ultra Engine project folder. Thanks! I did it and now it works for me. Quote Link to comment Share on other sites More sharing options...
Josh Posted April 29, 2023 Share Posted April 29, 2023 May I ask, why are you interested in Quake models? I am curious. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Dreikblack Posted April 29, 2023 Author Share Posted April 29, 2023 Want to make little fan game to have code foundation (GUI, gameplay base, etc.) for next games and ready Quake assets for Quake theme game will save my time a lot at this stage. Quote Link to comment Share on other sites More sharing options...
Josh Posted April 29, 2023 Share Posted April 29, 2023 Here is the code for the preview app, which can be used to generate images of those models very easily: preview.zip 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Josh Posted April 29, 2023 Share Posted April 29, 2023 And this is how I get the install directory for the game: GameManagers.zip 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Dreikblack Posted April 29, 2023 Author Share Posted April 29, 2023 7 minutes ago, Josh said: And this is how I get the install directory for the game: GameManagers.zip 8.84 kB · 1 download I guess this for using game models from legal game copy of player? Yea, it would much better than having their models in my game client since only Quake code is free to use but not content (even for uncomectial games i guess). I forgot about that tbh Thanks! 1 Quote Link to comment Share on other sites More sharing options...
Josh Posted April 29, 2023 Share Posted April 29, 2023 Yes, you can load the assets straight out of the game files, and it's no different from distributing a mod. In fact there are a few custom builds of the Quake engine that act like this. 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Dreikblack Posted April 29, 2023 Author Share Posted April 29, 2023 Quake model from pak is not visible in the engine. I can see model being loaded in debug (i.e. model var is not empty) but scene is empty. PAK0 is in app dir (because of shader issue, crash if pak in game folder atm). #include "UltraEngine.h" #include "Components/CameraControls.hpp" 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(); world->SetAmbientLight(0); //Create a framebuffer auto framebuffer = CreateFramebuffer(window); //Load FreeImage plugin auto plg = LoadPlugin("Plugins/FITextureLoader"); auto quakeLoaderPlugin = LoadPlugin("Plugins/QuakeLoader"); //Load model WString path = AppDir(); auto pak = LoadPackage(path + "/PAK0.PAK"); ChangeDir(path); auto model = LoadModel(world, "progs/quaddama.mdl"); model->Turn(0, 180, 0, true); //Environment maps auto specmap = LoadTexture("https://github.com/UltraEngine/Assets/raw/main/Materials/Environment/footprint_court/specular.dds"); auto diffmap = LoadTexture("https://github.com/UltraEngine/Assets/raw/main/Materials/Environment/footprint_court/diffuse.dds"); world->SetEnvironmentMap(diffmap, ENVIRONMENTMAP_BACKGROUND); world->SetEnvironmentMap(specmap, ENVIRONMENTMAP_SPECULAR); world->SetEnvironmentMap(diffmap, ENVIRONMENTMAP_DIFFUSE); //Create a camera auto camera = CreateCamera(world); camera->SetClearColor(0.125); camera->SetPosition(0, 1.4, -1); camera->SetFov(70); camera->AddPostEffect(LoadPostEffect("Shaders/PostEffects/FXAA.json")); //Add camera controls camera->AddComponent<CameraControls>(); //Create light auto light = CreateBoxLight(world); light->SetRange(-10, 10); light->SetArea(15, 15); light->SetRotation(45, 35, 0); light->SetColor(1.2); //Main loop while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false) { world->Update(); world->Render(framebuffer); } return 0; } Quote Link to comment Share on other sites More sharing options...
Josh Posted May 1, 2023 Share Posted May 1, 2023 The model's center position may be strange: #include "UltraEngine.h" #include "Components/CameraControls.hpp" 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(); world->SetAmbientLight(0); //Create a framebuffer auto framebuffer = CreateFramebuffer(window); //Load FreeImage plugin auto plg = LoadPlugin("Plugins/FITextureLoader"); auto quakeLoaderPlugin = LoadPlugin("Plugins/QuakeLoader"); //Load model WString path = AppDir(); auto pak = LoadPackage(path + "/PAK0.PAK"); ChangeDir(path); auto model = LoadModel(world, "progs/quaddama.mdl"); model->Turn(0, 180, 0, true); //Environment maps auto specmap = LoadTexture("https://github.com/UltraEngine/Assets/raw/main/Materials/Environment/footprint_court/specular.dds"); auto diffmap = LoadTexture("https://github.com/UltraEngine/Assets/raw/main/Materials/Environment/footprint_court/diffuse.dds"); //world->SetEnvironmentMap(diffmap, ENVIRONMENTMAP_BACKGROUND); world->SetEnvironmentMap(specmap, ENVIRONMENTMAP_SPECULAR); world->SetEnvironmentMap(diffmap, ENVIRONMENTMAP_DIFFUSE); //Create a camera auto camera = CreateCamera(world); camera->SetClearColor(0,0,1); camera->SetPosition(model->GetBounds().center); camera->Move(0, 0, -0.3); camera->SetRange(0.01, 100); camera->SetFov(70); camera->AddPostEffect(LoadPostEffect("Shaders/PostEffects/FXAA.json")); //Add camera controls //camera->AddComponent<CameraControls>(); //Create light auto light = CreateBoxLight(world); light->SetRange(-10, 10); light->SetArea(15, 15); light->SetRotation(45, 35, 0); light->SetColor(1.2); //Main loop while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false) { world->Update(); world->Render(framebuffer); } return 0; } 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Dreikblack Posted May 4, 2023 Author Share Posted May 4, 2023 After last update in-engine model load broke. Can be reproduced with a code above. Quote Link to comment Share on other sites More sharing options...
Josh Posted May 4, 2023 Share Posted May 4, 2023 Is your project up to date? It looks like it is using some old shader binaries. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Dreikblack Posted May 4, 2023 Author Share Posted May 4, 2023 Yes, i updated projects after last update. Actually have same error even without quake plugin with Samurai model example. Quote Link to comment Share on other sites More sharing options...
Dreikblack Posted May 4, 2023 Author Share Posted May 4, 2023 Compile Shaders.bat helped Quote Link to comment Share on other sites More sharing options...
Josh Posted May 4, 2023 Share Posted May 4, 2023 Okay, I updated the shader binaries and now this example work correctly in a new project: https://www.ultraengine.com/learn/LoadModel?lang=cpp Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Dreikblack Posted May 20, 2023 Author Share Posted May 20, 2023 Can be changed model center in the engine? I found the way to put quake models where i want by subtracting bounds center but i would need to repeat it every time when i turn model so maybe there is better way to deal with center offcet. Quote Link to comment Share on other sites More sharing options...
Josh Posted May 20, 2023 Share Posted May 20, 2023 This will do it: https://www.ultraengine.com/learn/Mesh_Translate?lang=cpp And then call Entity::UpdateBounds(). Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Dreikblack Posted May 20, 2023 Author Share Posted May 20, 2023 How to get mesh of a model to do this translate? Found FindMesh() but it's require material and idk how to get model material either. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.