Jump to content

Josh

Staff
  • Posts

    23,145
  • Joined

  • Last visited

Everything posted by Josh

  1. Josh

    Editing...

    Starting on the actual editing part of the editor. Lots of issues, but they will all get solved....
  2. Quake MDL and BSP files are now supported as well.
  3. 1.0.2 Added support in Quake Loader plugin to load BSP files as models. Texture coordinates are a little off, but everything else works correctly. Textures get read out of the BSP and applied to the loaded model.
  4. 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; }
  5. 1.0.2 Took another pass at my "smart tessellation" idea and this time it works great. See this thread for sample models. The tessellation settings currently cannot be saved in a glTF file, but you can try the feature out. Fixed error in OBJ loader
  6. These models are made by @Vida Marcell and were useful in testing my tessellation algorithm. To see the effect, open the model in the project explorer, then select the Tools > Smart Tessellation menu item. The editor will automatically enable tessellation on all materials when you do this, and it calculates various properties that control tessellation behavior. tessmodels.zip Simple clean geometry works best. Correct normals are very important. Sometimes you can fix errors by selecting the Tools > Update Normals menu item first. Models can use either quads or triangles. Quads are better but both will work. GLTF does not support quads natively, so Quads can only be imported from OBJ files...unless you import an OBJ and save as GLTF, then it will use a custom extension to store the quads in glTF. As you can see, tessellation curves with hard edges can be automatically detected and work really nicely, if the geometry is clean. This is a pretty big change in the art pipeline because you only need to model the lowest-resolution version of your model, and tessellation can take care of the rest for you.
  7. Josh

    Smart Tessellation

    Finished algorithm creates only the needed polygons to create the shape. If you look closely at the outer edges, there's a bunch of little triangles making the shape rounded. Model by @Vida Marcell
  8. Josh

    Smart Tessellation

    @Vida Marcell's pipes come to life...
  9. Josh

    Smart Tessellation

    Again, thanks to @Vida Marcell for his modeling help.
  10. Josh

    Smart Tessellation

    Thanks to @Vida Marcell for his modeling help
  11. Josh

    Model upscaling

    Thanks to @Vida Marcell for making the model to test.
  12. I thought of an algorithm to automatically fix tessellation cracks, and it works. Thanks to @Vida Marcell for his help with the model.
  13. 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.
  14. And this is how I get the install directory for the game: GameManagers.zip
  15. Here is the code for the preview app, which can be used to generate images of those models very easily: preview.zip
  16. May I ask, why are you interested in Quake models? I am curious.
  17. 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.
  18. @Dreikblack Were you interested in creating a new plugin?
  19. 1.0.2 Finished model import protocol, updated Quake loader plugin with MDL support. Basis, FreeImage, and KTX2 plugins updated, as the texture import protocol changed slightly. You must sync your project to get the new builds of the plugins.
×
×
  • Create New...