Jump to content

Ultra Engine testing


Josh
 Share

Recommended Posts

That example really lags on my GTX 1050 with 4GB of VRAM. I also find the AO fading in and out very strange and distracting. Hopefully it just you didn't get that far.

Also noticed you have doubled the default voxel resolution. Setting this back to 64 helps but makes the AO fading more obvious.  Perhaps I should be running this on a stronger card, but this PC is just more convenient. 

Cyclone - Ultra Game System - Component PreprocessorTex2TGA - Darkness Awaits Template (Leadwerks)

If you like my work, consider supporting me on Patreon!

Link to comment
Share on other sites

The 98% number is very good. That framerate is probably what you can expect on that card, but it's a lot better than what you would get with RTX on the same GPU. On a 1660, which has about twice as many cores, I'm getting 85 FPS.

The effect has a limited area around the camera, but the idea is to later add additional stages, so what you see now is the first stage, and then another volume around the camera is used for further away objects.

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

Yeah, that's what I expect. 

One idea for that can happen older GPUs we can do a generic cubemap builder and set it to the world's skybox. This way the reflections are as good as the ones in Leadwerks, but without complicating your current reflection system. I did this with Leadwerks years ago, and hopefully now we can do this without talking to the graphics api. 

The question is if you want to have this as an engine feature or have this done by somebody like me. I really think something like a world->BakeGlobalCubemap() function would be nice.

Cyclone - Ultra Game System - Component PreprocessorTex2TGA - Darkness Awaits Template (Leadwerks)

If you like my work, consider supporting me on Patreon!

Link to comment
Share on other sites

With cube map reflections, I don't know if it is possible to come up with a general-purpose routine because the results will vary wildly depending on the camera near range and the geometry of the scene. For example, if you are inside a house looking out a window, all the objects outdoors would be reflecting the interior of the house...or all the objects inside the house would be reflecting the sky they can't see.

Leadwerks was effective at solving this problem, at the cost of requiring precise placement of volumes. (I think Doom 2016 also did something very similar.)

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

2 minutes ago, Josh said:

Leadwerks was effective at solving this problem, at the cost of requiring precise placement of volumes. (I think Doom 2016 also did something very similar.)

I don't see the addition of reflection volumes a bad thing really. If it can work with the current system, I wouldn't mind the finer control for things like that. 100% automation can only get you so far imo.

I'm not sure if you'd want to consider also doing a onetime GI raytrace within those volumes like Leadwerks, but I'm mostly concerned about the reflections at the moment.

Cyclone - Ultra Game System - Component PreprocessorTex2TGA - Darkness Awaits Template (Leadwerks)

If you like my work, consider supporting me on Patreon!

Link to comment
Share on other sites

Small issue with a text field, the text changes colour when pressing the 2nd letter.

WidgetIssue.png.7fe38031033ccde24f7cb38c45db788e.png

#include "UltraEngine.h"
#include "ComponentSystem.h"


int main(int argc, const char* argv[])
{
    //Get the displays
    auto displays = GetDisplays();

    //Create a window
    auto window = CreateWindow("Ultra Engine", 0, 0, 1280 * displays[0]->scale, 720 * displays[0]->scale, displays[0], WINDOW_CENTER | WINDOW_TITLEBAR);

    //Create a world
    auto world = CreateWorld();

    //Create a framebuffer
    auto framebuffer = CreateFramebuffer(window);

    //Create a camera
    auto camera = CreateCamera(world);
    camera->SetClearColor(0.125);
    camera->SetFOV(70);
    camera->SetPosition(0, 0, -3);

    auto uicam = CreateCamera(world, PROJECTION_ORTHOGRAPHIC);
    uicam->SetClearMode(CLEAR_DEPTH);
    uicam->SetRenderLayers(RENDERLAYER_1);
    uicam->SetPosition(framebuffer->size.x / 2, framebuffer->size.y / 2);
    auto ui = CreateInterface(world, LoadFont("Fonts/arial.ttf"), framebuffer->size);
    ui->SetRenderLayers(RENDERLAYER_1);
    ui->background->SetColor(0, 0, 0, 0);

    auto text_Box = CreateTextField(0, 0, 200, 50, ui->root);

    //Create a light
    auto light = CreateLight(world, LIGHT_DIRECTIONAL);
    light->SetRotation(35, 45, 0);

    //Create a box
    auto box = CreateBox(world);

    //Entity component system
    auto actor = CreateActor(box);
    auto component = actor->AddComponent<Mover>();
    component->rotation.y = 45;

    //Main loop
    while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false)
    {
        while (PeekEvent())
        {
            ui->ProcessEvent(WaitEvent());
        }

        world->Update();
        world->Render(framebuffer);
    }
    return 0;
}

 

Link to comment
Share on other sites

It seems like 0.25 is the biggest size you should use for voxels. It looks quite good at that resolution.

We can also conclude this is not for low-end cards. I am curious to see how this would perform on something like a 1080. This is a little awkward, because in every other area the engine provides such fast performance. All my performance gains in other areas were made by shifting more work to the GPU and preventing the CPU from forming a bottleneck, but this feature is 100% GPU-limited. I will need to think about this.

Untitled.thumb.jpg.a97e2a4e50273f5491241abf10dbde93.jpg

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

1 hour ago, SpiderPig said:

Small issue with a text field, the text changes colour when pressing the 2nd letter.

I was also seeing this with the Text areas too. 

 

58 minutes ago, Josh said:

We can also conclude this is not for low-end cards. I am curious to see how this would perform on something like a 1080. This is a little awkward, because in every other area the engine provides such fast performance. All my performance gains in other areas were made by shifting more work to the GPU and preventing the CPU from forming a bottleneck, but this feature is 100% GPU-limited. I will need to think about this.

I agree that Voxel Raytracing should only before hardware that supports it. However, there should be things we can do to make sure customers with lower end cards can still get decent results. If I have to go around placing GI probes everywhere, I wouldn't really mind although it kind of goes against your design goal a bit.

Cyclone - Ultra Game System - Component PreprocessorTex2TGA - Darkness Awaits Template (Leadwerks)

If you like my work, consider supporting me on Patreon!

Link to comment
Share on other sites

7 hours ago, SpiderPig said:

Small issue with a text field, the text changes colour when pressing the 2nd letter.

This is a feature that simulates losing your vision because you are typing too much. :D

  • Haha 1

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

BTW, this is actually the code you want for pixel-perfect drawing:

uicam->SetPosition(float(framebuffer->size.x) * 0.5f, float(framebuffer->size.y) * 0.5f);

With integer division the border of the text field gets cut off. The height of the framebuffer must be an odd number.

  • Thanks 1

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

I now have used WinDbg to get more details about the annoying GUARD_PAGE error and this is more detailed:

(36c8.4f68): Guard page violation - code 80000001 (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
*** WARNING: Unable to verify checksum for GUARD_ERROR_d.exe
VCRUNTIME140D!memcpy+0x27f:
00007ffa`d786156f c4a17e7f8c0900ffffff vmovdqu ymmword ptr [rcx+r9-100h],ymm1 ds:0000014c`f5828000=00

And the StackTrace:

VCRUNTIME140D!memcpy(void)+0x27f [D:\a\_work\1\s\src\vctools\crt\vcruntime\src\string\amd64\memcpy.asm @ 385] 
GUARD_ERROR_d!UltraRender::RenderContext::TransferData+0xcbd
GUARD_ERROR_d!UltraRender::RenderContext::Render+0x557
GUARD_ERROR_d!UltraRender::RenderContext::Render+0x1f7
GUARD_ERROR_d!UltraRender::RenderingThreadManager::Update+0x1d62
GUARD_ERROR_d!UltraCore::ThreadManager::EntryPoint+0xae
GUARD_ERROR_d!UltraEngine::Thread::thread_function+0xaa
ucrtbased!thread_start<unsigned int (void * parameter = 0x0000014c`db315fe0)+0xb0 [minkernel\crts\ucrt\src\appcrt\startup\thread.cpp @ 97] 
KERNEL32!BaseThreadInitThunk+0x14
ntdll!RtlUserThreadStart+0x21

If you need more info we can arrange a remote debug session for tomorrow, today i am to busy.

  • Intel® Core™ i7-8550U @ 1.80 Ghz 
  • 16GB RAM 
  • INTEL UHD Graphics 620
  • Windows 10 Pro 64-Bit-Version
Link to comment
Share on other sites

  • Josh changed the title to Ultra Engine testing
  • Josh locked this topic
Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...