Jump to content

Ultra Engine testing


Josh
 Share

Recommended Posts

In the next build, VkTexture::imageview will be replaces with an STL vector called "imageviews". This will allow you to write to each mipmap in a texture.

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

Hey, just an idea, but why not have the game files be in their own directory? Right now, everything looks cluttered.

IDK, maybe to something like this? The only change to the project files would be to change the output directory, For the editor, I would have it look for a path string within the Ultra.json file so the editor can set its root folder correctly. unknown.png

Bin might be a bad name, maybe "Game" would be better...

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

SDK is updated with initial implementation of cascaded shadow maps. You need to supply a camera to the creation function instead of the world. This is because each camera requires its own shadow map array for the light, since it is based on the camera frustum. The shadows will wobble because I have not yet implemented locking their position to regular increments. I also don't know exactly how this will work together with GI yet. I expect to add more commands that will give you a lot of control over how these shadows work.

#include "UltraEngine.h"

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 * 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);

    //Create a light
    auto light = CreateLight(camera, LIGHT_DIRECTIONAL);
    light->SetRotation(60, 25, 0);

    auto ground = CreateBox(world, 1000, 1, 1000);
    ground->SetPosition(0, -0.5, 0);

    auto temp = CreateBox(world, 1, 10, 1);
    std::vector<shared_ptr<Entity> > boxes;
    for (int x = 0; x < 20; ++x)
    {
        for (int y = 0; y < 20; ++y)
        {
            auto box = temp->Instantiate(world);
            box->SetPosition(x * 4 - 40, 5, y * 4 - 40);
            boxes.push_back(box);
        }
    }
    temp = NULL;

    //Main loop
    while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false)
    {
        camera->UpdateControls(window);
        world->Update();
        world->Render(framebuffer);
    }
    return 0;
}

 

  • Like 2

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

11 hours ago, Josh said:

SDK is updated with initial implementation of cascaded shadow maps. You need to supply a camera to the creation function instead of the world. This is because each camera requires its own shadow map array for the light, since it is based on the camera frustum. The shadows will wobble because I have not yet implemented locking their position to regular increments. I also don't know exactly how this will work together with GI yet. I expect to add more commands that will give you a lot of control over how these shadows work.

How will this work if I create my camera in code, but load a map with a light? How will the map know what camera to render the shadows to? 

What if someone wanted to create security cameras, 3D skyboxes, or even portals? How would they  render shadows to the main camera and also the other cameras? I understand that this is the first pass on this but I'm not warm to this change.

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

Another update:

  • Fixed directional light shadow wobble. It's now 100% stable, even better than Leadwerks
  • Added a fade out for the last cascade
  • Improved cascaded volumes
  • GI working again :blink:
  • Included pdb file for debugging
  • GI specular mixed in properly with latest PBR code from Khronos

Definitely give this example a try:
https://www.ultraengine.com/learn/Camera_SetVXRT?lang=cpp

  • Like 2
  • Upvote 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

Another update is available. The CreateLight(camera) overload is gone. You can just create a directional light for the world and the engine will automatically a bunch of extra lights under the hood, for each camera, so each camera has cascaded shadow maps. I'm not sure yet if the light settings will be handled per-camera, per-light, or both.

  • Like 2

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'm trying to rebuild my in-render interface after the window rebuilds to a different mode, but this doesn't seem to update the new size.

void StageUI::Redraw(const float fScale, const iVec4 v)
{
	m_pCamera->SetPosition(v.width / 2, v.height / 2);
	m_pInterface->SetScale(fScale);
	m_pInterface->Redraw(0, 0, v.width, v.height);
	m_pInterface->UpdateLayout();
	m_pInterface->Draw();
}

 

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

I'm getting a crash with this. The example you posted before works fine but IDK why this is throwing me to lists.h.

	void StageUI::ProcessEvent(const UltraEngine::Event& iEvent)
	{
		// This throws me to list.h
		//if (GetInterface() != NULL) GetInterface()->ProcessEvent(iEvent);

		if (iEvent.id == EVENT_KEYUP)
		{
			if (iEvent.data == KEY_ESCAPE)
			{
				auto stage = m_wpStage.lock();
				stage->SetPaused(!stage->GetPaused());
			}
			else if (iEvent.data == KEY_TILDE)
			{
				auto stage = m_wpStage.lock();
				if (!stage->GetPaused()) stage->SetPaused(true);
				const bool bConsoleHidden = m_pPanelConsole->GetHidden();
				m_pPanelConsole->SetHidden(!bConsoleHidden);
			}
		}
		else if (iEvent.id == EVENT_PRINT)
		{
			m_pTextAreaConsole->AddText(iEvent.text + "\n");
		}
	}

This is where it stops..

    _Unchecked_iterator _Unchecked_begin() noexcept {
        return _Unchecked_iterator(_Mypair._Myval2._Myhead->_Next, nullptr);
    }

 

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

Update:

This performs VXRT and / or SSR in a lower-resolution post-step (prior to deferred transparency rendering if refraction is enabled). Since fewer pixels are being rendered with these relatively expensive effects, the framerate will improve over previous builds.

You should not add the SSR effect with the camera::AddPostEffect() command, but rather call camera->SetSSR(true). Getting all these effects to play together correctly requires some things that don't fit into the stack-of-post-processing-effects paradigm.

You can render with SSR alone, VXRT alone, both combined, or neither. I would probably make options like this in a game:

Low: No SSR, no VXRT, skybox reflection only
Medium: VXRT + skybox
High: SSR + VXRT + skybox

You can also use SSR alone, but I don't know why you would want to do this.

Note that the specular reflection is processed in that order. First SSR, then if the resulting alpha value is less than 1.0 a VXRT specular sample is taken, and then if the remaining alpha is still less than 1.0, the skybox is sampled, if it has been set with world->SetEnvironmentMap(texture, ENVIRONMENTMAP_BACKGROUND).

  • Like 2
  • 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

Hi, i was now able to test the last update after i was on vacation the last 2 weeks, but now i get some errors:

First: As soon as I create a 3D Texture i get an assert here:

>	KernelBase.dll!00007fff6eaad662()	Unbekannt
 	Environment_d.exe!UltraEngine::RuntimeError(const UltraEngine::WString & s) Zeile 1715	C++
 	Environment_d.exe!UltraEngine::Assert(const bool condition) Zeile 1739	C++
 	Environment_d.exe!UltraRender::RenderTexture::SetPixels(std::shared_ptr<UltraEngine::Buffer> pixels, const int miplevel, const int face) Zeile 631	C++
 	[Externer Code]	
 	Environment_d.exe!UltraCore::ThreadManager::Update(const bool wait) Zeile 199	C++
 	Environment_d.exe!UltraRender::RenderingThreadManager::Update(const bool wait) Zeile 243	C++
 	Environment_d.exe!UltraCore::ThreadManager::EntryPoint(std::shared_ptr<UltraEngine::Object> o) Zeile 218	C++
 	Environment_d.exe!UltraEngine::Thread::thread_function(void * ptr) Zeile 31	C++
 	[Externer Code]	

This only seems to occur using 3D Textures when they are created like this:

 

	auto texture = CreateTexture(TEXTURE_3D, 256, 256, UltraEngine::TEXTURE_RGBA32, {}, 32, TextureFlags::TEXTURE_CLAMP_UVW | TextureFlags::TEXTURE_STORAGE, TextureFilter::TEXTUREFILTER_LINEAR, 0);

	

    Otherwise i always get this when running anything with the latest update (it runs, but extremely slow due to massive output): 

Ausnahme ausgelöst bei 0x00007FFF61A714D3 (vcruntime140d.dll) in Environment_d.exe: 0x80000001: Nicht implementiert (Parameter: 0x0000000000000001, 0x000002ABA24F4E00).
Ausnahme ausgelöst bei 0x00007FFF61A714D3 (vcruntime140d.dll) in Environment_d.exe: 0x80000001: Nicht implementiert (Parameter: 0x0000000000000001, 0x000002ABA24F5000).
Ausnahme ausgelöst bei 0x00007FFF61A714D3 (vcruntime140d.dll) in Environment_d.exe: 0x80000001: Nicht implementiert (Parameter: 0x0000000000000001, 0x000002ABA24F5600).
Ausnahme ausgelöst bei 0x00007FFF61A714D3 (vcruntime140d.dll) in Environment_d.exe: 0x80000001: Nicht implementiert (Parameter: 0x0000000000000001, 0x000002ABA24F5E00).
Ausnahme ausgelöst bei 0x00007FFF61A714D3 (vcruntime140d.dll) in Environment_d.exe: 0x80000001: Nicht implementiert (Parameter: 0x0000000000000001, 0x000002ABA24F6000).
Ausnahme ausgelöst bei 0x00007FFF61A714D3 (vcruntime140d.dll) in Environment_d.exe: 0x80000001: Nicht implementiert (Parameter: 0x0000000000000001, 0x000002ABA17F3C20).
Ausnahme ausgelöst bei 0x00007FFF61A714D3 (vcruntime140d.dll) in Environment_d.exe: 0x80000001: Nicht implementiert (Parameter: 0x0000000000000001, 0x000002ABA17F3E20).
Ausnahme ausgelöst bei 0x00007FFF61A714D3 (vcruntime140d.dll) in Environment_d.exe: 0x80000001: Nicht implementiert (Parameter: 0x0000000000000001, 0x000002ABA24F6600).
Ausnahme ausgelöst bei 0x00007FFF61A714D3 (vcruntime140d.dll) in Environment_d.exe: 0x80000001: Nicht implementiert (Parameter: 0x0000000000000001, 0x000002ABA24F6800).
Ausnahme ausgelöst bei 0x00007FFF61A714D3 (vcruntime140d.dll) in Environment_d.exe: 0x80000001: Nicht implementiert (Parameter: 0x0000000000000001, 0x000002ABA24F6A00).
Ausnahme ausgelöst bei 0x00007FFF61A714D3 (vcruntime140d.dll) in Environment_d.exe: 0x80000001: Nicht implementiert (Parameter: 0x0000000000000001, 0x000002ABA24F6C00).
Ausnahme ausgelöst bei 0x00007FFF61A715BC (vcruntime140d.dll) in Environment_d.exe: 0x80000001: Nicht implementiert (Parameter: 0x0000000000000001, 0x000002ABA17E7E80).
Ausnahme ausgelöst bei 0x00007FFF61A715BC (vcruntime140d.dll) in Environment_d.exe: 0x80000001: Nicht implementiert (Parameter: 0x0000000000000001, 0x000002ABA17E7F00).
Ausnahme ausgelöst bei 0x00007FFF61A715BC (vcruntime140d.dll) in Environment_d.exe: 0x80000001: Nicht implementiert (Parameter: 0x0000000000000001, 0x000002ABA17E7F80).
Ausnahme ausgelöst bei 0x00007FFF61A715BC (vcruntime140d.dll) in Environment_d.exe: 0x80000001: Nicht implementiert (Parameter: 0x0000000000000001, 0x000002ABA24F6DE4).
Ausnahme ausgelöst bei 0x00007FFF61A715BC (vcruntime140d.dll) in Environment_d.exe: 0x80000001: Nicht implementiert (Parameter: 0x0000000000000001, 0x000002ABA24F6E64).
Ausnahme ausgelöst bei 0x00007FFF61A715BC (vcruntime140d.dll) in Environment_d.exe: 0x80000001: Nicht implementiert (Parameter: 0x0000000000000001, 0x000002ABA24F6EE4).
Ausnahme ausgelöst bei 0x00007FFF61A71421 (vcruntime140d.dll) in Environment_d.exe: 0x80000001: Nicht implementiert (Parameter: 0x0000000000000001, 0x000002ABA24F6F64).
Ausnahme ausgelöst bei 0x00007FFF61A71421 (vcruntime140d.dll) in Environment_d.exe: 0x80000001: Nicht implementiert (Parameter: 0x0000000000000001, 0x000002ABA24F6F84).

Visual Studio and everything is updated to the latest version.

 

  • Windows 10 Pro 64-Bit-Version
  • NVIDIA Geforce 1080 TI
Link to comment
Share on other sites

After several days of struggle, the GI area will now follow the camera around correctly instead of staying in the center of the world.

tom hardy bane GIF

CreateTexture() using a volume texture is now fixed.

The engine might run on @SpiderPig's computer now.

homer simpson GIF

  • Haha 2

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, Josh said:

CreateTexture() using a volume texture is now fixed.

Confirmed :)

unfortunatly the annoying "vcruntime140.dll not implemented" error is still there :( 

I tracked it down to the world->Render method. If i run the app without calling the render method the error is not visible. As a hint from stackoverflow the error code has some thing to do with PAGE_GUARDS: https://stackoverflow.com/a/2092136

 

 

  • Windows 10 Pro 64-Bit-Version
  • NVIDIA Geforce 1080 TI
Link to comment
Share on other sites

12 minutes ago, klepto2 said:

Confirmed :)

unfortunatly the annoying "vcruntime140.dll not implemented" error is still there :( 

I tracked it down to the world->Render method. If i run the app without calling the render method the error is not visible. As a hint from stackoverflow the error code has some thing to do with PAGE_GUARDS: https://stackoverflow.com/a/2092136

With every program you compile?

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

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

×
×
  • Create New...