Jump to content

Recommended Posts

Posted

VR integration is finished.

  • Removed settings.openxr parameter. Instead, call GetHmd() before the first call to World::Render().
  • Documentation here: https://www.ultraengine.com/learn/VrDevice?lang=cpp
  • Hmd::SetOffset supports rotation as well as position. :wub:
  • Don't create a camera when using VR, it will be done automatically.

Example:

#include "UltraEngine.h"

using namespace UltraEngine;

int main(int argc, const char* argv[])
{
    shared_ptr<Hmd> hmd;
    shared_ptr<Camera> camera;

    //Load the FreeImage texture plugin
    auto plugin = LoadPlugin("Plugins/FITextureLoader");

    //Get the displays
    auto displays = GetDisplays();

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

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

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

    //Get the VR headset
    hmd = GetHmd(world);

    //Create a camera if not in VR mode
    if (not hmd) camera = CreateCamera(world);

    //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(specmap, ENVIRONMENTMAP_BACKGROUND);
    world->SetEnvironmentMap(specmap, ENVIRONMENTMAP_SPECULAR);
    world->SetEnvironmentMap(diffmap, ENVIRONMENTMAP_DIFFUSE);

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

    //Load a model to display
    auto model = LoadModel(world, "https://github.com/UltraEngine/Documentation/raw/master/Assets/Models/Characters/cyber_samurai.glb");
    model->Turn(0, 180, 0, true);
    model->SetPosition(0, 0.25, 0);
    model->SetScale(0.9);

    //Add a floor
    auto floor = CreateBox(world, 5, 1, 5);
    floor->SetPosition(0, -0.5, 0);
    auto mtl = CreateMaterial();
    mtl->SetTexture(LoadTexture("https://github.com/UltraEngine/Documentation/raw/master/Assets/Materials/Developer/griid_gray.dds"));
    floor->SetMaterial(mtl);

    shared_ptr<Model> controllermodel[2];

    //Position and rotation offset:
    //hmd->SetOffset(Vec3(2, 0, 0), Vec3(0,90,0));

    //Main loop
    while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false)
    {
        if (hmd)
        {
            for (int n = 0; n < 2; ++n)
            {
                if (hmd->controllers[n]->Connected())
                {
                    //How to attach stuff to the controllers:
                    //if (not controllermodel[n]) controllermodel[n] = CreateBox(world, 0.1);
                    //if (n == 1) controllermodel[n]->SetColor(0, 0, 1);
                    //controllermodel[n]->Attach(hmd->controllers[n]);
                }
            }
        }

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

 

  • Like 3
  • Thanks 1

Let's build cool stuff and have fun. :)

Posted
  • Third-person component is updated to support animation.
  • Default start map now uses robot player model with third-person component.
  • Added VR player component.
  • Like 1
  • Thanks 1

Let's build cool stuff and have fun. :)

Posted
  • Fixed bug where render-to-texture was sending the framebuffer size to the shaders, not the texture buffer size. This fixes most light cell errors in VR rendering.
  • Change to the lighting position reconstruction formula, project sync is required to get the newer shader.
  • Thanks 1

Let's build cool stuff and have fun. :)

Posted
  • Fixed VrController::ButtonHit() not working right
  • Fixed definition of Rgba() function
  • Added some experimental entity component stuff for compatibility with possible future C# support
  • Like 1
  • Thanks 1

Let's build cool stuff and have fun. :)

Posted

Created "stable" channel and made it default. This will continue to receive updates and will always be the current stable release. Older versions will be archived with the version number and will never change. So currently the stable channel has version 0.9.1, and when 0.9.2 is finalized it will appear on the stable channel and a new 0.9.1 channel will be created to archive this version.

  • Like 1
  • Thanks 1

Let's build cool stuff and have fun. :)

Posted
  • Updated dev channel version to 0.9.2
  • Added new fast path image drawing technique in GUI system that is used when the block size matches the pixmap size, and the pixmap has no transparency (using BitBlt).
  • Using this technique, flowgraph editor has background grid visible, with very snappy response
  • Added "Make Seamless" OpenAI inpainting tool in asset editor when a texture is opened

seamless.thumb.gif.c31992c00a607ba252f19e8d12a41784.gif

 

  • Like 2
  • Thanks 1

Let's build cool stuff and have fun. :)

Posted

Added initial implementation of Steamworks API into the C++ project. Code is included, so it can be easily added or omitted from a project.

  • Like 1
  • Thanks 1

Let's build cool stuff and have fun. :)

Posted

Voice chat should actually be working now. I tested it by sending the packets to myself. Just call RecordVoice(true) and the code will handle the rest.

  • Like 1
  • Thanks 1

Let's build cool stuff and have fun. :)

  • 2 weeks later...
Posted
  • Fixed a bug in the Lua version of LoadTable where an empty JSON object could crash the program. This was causing the FBX to glTF converter to crash when some models were converted.
  • Removed the Collada to glTF converter because Collada is just not used very often and I'd rather limit my focus to making sure the stuff that does get used works correctly.

This patch is available now on the dev/beta branch on Steam and in the standalone.

  • Thanks 1

Let's build cool stuff and have fun. :)

Posted

Fixed bug in brush picking routine that could cause the face edit tool to crash in editor. Standalone is updated on the dev channel, Steam build will be updated tomorrow.

  • Thanks 1

Let's build cool stuff and have fun. :)

Posted

The brush drawing tool will no longer perform a raycast when starting a draw in any 2D viewport, to try to place the brush on top of what is under the cursor. Instead, it will use the bounds of the last selected object(s) for the size and position on the remaining axis.

So for example if you are drawing a brush in the top-down view, the Y position and size will be the same as the bounds of whatever was last selected. It just uses the last dimensions drawn or selected as the missing axis.

I feel this is a big improvement.

  • Like 1
  • Thanks 1

Let's build cool stuff and have fun. :)

Posted

In 2D viewports, the amount of padding you have when selecting a brush's wireframe edge is now scaled by the DPI scaling factor, so if you have a high-density display it will be easier to click on brushes.

  • Like 3
  • Thanks 1

Let's build cool stuff and have fun. :)

Posted

This is intended to be the final build of 0.9.2 before it moves over to the default branch.

  • Total rebuild of everything
  • Face offset spinners now move in increments of 0.1
  • Environment probes now have padding of 0 on all edges by default
  • Like 1
  • Thanks 1

Let's build cool stuff and have fun. :)

Guest
This topic is now closed to further replies.
×
×
  • Create New...