Jump to content

Josh

Staff
  • Posts

    23,139
  • Joined

  • Last visited

Everything posted by Josh

  1. 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; }
  2. 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
  3. 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.
  4. 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
  5. Josh

    Smart Tessellation

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

    Smart Tessellation

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

    Smart Tessellation

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

    Model upscaling

    Thanks to @Vida Marcell for making the model to test.
  9. I thought of an algorithm to automatically fix tessellation cracks, and it works. Thanks to @Vida Marcell for his help with the model.
  10. 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.
  11. And this is how I get the install directory for the game: GameManagers.zip
  12. Here is the code for the preview app, which can be used to generate images of those models very easily: preview.zip
  13. May I ask, why are you interested in Quake models? I am curious.
  14. 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.
  15. @Dreikblack Were you interested in creating a new plugin?
  16. 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.
  17. Now that the thumbnails system is done, my next task is to finalize the model plugin system.
  18. I think this is something I just never programmed in the behavior for...
  19. 1.0.2 Fixed some problems with reading / writing in process streams, so inter-process communication works correctly now. Thumbnail server is now a separate executable (preview.exe). I ended up using Print / Input for the IO, which seems to work well and is cross-platform. Thumbnails for all file types are now working, faster now because it doesn't relaunch a process each time, works with 3D file types too.
  20. A directional light can consist of several shadow maps. Each shadow render is counted separtely.
  21. 1.0.2 You can now hide file extensions from the asset browser. Add extensions you want to hide in the settings.json file: "hideFileExtensions": { "bin": true, "meta": true }, You can also just copy this script code and paste it into the console, and hit return to run it: program.settings.hideFileExtensions = {} program.settings.hideFileExtensions.bin = true program.settings.hideFileExtensions.meta = true Just copy the whole thing and paste it into the console, and it will really work! I will later have a scheme to reset settings to default, where these extensions will be added by default.
  22. Josh

    AABB

    Yes, see Entity::GetAABB and then the AABB center will give you the X/Z center.
×
×
  • Create New...