Jump to content

Andy90

Developers
  • Posts

    219
  • Joined

  • Last visited

Everything posted by Andy90

  1. I think. Its from Mixamo its an model and animation libary which is used very often.
  2. @Joshdid you found allready a solution for this issue? Got the same problem. Just drag the character into the scene. Scale it to 1.0 and play the animation. Wired things happen Here is the gltf from the model. Human_2.zip
  3. Due to several inquiries about how I created my inventory, crafting, and storage systems, I would like to explain my approach in more detail. In this blog post, I won't use any code but rather focus on explaining the underlying logic. 1. The InventoryItem Class The foundation of these systems is an Item class, which I abstractly created to represent different types of items (materials, placeable objects, weapons, consumables, etc.). The reason for an abstract class is straightforward: it allows me to pack all items into a vector and call defined functions based on the situation, such as OnPickup, OnDrop, and OnUse. Additionally, I've created an Item Definition JSON, which defines items, including details like icon, name, maximum stack size, and item type. However, this isn't crucial and can be skipped. 2. The Gridview Widget After defining my base class, I created a custom widget for a GridView, as I introduced in a previous post. However, this widget doesn't use the previously created Item class; instead, it has its own GridView items. Why? Because it's crucial to separate data from the GUI, and I can use it in various other projects. The GridView serves to visually represent the items, and we'll delve into how it works later. 3. How to Display InventoryItems within the Widget Now that I have the basic Item class and a GridView for displaying inventory content, let's move on to the inventory itself. The Inventory class is not a component; rather, it's a simple C++ class that includes a vector for items and various functions to add, remove, and retrieve items. Additionally (for simplicity), I created a reference to a Grid Widget for the inventory. When a change in items occurs, this GridView is updated. The process involves removing GridView items and adding new GridView items based on the inventory's items. Now I have an inventory that shows the items the player has in their inventory. 4. New Items for the Player Now let's talk about how the player obtains items, which is quite simple. For this, I created a component that assigns items to the inventory based on various conditions, such as the passage of time. 5. The Crafting UI & Concept Since we can now gather items and see them in the inventory, let's do more with these items. We want to craft ItemZ from ItemX and ItemY. For crafting itself, I've also created a component (named Workbench) and its own UI. This is a bit more complex, so I'll try to explain it as precisely as possible. The UI has two GridViews and a ListView, along with various other widgets that aren't as important. What's crucial is that I only have one UI managing the workbenches. For this, I created two global variables: one for the panel (the UI) and one for the component that's currently the owner of the UI. When the player opens the UI using a workbench, the UI owner is also set simultaneously. It can only be reopened after being closed, as the owner is then set back to a null pointer. When opening, I load all recipes into the ListView. The recipes themselves are defined in a JSON file. When the player selects an item they want to craft, the required materials are loaded into the first GridView. This serves purely as visual information and has no further functions. 6. Drag & Drop Items Now let's discuss how I allow the player to place items from their inventory into the crafting window. For this, I created another class called ItemMover. Its task is to temporarily pick up an item and then transfer it. I use the events sent by the GridView. When the player performs a mouse drag, I now pick up the item(s) from the inventory slot and set it as a reference to the ItemMover. If I then receive the MouseDown event on another GridView, I check if the ItemMover has an item. If so, I add the item from the Mover to the Workbench's vector, update the UIs, and delete the item from the Mover. To make this look visually appealing with drag and drop, I created a simple widget that becomes visible when the ItemMover holds an item and is always set to the mouse's position. It becomes invisible on item drop. 7. The Crafting itself Crafting itself is again quite simple. When the player clicks the button, the Workbench checks if the vector of materials (using the Item class again) has enough of the required items. If yes, the item is crafted and added to the vector of materials. 8. Get the Crafted items into the inventory To allow the player to now take out the crafted item, we again use the ItemMover and drag-and-drop functions. 9. Done! As you can see, the whole system is quite complex, making it challenging to provide any specific files due to many dependencies among themselves and with other components. I hope I have explained it comprehensibly. If you have further questions, feel free to ask them in the comments. Watch the video how it works https://streamable.com/r2d0x5
  4. yeah but look within the ultra editor and place it into the scene. its super small. And if you play an animation some wired things happens.
  5. but indeed something with the rigged models are wrong. Eighter no one of us knows how to export that we can use it within ultra or the import itself got problems. Here you have an Model with the same problem. https://1drv.ms/u/s!Aum5gwXzTrOywAa7_gzAjoeWozU1?e=cIvaNX
  6. But with this there is an problem. You cant even import gltf in 3DS Max and Maya. Im not sure with Unity and Unreal. glb / gltf import - Autodesk Community - Maya
  7. as i sayed same problem. I downloaded an mixxamo character with an animation. Drop it in blender and export it to gltf. If i drop in the fbx file direct the mesh gets converted on a proper way. But there is the problem that you are not able to edit anythin on this model. Otherwise you loose all animation. Also maybe you should consider to support also fbx. I think the most ppl have an assset libary with only fbx files because every other engine is using this file format. I mean its not even possible to export gltf from maya without any 3rd party plugin.
  8. I got the same problem josh. Is this a Mixamo model ?
  9. The mesh is visible within the game. Look at image 2
  10. Hello i work alot with the nav mesh. So i created an terrain with small bumps and adjustet the navmesh within the edior. When i play and walk towards the "hills" or "bumps" the navmesh is geting visible and also the character is not working to this position. within the image on top you can see the small bumps within the world and it looks that the player or the nav agent can walk to this position. But he cant and also the mesh is visible at this points. See the image bellow. How to reproduce this? Create an terrain with some light bumps and adjust the terrain like this.
  11. Its working. Thanks. Maybe an example within the documentation would be nice. So other ppl wont have this issue. This is the current code from Ultra Engine - Best game engine for VR optimized for fastest virtual reality 3D performance #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, 720, displays[0], WINDOW_CENTER | WINDOW_TITLEBAR); //Create a framebuffer auto framebuffer = CreateFramebuffer(window); //Create a world auto world = CreateWorld(); //Create a camera auto camera = CreateCamera(world); camera->SetFov(70); camera->SetClearColor(0.125); camera->SetPosition(0, 3, -6); camera->SetRotation(35,0,0); //Create light auto light = CreateBoxLight(world); light->SetRange(-20, 20); light->SetArea(20, 20); light->SetRotation(35, 35, 0); light->SetColor(3); //Create scene auto ground = CreateBox(world, 10, 1, 10); ground->SetPosition(0, -0.5, 0); ground->SetColor(0, 1, 0); auto wall = CreateBox(world, 1, 2, 4); //Create navmesh auto navmesh = CreateNavMesh(world, 10, 5, 10, 4, 4); navmesh->Build(); //Create player auto player = CreateCylinder(world, 0.4, 1.8); player->SetNavObstacle(false); player->SetColor(0, 0, 1); auto agent = CreateNavAgent(navmesh); player->Attach(agent); //Main loop while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false) { if (window->MouseHit(MOUSE_LEFT)) { auto mousepos = window->GetMousePosition(); auto rayinfo = camera->Pick(framebuffer, mousepos.x, mousepos.y); if (rayinfo.success) { agent->Navigate(rayinfo.position); } } world->Update(); world->Render(framebuffer); } return 0; }
  12. I think i have not the vulkan sdk installed if its not get installed with the engine. Im on the beta branch.
  13. yes. It happens the most time when you go from the desert map to the other.
  14. Posted the bug here: im not sure if its actualy the component. Because it happens only from map B to map A so far. I dont recived this issue from map a to map b.
  15. Hello As already mentioned in Discor, here is the bug report of the renderer error. It occurs spontaneously when switching from one map to another. So far it has only happened when I switch back from Map B to Map A. From Map A to Map B I haven't received this error yet. You can reproduce the error if you use the teleporter to change the map several times in a row. You can use the teleporter by letting the character walk on it and pressing enter. Alternatively, you can of course also change the teleport components. This is located in Source/Components/Custom. Files: https://1drv.ms/u/s!Aum5gwXzTrOyv3hfHkhC8P002lYC?e=XnFOSZ Screenshots:
  16. Hey, i have another bug. Right now the nav mesh works fine when the player starts with postion 0,0,0. But when i move the player to another postion it wont work anymore. https://streamable.com/x7r6id You can check it within my project from the old bug report. Just move the player to another position and start the game.
  17. Failure found but i think its important to change something https://streamable.com/mokvna
  18. Yes its only c++. Within my main project sometimes the entitys gets deleted and sometimes not. Here is this file as well (care its 1.7 GB). If you press enter the new map gets loaded. WildWest-05022024.zip
  19. Hello, the following error occurs when loading the map: Enitiys with components containing shared_ptr are also loaded in the new map. I noticed this with my animator component. However, when creating the demo project I noticed that the door is also included in the new scene. However, I also have components in my other project where I set shared_ptr as variables and which do not cause a problem. Could it be related to the flowgraph parameters? As this is my only component where I use it. https://streamable.com/a0g6p4 You can reproduce the error (at least for the animatior) if you commend like this bool Animator::Load(table& properties, shared_ptr<Stream> binstream, shared_ptr<Map> scene, const LoadFlags flags) { //this->model = this->GetEntity()->As<Model>(); this->animationName = properties["animationName"]; this->animationSpeed = properties["animationSpeed"]; this->loop = properties["loop"]; this->bleed = properties["bleed"]; this->autoplay = properties["autoplay"]; return true; } the door is still geting transfered within the new map. Demo Project: AnimatorBug.zip
  20. Gizmo for Entity Manipulation: Positioning objects within a single viewport becomes challenging without the aid of a gizmo. Viewport Layout Toolbar Buttons: Introducing toolbar buttons to the viewport facilitates swift layout changes. Simultaneous Editing of Multiple Selected Terrains: Currently, adjacent terrains can only align with a flat edge, posing an issue when dealing with mountainous regions on the edges. Enabling the ability to adjust the height of multiple terrains simultaneously would address this limitation. Automatic Adjustment Function for Selected Terrain Lengths: In continuation of the previous point, a convenient automatic feature to adjust the length of terrain between two selected terrains would streamline the editing process. Spline tool to create roads and rivers. A tool to create an road or an river would be nice.
  21. Since we want to create a component library, I would like to make my contribution to it. This small component makes it possible to play and stop animations for models. Various settings are available: AutoPlay: Actually self-explanatory. If this option is activated, the animation is played directly at startup. Loop: If activated, the animation is played in a loop. Name: The name of the animation. Speed: The speed of the animation. Bleed (255): Animation bleeding. In addition, there are two inputs for the Nodegraph: "PlayAnimation" and "StopAnimation". These functions can also be called via C++. Screenshots: Animator.zip
  22. Hi, it looks like there is a bug with the collider creation or loading via the editor. TestModel.zip
  23. Send you the project link via pm
×
×
  • Create New...