Jump to content

Ultra Engine testing


Josh
 Share

Recommended Posts

4 hours ago, Josh said:

Update

Fixed this issue: https://www.ultraengine.com/community/topic/61132-ultra-engine-testing/page/26/#comment-297777

@klepto2Quads are probably better for water. You can create a quad mesh by supplying MESH_QUADS in the last parameter.

Basically for any geometry that can use quads, that will always tessellate better than triangles.

Couldn't test it. The debug library throws validation errors:

Validation Error: [ VUID-vkCmdDrawIndexedIndirect-mipmapMode-04770 ] Object 0: handle = 0x176083000000005f, type = VK_OBJECT_TYPE_DESCRIPTOR_SET; Object 1: handle = 0xb097c90000000027, type = VK_OBJECT_TYPE_SAMPLER; Object 2: handle = 0xa2eb680000000026, type = VK_OBJECT_TYPE_IMAGE_VIEW; | MessageID = 0x46f7c46a | vkCmdDrawIndexedIndirect: Descriptor set VkDescriptorSet 0x176083000000005f[] Sampler (VkSampler 0xb097c90000000027[]) is set to use VK_SAMPLER_MIPMAP_MODE_LINEAR with compareEnable is set to VK_FALSE, but image view's (VkImageView 0xa2eb680000000026[]) format (VK_FORMAT_R32_UINT) does not contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT in its format features. The Vulkan spec states: If a VkSampler created with mipmapMode equal to VK_SAMPLER_MIPMAP_MODE_LINEAR and compareEnable equal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view's format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT (https://vulkan.lunarg.com/doc/view/1.3.236.0/windows/1.3-extensions/vkspec.html#VUID-vkCmdDrawIndexedIndirect-mipmapMode-04770)

and the release lib is damaged.

I indeed use Quads for the water mesh, i just leaved it out in the sample as it didn't matter in this case. Also i wouldn't say they tesselate better, but with dynamic tessellation the blending is much smoother.

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

That's what I get for uploading before I go to bed...I updated it again, should be working fine.

@klepto2 Is that validation error occurring as a result of your own Vulkan code? It says the problem is an RGBA 32-bit integer texture is using a linear sampler.

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

5 hours ago, SpiderPig said:

I would like to choose between the two if possible.

I might implement this as a more capable collision API, so I would like to hold off on it right now.

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

28 minutes ago, Josh said:

That's what I get for uploading before I go to bed...I updated it again, should be working fine.

@klepto2 Is that validation error occurring as a result of your own Vulkan code? It says the problem is an RGBA 32-bit integer texture is using a linear sampler.

no, the validation comes as well, when i compile the previous posted sample in debug. 

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

I installed the latest version of the Vulkan SDK and I get the same validation error. I think I just have to specify the nearest filter when I create that texture.

image.png.20f5148c62edbdacd1cf9b6d75e038c6.png

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

EULA is finalized. It's the same as Leadwerks but does not allow for use by a company with >= $100,000 in revenue, or by any government or military agency: https://www.ultraengine.com/eula

(These are still possible, but require a separate licensing agreement.)

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

Did a quick sound check after helping Josh and it seems like there's no "3D" to this sound. I think the listener isn't being updated as the audio sounds the same no matter how far way you are from it. 

I've also found out that the radio loops from Cyclone also don't seem to load and I've already sent an example to him.

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

using namespace UltraEngine;

// Use any .wav file here.
#define SOUNDSAMPLE_PATH "Sound/error.wav"
#define SPEAKER_RANGE 1.0f

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

	//Create a window
	auto window = UltraEngine::CreateWindow("Ultra Engine", 0, 0, 1280, 720, 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);

	//Entity component system
	auto camera_actor = CreateActor(camera);
	auto camera_component = camera_actor->AddComponent<CameraControls>();
	camera->Listen();

	//Create a light
	auto light = CreateBoxLight(world);
	light->SetRotation(35, 45, 0);
	light->SetRange(-10, 10);

	//Create a box
	auto box = CreateBox(world);
	box->SetColor(0, 0, 1);

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

	// Sound
	auto sound = LoadSound(SOUNDSAMPLE_PATH);
	auto speaker = CreateSpeaker(sound);
	speaker->SetLooping(true);
	speaker->SetPosition(box->GetPosition(true));
	speaker->SetRange(SPEAKER_RANGE);
	speaker->Play();

	//Main loop
	while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false)
	{
		if (window->KeyDown(KEY_P))
		{
			if (speaker->GetState() == SPEAKER_PLAYING)
				speaker->Pause();
			else
				speaker->Resume();
		}

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

I also get this junk upon closing.

[ALSOFT] (WW) Error generated on context 0000021704B51B00, code 0xa001, "Invalid source ID 0"
Deleting sound "Sound/error.wav"
Deleting shader family "Shaders/Sky.json"
[ALSOFT] (WW) Releasing orphaned context 0000021704B51B00

 

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

  • Added work around for some invalid WAV files. I think the file above might have an error in it, but it can be avoided.
  • Eliminated OpenAL error messages on shutdown.
  • Fixed sound range not working.

Example: https://www.ultraengine.com/learn/Entity_Listen?lang=cpp

  • 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

Updated the client installer. All this does is fix the goofy wobbly spinner animation.

If you download it, wait a few minutes from now for the CDN to propagate.

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

With the client app can you make it so we can change the install path?  I also wonder if it's possible to add the current download size and transfer rate?  Just because it's cool.  ^_^

With the benchmarks - how did you get ultra to print the max fps?  All I can get is 60 regardless of the frequency I set in world->Update().

There's also an issue with updating the text on a label.  every time it changes it reloads a shader which causes a bit of a slow down.  Both issues are in the example.

ConsoleReloadingShader.thumb.png.f8295f11b24c3485eeaf1c07978c7d03.png

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


using namespace UltraEngine;


int main(int argc, const char* argv[])
{
    auto displays = GetDisplays();
    auto window = CreateWindow("Ultra Engine", 0, 0, 1280, 720, displays[0], WINDOW_CENTER | WINDOW_TITLEBAR);
    auto world = CreateWorld();
    world->RecordStats();

    auto framebuffer = CreateFramebuffer(window);

    auto camera = CreateCamera(world);
    camera->SetClearColor(0.125);
    camera->SetFov(70);
    camera->SetPosition(0, 2, -3);

    auto font = LoadFont("Fonts/arial.ttf");
    auto ui = CreateInterface(world, font, framebuffer->size);
    ui->SetRenderLayers(RENDERLAYER_1);
    ui->root->SetColor(0, 0, 0, 0);

    auto fps = CreateLabel("FPS : 0", 10, 10, 150, 30, ui->root);
    auto i_change_a_lot = CreateLabel("", 10, 25, 150, 30, ui->root);

    auto ui_cam = CreateCamera(world, PROJECTION_ORTHOGRAPHIC);
    ui_cam->SetPosition(framebuffer->size.x / 2, framebuffer->size.y / 2, 0);
    ui_cam->SetRenderLayers(RENDERLAYER_1);
    ui_cam->SetClearMode(CLEAR_DEPTH);

    auto light = CreateDirectionalLight(world);
    light->SetRotation(35, 45, 0);
    light->SetRange(-10, 10);

    auto floor = CreateBox(world, 1000.0f, 0.1f, 1000.0f);



    int i = 0;
    while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false)
    {
        fps->SetText("FPS : " + String(world->renderstats.framerate));
        i_change_a_lot->SetText(String(i));
        i++;

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

 

Link to comment
Share on other sites

7 minutes ago, SpiderPig said:

With the client app can you make it so we can change the install path?  I also wonder if it's possible to add the current download size and transfer rate?  Just because it's cool.  ^_^

With the benchmarks - how did you get ultra to print the max fps?  All I can get is 60 regardless of the frequency I set in world->Update().

The install path of the client app is the install path of the program. You can change this when you run the client installer.

See the documentation for World::Render. There's a parameter to disable vsync.

  • 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

@SpiderPigI fixed the shader family reload issue. Fix will be in the next update.  However, it might be slightly faster  if you use a sprite instead. When you use a sprite and call SetText() it reuses the same mesh, whereas the GUI is more complex and may create new sprites.

  • 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

5 minutes ago, Josh said:

@SpiderPigI fixed the shader family reload issue. Fix will be in the next update.  However, it might be slightly faster  if you use a sprite instead. When you use a sprite and call SetText() it reuses the same mesh, whereas the GUI is more complex and may create new sprites.

I take that last part back. On closer inspection, there is no disadvantage to using the GUI like this. Don't worry.

  • 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

This is a validation error i only get with nvidia nsight with forced validation on. But maybe a hint to enable this extension.

image.png.d583d20bd3223121a33acda081d0e5d0.png

Another thing is that my Computepipeline isn't working anymore. There seems to be some changes regarding image initialisation. I need a way to savely retreive the current VkImageLayout to transition to the required one. Maybe its due to the new VulkanSDK as well, but this is the current message i get:

Validation Error: [ UNASSIGNED-CoreValidation-DrawState-InvalidImageLayout ] Object 0: handle = 0x1f970310e50, type = VK_OBJECT_TYPE_COMMAND_BUFFER; | MessageID = 0x4dae5635 | vkQueueSubmit(): pSubmits[0].pCommandBuffers[0] command buffer VkCommandBuffer 0x1f970310e50[] expects VkImage 0x7992cc00000002d1[] (subresource: aspectMask 0x1 array layer 0, mip level 0) to be in layout VK_IMAGE_LAYOUT_GENERAL--instead, current layout is VK_IMAGE_LAYOUT_UNDEFINED.

Any idea?
 

[Edit:]

This obviously only occurs in debug mode, in release the validation error is ignored and the computepipeline worksas expected.

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

  • Josh locked this topic
Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...