Jump to content

SpiderPig

Members
  • Posts

    2,285
  • Joined

  • Last visited

Posts posted by SpiderPig

  1. I hate to say it, but I'm seeing it a lot slower overall.  Actually, it seems 2.5x slower. :unsure:

    These shots are in release.  In 0.9.5 I've had to remove the skydome due to some shader errors, and the terrain due to it not texturing.  The terrain was replaced with a single plane.  So 0.9.5 is doing less work but is a lot slower and the grass don't look as good.

    Also in 0.9.5 I've seen the FPS fluctuate between 120 and 60 FPS like a seesaw even when the camera is still.

    Scene in 0.9.4:

    _094_scene.thumb.png.0400052d41cad410d79e2b655239191e.png

    Same scene in 0.9.5:

    _095_Scene.thumb.png.13e3d1af0390ec54b15a6d514b8627c3.png

  2. 5 hours ago, klepto2 said:

    Just my thought. The debug-build was mainly slower because the vulkan validation-layer kicks in and slows everything down. In Leadwerks there was also no difference between debug and release (for simple apps). 

    That makes sense.  :)

  3. Maybe a bug - maybe.  In this example I see no change in the FPS between debug and release builds.  I get a consistent 500 FPS (+/- 10 FPS).  I'm seeing this across a few of my smaller projects.  I mean, is debug build just that good now or is release slower than it should be?  I would've thought there should be at least a small difference being the debugger isn't running in Release - but I've been wrong before.

    #include "UltraEngine.h"
    #include "ComponentSystem.h"
    
    using namespace UltraEngine;
    
    int main(int argc, const char* argv[])
    {
        //Get the display list
        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);
        world->RecordStats();
    
        //Create a framebuffer
        auto framebuffer = CreateFramebuffer(window);
    
        //Create a camera
        auto camera = CreateCamera(world);
        camera->SetFov(70);
        camera->SetPosition(0, 50, 0);
        camera->SetRotation(45, 0, 0);
        camera->SetClearColor(0.125);
    
        //Sunlight
        auto light = CreateDirectionalLight(world);
        light->SetRotation(45, 35, 0);
        light->SetColor(2);
    
        //Create terrain
        auto terrain = CreateTerrain(world, 512, 512, 2048);
        terrain->LoadHeightmap("https://raw.githubusercontent.com/UltraEngine/Documentation/master/Assets/Terrain/512.r16");
        terrain->SetScale(1, 100, 1);
    
        //Create base material
        auto ground = CreateMaterial();
        auto diffusemap = LoadTexture("https://raw.githubusercontent.com/UltraEngine/Documentation/master/Assets/Materials/Ground/river_small_rocks_diff_2k.dds");
        auto normalmap = LoadTexture("https://raw.githubusercontent.com/UltraEngine/Documentation/master/Assets/Materials/Ground/river_small_rocks_nor_gl_2k.dds");
        ground->SetTexture(diffusemap, TEXTURE_BASE);
        ground->SetTexture(normalmap, TEXTURE_NORMAL);
        terrain->SetMaterial(ground);
    
        //Create paint material
        auto rocks = CreateMaterial();
        diffusemap = LoadTexture("https://raw.githubusercontent.com/UltraEngine/Documentation/master/Assets/Materials/Ground/Rocks_Dirt_Ground_2k.dds");
        normalmap = LoadTexture("https://raw.githubusercontent.com/UltraEngine/Documentation/master/Assets/Materials/Ground/Rocks_Dirt_Ground_2k_dot3.dds");
        auto dispmap = LoadTexture("https://raw.githubusercontent.com/UltraEngine/Documentation/master/Assets/Materials/Ground/Rocks_Dirt_Ground_2k_disp.dds");
        rocks->SetTexture(diffusemap, TEXTURE_BASE);
        rocks->SetTexture(normalmap, TEXTURE_NORMAL);
        rocks->SetTexture(dispmap, TEXTURE_DISPLACEMENT);
    
        int rocklayer = terrain->AddLayer(rocks);
    
        //Apply material based on terrain slope
        for (int x = 0; x < terrain->resolution.x; ++x)
        {
            for (int y = 0; y < terrain->resolution.y; ++y)
            {
                float slope = terrain->GetSlope(x, y);
                if (slope > 15.0f)
                {
                    float wt = Min((slope - 15.0f) / 10.0f, 1.0f);
                    terrain->SetLayerWeight(rocklayer, x, y, wt);
                }
            }
        }
    
        //Camera controls
        //camera->AddComponent<CameraControls>();
    
        //Main loop
        while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false)
        {
            auto stats = world->renderstats;
            window->SetText("FPS : " + WString(stats.framerate));
    
            world->Update();
            world->Render(framebuffer, false);
        }
        return 0;
    }

     

  4. I'm not fully convinced this issue is solved yet.  :)

    14 hours ago, SpiderPig said:

    Thanks.  I'm now seeing that "Unknown chunk in model file" is spamming the output window for about 20 seconds before it finally fails to load.

    Should it really take 20 seconds before finally failing to load?

    5 hours ago, Josh said:

    No, it just loads data from a stream which may not have any file path associated with it at all.

    How then are we to create plugins for new models types, custom or not, if the stream is not looking at the file extension?  At what point does LoadModel look to see if a plugin might have the function it needs to load that extension?

    If you could please also try this file as it throws an out of bounds error and crashes the program.

    Test.zip

  5. 6 hours ago, Josh said:

    This file mimics the beginning of a Leadwerks MDL file. I added some more checks that prevent the loader from trying to load this as such.

    Shouldn't it load the file based on the extension type rather than trying to load data from the file first?

  6. A different error but it might help pinpoint this problem... just simply creating the terrain crashes to "encodeData" or something like that.

    #include "UltraEngine.h"
    #include "ComponentSystem.h"
    
    using namespace UltraEngine;
    
    int main(int argc, const char* argv[])
    {
        //Get the display list
        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);
    
        //Create a camera
        auto camera = CreateCamera(world);
        camera->SetFov(70);
        camera->SetPosition(0, 50, 0);
        camera->SetRotation(45, 0, 0);
        camera->SetClearColor(0.125);
    
        //Sunlight
        auto light = CreateDirectionalLight(world);
        light->SetRotation(45, 35, 0);
        light->SetColor(2);
    
        //Create terrain
        auto terrain = CreateTerrain(world, 512, 512, 2048);
        //terrain->LoadHeightmap("https://raw.githubusercontent.com/UltraEngine/Documentation/master/Assets/Terrain/512.r16");
        //terrain->SetScale(1, 100, 1);
    
        //Create base material
        /*auto ground = CreateMaterial();
        auto diffusemap = LoadTexture("https://raw.githubusercontent.com/UltraEngine/Documentation/master/Assets/Materials/Ground/river_small_rocks_diff_2k.dds");
        auto normalmap = LoadTexture("https://raw.githubusercontent.com/UltraEngine/Documentation/master/Assets/Materials/Ground/river_small_rocks_nor_gl_2k.dds");
        ground->SetTexture(diffusemap, TEXTURE_BASE);
        ground->SetTexture(normalmap, TEXTURE_NORMAL);
        terrain->SetMaterial(ground);
    
        //Create paint material
        auto rocks = CreateMaterial();
        diffusemap = LoadTexture("https://raw.githubusercontent.com/UltraEngine/Documentation/master/Assets/Materials/Ground/Rocks_Dirt_Ground_2k.dds");
        normalmap = LoadTexture("https://raw.githubusercontent.com/UltraEngine/Documentation/master/Assets/Materials/Ground/Rocks_Dirt_Ground_2k_dot3.dds");
        auto dispmap = LoadTexture("https://raw.githubusercontent.com/UltraEngine/Documentation/master/Assets/Materials/Ground/Rocks_Dirt_Ground_2k_disp.dds");
        rocks->SetTexture(diffusemap, TEXTURE_BASE);
        rocks->SetTexture(normalmap, TEXTURE_NORMAL);
        rocks->SetTexture(dispmap, TEXTURE_DISPLACEMENT);
    
        int rocklayer = terrain->AddLayer(rocks);
    
        //Apply material based on terrain slope
        for (int x = 0; x < terrain->resolution.x; ++x)
        {
            for (int y = 0; y < terrain->resolution.y; ++y)
            {
                float slope = terrain->GetSlope(x, y);
                if (slope > 15.0f)
                {
                    float wt = Min((slope - 15.0f) / 10.0f, 1.0f);
                    terrain->SetLayerWeight(rocklayer, x, y, wt);
                }
            }
        }*/
    
        //Camera controls
        camera->AddComponent<CameraControls>();
    
        //Main loop
        while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false)
        {
            world->Update();
            world->Render(framebuffer);
        }
        return 0;
    }

     

×
×
  • Create New...