-
Posts
24,629 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Downloads
Everything posted by Josh
-
-
I added multiply and divide operators for iVec classes. However, it makes sense to me that the code would not compile if a numeric literal comes first in the operation.
- 1 reply
-
- 1
-
The center of the controller is at the foot. The center of a cylinder model is its center. The cylinder model will be offset from the controller pivot by the cylinder height divided by two. Does this address your issue? #include "UltraEngine.h" using namespace UltraEngine; Vec3 mousepos = Vec3(0.0f); float move_adjustment = 0.1f; float move_speed = 1.0f; float lookspeed = 0.1f; float looksmoothing = 0.5f; bool enable_camera = false; 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 world auto world = CreateWorld(); world->SetGravity(0.0f, -0.1f, 0.0f); //Create a framebuffer auto framebuffer = CreateFramebuffer(window); //Create a camera auto camera = CreateCamera(world); camera->SetClearColor(0.125); camera->SetFov(70); camera->SetPosition(0, 2, -5); //Create a light auto light = CreateDirectionalLight(world); light->SetRotation(35, 45, 0); light->SetRange(-10, 10); auto floor = CreateBox(world, 100.0f, 1, 100.0f); auto thing = CreateCylinder(world); thing->SetColor(1, 0, 0); thing->SetPosition(-2.0f, 10.0f, 0.0f); auto controller = CreatePivot(world); controller->SetPhysicsMode(PHYSICS_PLAYER); controller->SetCollisionType(COLLISION_PLAYER); auto player = CreateCylinder(world); player->SetParent(controller); player->SetPosition(0, 0.5, 0); player->SetColor(0, 1, 0); player->SetCollider(nullptr); controller->SetPosition(2.0f, 10.0f, 0.0f); controller->SetMass(1.0f); //camera->SetParent(controller); //Reads as the set position above, but appears to start at a lower position. Gravity has been slowed to better see it at startup. auto c_pos = controller->GetPosition(true); auto p_pos = player->GetPosition(true); Print("Controller Position : " + String(c_pos.x) + ", " + String(c_pos.y) + ", " + String(c_pos.z)); Print("Player Position : " + String(p_pos.x) + ", " + String(p_pos.y) + ", " + String(p_pos.z)); //Main loop while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false) { if (window->KeyHit(KEY_F2) == true) { camera->SetWireframe(!camera->GetWireframe()); } if (window->KeyHit(KEY_F3) == true) { camera->SetDebugPhysicsMode(!camera->GetDebugPhysicsMode()); } if (window->KeyHit(KEY_F4) == true) { enable_camera = !enable_camera; } if (window->KeyHit(KEY_F5) == true) { auto c_pos = controller->GetPosition(true); auto p_pos = player->GetPosition(true); Print("Controller Position : " + String(c_pos.x) + ", " + String(c_pos.y) + ", " + String(c_pos.z)); Print("Player Position : " + String(p_pos.x) + ", " + String(p_pos.y) + ", " + String(p_pos.z)); } if (enable_camera) { auto _displaySize = window->GetSize(); float cx = Round((float)_displaySize.x / 2.0f); float cy = Round((float)_displaySize.y / 2.0f); auto mpos = Vec3(window->GetMousePosition().x, window->GetMousePosition().y, window->GetMousePosition().z); window->SetMousePosition(cx, cy); mpos = mpos * looksmoothing + mousepos * (1 - looksmoothing); auto dx = (mpos.x - cx) * lookspeed; auto dy = (mpos.y - cy) * lookspeed; auto camrot = camera->GetRotation(); camrot.x += dy; camrot.y += dx; camera->SetRotation(camrot); mousepos = mpos; auto speed = 0.1f; if (window->KeyDown(KEY_SHIFT) == true) { speed = speed * 10.0f; } if (window->KeyDown(KEY_W) == true) { camera->Move(0, 0, speed); } else if (window->KeyDown(KEY_S) == true) { camera->Move(0, 0, -speed); } if (window->KeyDown(KEY_A) == true) { camera->Move(-speed, 0, 0); } else if (window->KeyDown(KEY_D) == true) { camera->Move(speed, 0, 0); } } world->Update(); world->Render(framebuffer); } return 0; }
-
Fixed in next build.
- 1 reply
-
- 2
-
QUESTION: Are there any limits to what we do?
Josh replied to scel5525pro2's topic in General Discussion
Eventually, but I don’t have any schedule for that yet. -
QUESTION: Are there any limits to what we do?
Josh replied to scel5525pro2's topic in General Discussion
Mobile is not supported yet, but Oculus Quest support is a high priority, and it’s running on Android. Basis universal texture format is supported. This provides an intermediate texture compression format that works with both PC and mobile. -
1.0.3 Project manager now shows a dropdown box to select the template. The Lua project template doesn't include anything except a Lua icon, but it's there. Project manager window no longer a child of the main window, so it will appear in the toolbar if the main window is hidden. "Create subfolder" checkbox removed from project creation dialog because it's pointless.
-
1.0.3 Removed unused Box2D library inclusion. Removed Enet-based networking classes, since they are not useful for modern networking, and the Lua debugger no longer relies on this. I recommend using the Steamworks peer-to-peer system for networking.
-
1.0.3 Shader source files moved into "Source/Shaders" folder, and "Compile Shaders.bat" moved into main project folder. You may want to uninstall / reinstall the current version to purge deleted files from the template.
-
1.0.3 Updated C++ library, small refactoring of undo system internals.
-
1.0.3 Finished undo system.
-
1.0.3 Undo system now working with everything except environment/map properties. Undo is supported for terrain painting and sculpting, because Ultra loves you and wants you to be happy.
-
QUESTION: Are there any limits to what we do?
Josh replied to scel5525pro2's topic in General Discussion
The install and update system logs activity on our server and includes IP address and user ID. It only logs the calls the client application makes to the server for installing and downloading updates, not any activity or information that occurs on your computer. You do not have to mention Ultra Engine anywhere in your game (credits, documentation, etc.) There is this in the EULA: However, I am going to remove the part about "what we judge to be threatening or obscene" (it's boilerplate) because it is not my job to make moral judgements about what you make with the engine, and U.S. law will suffice. Additionally, the license that is being sold right now cannot be used in military or government contracts, or by companies with excess in 100,000 USD annual revenue. (I plan to offer an enterprise version in the future for these customers.) https://www.ultraengine.com/eula -
1.0.3 Undo system almost done, now works with all editor actions except navmesh and terrain. Entity component storage in map files changed.
-
I want to create a scifi level with AAA quality in a reasonable time frame. I'm researching ways to create this specific style of textures and models: The 3D modeling is not so much a problem, but texturing this stuff is. What makes these look good is the wear and tear along the edges. Below may not be the best image, but I think it communicates the idea: My question is, is there an efficient art pipeline and tool that can do exactly what I want? I'm guessing it would involve inputting an image that just has the different parts defined by a solid color, or maybe a vector image, and then you can easily and quickly add a background, some corrosion and wear around the edges, and maybe stamp some details on there, then output diffuse / normal / metal / roughness / ao? Sustance Painter is the only thing I know of that might do this, but if there is a simpler more focused tool I would consider using that. I can't remember, but I thought there was a photoshop plugin that did stuff like this? I'm really looking for a total solution with all the pre-made details ready to go, not a bunch of filters I can maybe hack together myself. I would like to find a method where I can just setup some predefined styles and quickly process images in a few minutes, to produce a large volume of content efficiently. Your thoughts?
-
1.0.3 First implementation of undo/redo. Currently only supports create, delete, and translation tool.
-
1.0.3 Implemented cut/copy/paste. Did not test thoroughly but it basically works.
-
1.0.3 Base grid size changed to 0.16 like in Leadwerks, so the texture mapping and geometry can line up easily. This can be changed in the options.
-
Fixed, I think.
-
1.0.3 Added optional track argument to Model::Animation method, for playing multiple animations at once. As long as the animations don't affect the same node in the same way (translation, rotation, scale) you can have multiple animations running on one model. Each track can be thought of as a separate animation manager, with a separate stack of animations it will transition throughout. Removed bone argument in Model::Animate. Added Bone::Animate and Bone::StopAnimation methods. Fix components not calling Start method in LoadMap function. This video demonstrates a model with three animations being played at once, using three different tracks: Here is the code that does this: auto model = LoadModel(world, "Models2/Assets_-_sci_fi_scenery.glb"); model->Animate(0, 1.0f, 250, ANIMATION_LOOP, 0, 0);// sequence 0 on track 0 model->Animate(1, 1.0f, 250, ANIMATION_LOOP, 0, 1);// sequence 1 on track 1 model->Animate(2, 1.0f, 250, ANIMATION_LOOP, 0, 2);// sequence 2 on track 2 In this case, the animations are all the same duration, but they don't have to be.
-
I tried to make it so each component header would automatically register its own class, but this is not really possible in C++: https://en.cppreference.com/w/cpp/language/siof
-
First pass at per-bone animations, combining upper body and lower body actions. This is all it takes to control this animation: //Load a model auto model = LoadModel(world, "Models2/merc/merc.mdl"); auto bone = model->skeleton->FindBone("spine_01_Military_Male"); //Main loop while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false) { if (window->KeyDown(KEY_UP)) { model->Animate("walk", 0.4); } else { model->Animate("idle", 0.4); } if (window->KeyHit(KEY_SPACE)) model->Animate("shoot", 0.25, 100, ANIMATION_ONCE, 0, bone); world->Update(); world->Render(framebuffer); }
-
1.0.3 Added optional parameter in Model::Animate that allow you to specify a bone for the animation to start at. This can be used to combine animations on the upper body with a different animation on the lower body, for example.
-
1.0.3 3-viewport layout changed to one on top and two on bottom. Added project manager into editor. May be buggy, but let's see how it goes.
-
1.0.3 Main window titlebar will now display the current map file.