-
Posts
23,145 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Everything posted by Josh
-
-
Package plugins and Quake files now supported
Josh commented on Josh's blog entry in Development Blog
Quake MDL and BSP files are now supported as well. -
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.
-
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.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
-
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.
-
-
-
-
-
-
-
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.
-
And this is how I get the install directory for the game: GameManagers.zip
-
Here is the code for the preview app, which can be used to generate images of those models very easily: preview.zip
-
May I ask, why are you interested in Quake models? I am curious.
-
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.
-
@Dreikblack Were you interested in creating a new plugin?
-
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.
-
-