Jump to content

Josh

Staff
  • Posts

    23,142
  • Joined

  • Last visited

Everything posted by Josh

  1. Lua is not ready for use and I would not use these commands yet.
  2. That's fine. What I cannot do is sell you a game engine that will be abandoned in six months, which is what would happen if I sold Ultra under the one-time purchase model, because sales would completely stop after the first month.
  3. There is in the documentation, but I have not been able to get it working in the forum. Would be nice to have!
  4. This is not possible. The reason I am making this change is because Steam flooded their store and it doesn't bring in traffic like it used to. Visual Studio 2022 works with Leadwerks, but Visual Studio Code (they're really different programs) does not work.
  5. I just had a play with this. Startling results. Please don't paste any AI generated text here, I don't want to get this domain blacklisted somehow.
  6. Midjourney is an AI art generator you can interact with on Discord to make content for your game engine. To use it, first join the Discord channel and enter one of the "newbie" rooms. To generate a new image, just type "/imagine" followed by the keywords you want to use. The more descriptive you are, the better. After a few moments four different images will be shown. You can upsample or create new variations of any of the images the algorithm creates. And then the magic begins: Here are some of the images I "created" in a few minutes using the tool: I'm really surprised by the results. I didn't think it was possible for AI to demonstrate this level of spatial reasoning. You can clearly see that it has some kind of understanding of 3D perspective and lighting. Small errors like the misspelling of "Quake" as "Quke" only make it creepier, because it means the AI has a deep level of understanding and isn't just copying and pasting parts of images. What do you think about AI-generated artwork? Do you have any of your own images you would like to show off? Let me know in the comments below.
  7. As I have stated before, my goa for this game enginel is not to build a marketplace of 3D models, but instead to just make sure our model loading code reliably loads all 3D models that are compliant with the glTF specification. I started testing more 3D models from Sketchfab, and found that many of them are using specular/gloss materials. At first I thought I could just fudge the result, but I wasn't getting very good results, and the Windows 10 3D Object Viewer was showing them perfectly. This made me very upset because I feel that the software I make for you should be the absolute best thing possible. So I went ahead and implemented the actual KHR_materials_pbrSpecularGlossiness extension. Here are the results: It looks quite good without breaking the specular/gloss approach. I think this would be an ideal way to upgrade the Leadwerks renderer without making changes that are too big. To implement this, I used the glTF sample viewer source code, which is a bit of a reference renderer for glTF materials. It has changed quite a lot since I first used it as a guide to implementing PBR materials. I decided I might as well integrated the latest code into our renderer. The shader code is very well organized, so it was pretty simple to integrate into my latest code. The glTF materials system is great because it provides a standardized materials system with a lot of advanced effects, along with a reference renderer that shows exactly how the materials are supposed to appear. This means that any engine or tool that is conforms to the glTF standard will always display the same materials the same way, while still allowing additional more specialized features like shadows and post-processing effects to be added. In addition to revising our metal-roughness code, I went ahead and added support for some more features. The KHR_materials_clearcoat extension basically makes cars look like cars: It adds an extra layer of reflections that gives a dark surface a big boost, and can even use a separate normal map for the clearcoat layer: The KHR_materials_sheen extension makes cloth look like cloth. You can see for yourself in the image below. The appearance kind of makes my skin crawl because I can't stand the feeling of velvet / velour. Apparently this is some kind of common tactile hypersensitivity and I actually get a feeling like electricity shooting through my spine just looking at this image, so I think the effect is working well: Another creepy example. Just the thought of running my hand over that fuzzy orange fabric is making me shiver: The KHR_materials_transmission extensions provides a physically accurate model for transparent surfaces, with support for refraction. Here's a shot of refraction bending the background image: This also supports roughness, for making the refracted background appear blurry like frosted glass: I feel the background is too pixellated and should be improved. This problem occurs in the reference renderer, and I have several ideas on how to solve it. The transparency system is very advanced, and introduces a lot of interesting new commands to the engine: Material::SetIndexOfRfraction(const float ior) Material::SetThickness(const float thickness) Material::SetTransmission(const float transmission) These features will give you reliable support for loading glTF models from any source, as well as the best image quality possible for your games. I think realistic materials in VR will also make a big difference in bridging the uncanny valley. And all of this is done with the fastest possible performance for VR. And yes, of course I used a gamepad to do all of this.
  8. I have not done any comparisons of this, but from that screenshot it's apparent my approach of using persistent 2D objects has performance that absolutely destroys imGUI's immediate mode method.
  9. Update Fixed bug when adding text to TextArea widget with 3D GUI: https://www.ultraengine.com/community/topic/61132-ultra-engine-testing/page/34/#comment-298127
  10. Hello! Ultra is designed to load Leadwerks file formats, including the scene file format. This makes the Leadwerks editor useful for work with Ultra, as we will not have a new editor ready until later in 2023. Our new game engine Ultra is planned to be sold on this site only, on a subscription basis at $9.99 / mo. Developers who get it during the early access release will get a discounted price of $7.99 / mo. What does Ultra do that's so special? Well, it's MUCH faster than Leadwerks or Unity. You can try the benchmarks yourself here: https://github.com/UltraEngine/Benchmarks In addition to that, there's a lot of new capabilities Leadwerks does not have. This video is a pretty good overview of what's new:
  11. @reepblueHere is a program that produces your problem: #include "UltraEngine.h" #include "ComponentSystem.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 - Normal", 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, PROJECTION_ORTHOGRAPHIC); camera->SetClearColor(0.125); camera->SetPosition(framebuffer->size.x / 2, framebuffer->size.y / 2); auto font = LoadFont("Fonts/arial.ttf"); auto ui = CreateInterface(world, font, framebuffer->size); auto box = CreateTextArea(10, 10, 500, 300, ui->background); //Main loop while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false) { if (window->KeyHit(KEY_SPACE)) { box->AddText(Uuid() + "\n"); } while (PeekEvent()) { ui->ProcessEvent(WaitEvent()); } world->Update(); world->Render(framebuffer); } return 0; }
  12. There are two things going on here. One is that the directional lights was being displayed in both cameras. The other is that the render target dimensions were not being considered when the lighting data was calculated. Update Fixed the two problems above Your code will now work, but there is another way you can do this without the render-to-texture. You can set the second camera's viewport to render a smaller area on top of the background, and skip the UI camera. This is simpler to set up and it will be a little bit faster probably: #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(); auto framebuffer = CreateFramebuffer(window); auto camera = CreateCamera(world); camera->SetClearColor(0, 0, 1); 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 ui_cam = CreateCamera(world, PROJECTION_ORTHOGRAPHIC); //ui_cam->SetPosition((float)framebuffer->size.x * 0.5f, (float)framebuffer->size.y * 0.5f, 0); //ui_cam->SetRenderLayers(RENDERLAYER_1); //ui_cam->SetClearMode(CLEAR_DEPTH); //auto tex_buffer = CreateTextureBuffer(512, 512); auto cam2 = CreateCamera(world); cam2->SetRenderLayers(RENDERLAYER_2); cam2->SetClearColor(1, 0, 0); //cam2->SetRenderTarget(tex_buffer); cam2->SetViewport(0, framebuffer->size.y - 512, 512, 512); cam2->Move(0, 1, -3); auto light2 = CreateSpotLight(world); light2->SetPosition(1, 2, 0); light2->SetRotation(90, 0, 0); light2->SetColor(2); light2->SetRenderLayers(RENDERLAYER_2); auto floor = CreatePlane(world, 10.0f, 10.0f); floor->SetRenderLayers(RENDERLAYER_2); auto b = CreateBox(world); b->SetPosition(0, 1, 0); b->SetRenderLayers(RENDERLAYER_2); auto box2 = CreateBox(world); box2->SetPosition(0, 1, 0); /*auto mat = CreateMaterial(); mat->SetTexture(tex_buffer->GetColorAttachment()); auto sprite = CreateSprite(world, 512, 512); sprite->SetRenderLayers(RENDERLAYER_1); sprite->SetMaterial(mat); */ auto light = CreateDirectionalLight(world); light->SetRotation(35, 45, 0); light->SetRange(-10, 10); auto floor2 = CreateBox(world, 1000.0f, 0.1f, 1000.0f); while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false) { box2->Turn(0, 1, 0); world->Update(); world->Render(framebuffer); } return 0; }
  13. I've been working hard getting all the rendering features to work together in one unified system. Ultra Engine, more than any renderer I have worked on, takes a lot of different features and integrates them into one physically-based graphics system. A lot of this is due to the excellent PBR materials system that Khronos glTF provides, and then there are my own features that are worked into this, like combined screen-space and voxel ray traced reflections. Anyways, it's a lot of difficult work, and I decided to take a "break" and focus something else for a few days. Before Leadwerks was on Steam, it had a web installer that would fetch a list of files from our server and any files that were missing, or were newer than the locally stored ones. There was no system for detecting updates, you just pressed the update button and the updater ran. The backend for this system was designed by @klepto2 and it functioned well for what it needed to do. With Ultra App Kit, I created a simple tool to generate projects. This introduced the account authentication / signin system, which was sort of superfluous for this application, but it was a good way to test it out: With Ultra Engine, I wanted some characteristics of both these applications. I wrote a new backend in about a day that handles updates. A PHP script authenticates the user and verifies product ownership, fetches a list of files, and retrieves files. Since C++ library files tend to be huge, I found it was necessary to add a compression system, so the script returns a zip compressed file. Of course, you don't want the server to be constantly creating zip files, so it caches the file and updates the zip only when I upload a new copy of the file. There's also a cache for the info retrieval, which is returned in JSON format, so it's easy to read in C++. For the front end, I took inspiration from the Github settings page, which I thought looked nice: And here's what I came up with. Projects will show when they are outdated and need to be updated (if a file in the template the project came from was changed). Each of the sections contains info and links to various topics. There's a lot there, but none of it feels extraneous to me. This is all made with the built-in GUI system. No HTML is used at all: The Invision Power REST API is extremely interesting. It allows authentication of accounts and purchases, but it can be made to do a lot of other things. Post a forum topic: https://invisioncommunity.com/developers/rest-api?endpoint=forums/topics/POSTindex Upload an image to the gallery: https://invisioncommunity.com/developers/rest-api?endpoint=gallery/images/GETindex Download a file: https://invisioncommunity.com/developers/rest-api?endpoint=downloads/files/GETitem Unlock achievements: https://invisioncommunity.com/developers/rest-api?endpoint=core/members/POSTitem_achievements_awardbadge None of that is very important right now, but it does provide some interesting ideas for future development of the game engine.
  14. Autodesk 3ds Max now supports export of glTF models, as well as a new glTF material type. The process of setting up and exporting glTF models is pretty straightforward, but there are a couple of little details I wanted to point out to help prevent you from getting stuck. For this article, I will be working with the moss rocks 1 model pack from Polyhaven. Getting geometry into 3ds Max is simple enough. I imported the model as an FBX file. To set up the material, I opened the compact material editor and set the first slot to be a glTF material. Press the button for the base color map, and very importantly choose the General > Bitmap map type. Do not choose OSL > Bitmap Lookup or your textures won't export at all. Select your base color texture, then do the same thing with the normal and roughness maps, if you have them. 3ds Max treats metal / roughness as two separate textures, although you might be able to use the same texture both if it grabs the data from the green (roughness) and blue (metal) channels. This is something I don't know yet. Select the File > Export menu item to bring up the glTF export dialog. Uncheck the "Export glTF binary" option because we don't want to pack our model and textures into a single file: I don't know what the baked / original material option does because I don't see any difference when I use it. At this point you should have a glTF file that is visible in any glTF model viewer. Now something slightly weird max does is it generates some new textures for some of the maps. This is probably because it is combining different channels to produce final images. In this case, none of our textures need to be combined, so it is just a small annoyance. A .log file will be saved as well, but these can be safely deleted. You can leave the images as-is, or you can open up the glTF file in a text editor and manually change the image file names back to the original files: "images": [ { "uri": "rock_moss_set_01_nor_gl_4k.jpg" }, { "uri": "M_01___Defaultbasecolortexture.jpeg" }, { "uri": "M_01___Defaultmetallicroughnesstex.jpeg" } ], Finally, we're going to add LODs using the Mesh Editor > ProOptimizer modifier. I like these settings, but the most important thing is to make sure "Keep textures" is checked. You can press the F3 key at any time to toggle wireframe view and get a better view of what the optimizer does to your mesh. Export the file with the same name as the full-resolution model, and add "_lod1" to the end of the file name (before the extension). Then repeat this process saving lod2 and lod3 using 25% and 12.5% for the vertex reduction value in the ProOptimizer modifier. Here is my example model you can inspect: mossrock1a.zip Now it is very easy to get 3D models from 3ds max to your game engine.
  15. As the first release of Ultra Engine approaches, it seems clear that the best way to maximize its usefulness is to make it as compatible as possible with the Leadwerks game engine. To that end, I have implemented the following features. Native Loading of Leadwerks File Formats Ultra Engine loads and saves DDS, glTF, and OBJ files. Other formats are supported by plugins, both first and potentially third-party, for PNG, JPG, BMP, TGA, TIFF, GIF, HDR, KTX2, and other files. Additionally, all Leadwerks file formats are natively supported without requiring any plugins, so you can load TEX, MDL, PHY, MAT files, as well as full Leadwerks maps. You also have the option to save Leadwerks game engine formats in more up-to-date file formats such as glTF or DDS files with BC5/BC7 compression. Testing a scene from the excellent Cyclone game (available on Steam!) Classic Specular Shader Family PBR materials are wonderful but act quite differently from conventional specular/gloss game materials. I've added a "Classic" shader family which provides an additive specular effect, which may not be realistic but it makes materials expect the way you would expect them to, coming from Leadwerks game engine. When Leadwerks MAT files are loaded, this shader family is automatically applied to them, to get a closer match to their appearance in Leadwerks. Leadwerks Translation Layer I'm experimenting with a Leadwerks header for Ultra Engine. You can drop this into your Ultra Engine project folder and then start running code with the Leadwerks API. Internally, the Leadwerks game engine commands will be translated into the Ultra Engine API to execute your existing code in the new engine. I don't think this will be 100% perfect due to some differences in the way the two engines work, but I do think it will give you an easy way to get started and provide a gentler transition to Ultra. This code will actually work with both engines: #include "Leadwerks.h" using namespace Leadwerks; int main(int argc, const char* argv[]) { Window* window = Window::Create(); Context* context = Context::Create(window); World* world = World::Create(); Camera* camera = Camera::Create(); camera->Move(0, 0, -3); Light* light = DirectionalLight::Create(); light->SetRotation(35, 35, 0); Model* model = Model::Box(); model->SetColor(0.0, 0.0, 1.0); while (true) { if (window->Closed() || window->KeyDown(Key::Escape)) return false; model->Turn(0, Time::GetSpeed(), 0); Time::Update(); world->Update(); world->Render(); context->Sync(false); } return 0; } I hope these enhancements give you a more enjoyable experience using Ultra together with the Leadwerks Editor, or as a standalone programming SDK.
  16. Update Fixed some bugs in game engine when text sprites are copied or instantiated
  17. Works fine in this example: #include "UltraEngine.h" #include "ComponentSystem.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 - Normal", 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, PROJECTION_ORTHOGRAPHIC); camera->SetClearColor(0.125); camera->SetPosition(framebuffer->size.x / 2, framebuffer->size.y / 2); auto font = LoadFont("Fonts/arial.ttf"); auto ui = CreateInterface(world, font, framebuffer->size); auto box = CreateTextArea(10, 10, 500, 300, ui->background); for (int n = 0; n < 3; ++n) { box->AddText("Hello!\n"); box->AddText("Hello!\n"); box->AddText("Hello!\n"); box->AddText("Hello!\n"); box->AddText("How are you today?!\n"); box->AddText("Hello!\n"); box->AddText("Hello!\n"); box->AddText("Hello!\n"); box->AddText("Hello!\n"); box->AddText("Hello!\n"); box->AddText("Hello!\n"); } //Main loop while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false) { while (PeekEvent()) { ui->ProcessEvent(WaitEvent()); } world->Update(); world->Render(framebuffer); } return 0; }
  18. Yes, an example would be easiest to evaluate.
  19. Update Fixed crash when WINDOWSIZE event sent to 3D interface
  20. Update Fixed pivots crashing when render layer set Lights will now use their render layers both for which cameras they appear in, and which objects will appear in their shadow Added SetRenderLayers(const unsigned int) override so you can just specify integer bit flags (1 + 2, 65, etc). I might get rid of the RENDERLAYER_N constants because it's an advanced feature anyways, and anyone who uses Ultra Engine has already proven they are very smart by making the choice to use Ultra Engine.
  21. Where are you trying to upload your images?
×
×
  • Create New...