Jump to content

Josh

Staff
  • Posts

    23,315
  • Joined

  • Last visited

Everything posted by Josh

  1. Good catch! However, the artifact still appears with this code: if (slope < 5) { terrain->SetMaterial(x, y, grass, 1.0f); } else if (slope < 10) { terrain->SetMaterial(x, y, rocks, 1.0f); } else if (slope < 40) { terrain->SetMaterial(x, y, cliff, 1.0f); } else { terrain->SetMaterial(x, y, snow, 1.0f); }
  2. Okay, I have the same effect, although I had to replace those 0.6 numbers with something higher. Investigating now...
  3. I don't think the JSON material format is very well nailed down right now. I have been sloppy with this.
  4. Josh

    Shader woes

    What does "not running" mean exactly? Does it link with the vertex shader?
  5. And I guess these are the update flags, although I have never used them: /// Crowd agent update flags. /// @ingroup crowd /// @see dtCrowdAgentParams::updateFlags enum UpdateFlags { DT_CROWD_ANTICIPATE_TURNS = 1, DT_CROWD_OBSTACLE_AVOIDANCE = 2, DT_CROWD_SEPARATION = 4, DT_CROWD_OPTIMIZE_VIS = 8, ///< Use #dtPathCorridor::optimizePathVisibility() to optimize the agent path. DT_CROWD_OPTIMIZE_TOPO = 16, ///< Use dtPathCorridor::optimizePathTopology() to optimize the agent path. };
  6. Here are the obstacle avoidance parameters. I don't know what any of these do, I just use the default values: struct dtObstacleAvoidanceParams { float velBias; float weightDesVel; float weightCurVel; float weightSide; float weightToi; float horizTime; unsigned char gridSize; ///< grid unsigned char adaptiveDivs; ///< adaptive unsigned char adaptiveRings; ///< adaptive unsigned char adaptiveDepth; ///< adaptive };
  7. The parameters for nav agents can use are defined in DetourCrowd.h: /// Configuration parameters for a crowd agent. /// @ingroup crowd struct dtCrowdAgentParams { float radius; ///< Agent radius. [Limit: >= 0] float height; ///< Agent height. [Limit: > 0] float maxAcceleration; ///< Maximum allowed acceleration. [Limit: >= 0] float maxSpeed; ///< Maximum allowed speed. [Limit: >= 0] /// Defines how close a collision element must be before it is considered for steering behaviors. [Limits: > 0] float collisionQueryRange; float pathOptimizationRange; ///< The path visibility optimization range. [Limit: > 0] /// How aggresive the agent manager should be at avoiding collisions with this agent. [Limit: >= 0] float separationWeight; /// Flags that impact steering behavior. (See: #UpdateFlags) unsigned char updateFlags; /// The index of the avoidance configuration to use for the agent. /// [Limits: 0 <= value <= #DT_CROWD_MAX_OBSTAVOIDANCE_PARAMS] unsigned char obstacleAvoidanceType; /// The index of the query filter used by this agent. unsigned char queryFilterType; /// User defined data attached to the agent. void* userData; }; I don't think Detour actually has any concept of rotation. I think adjusting max acceleration is the only way to make a larger turning radius. My system just rotates thing in the direction they were last moving, with a smooth blend/transition between angles so they don't jitter.
  8. Can you post some code I can run to produce the error?
  9. Okay, I was trying to determine whether it was a pixel shader problem or whether those were cracks in the geometry
  10. Josh

    Memory Pool

    Yeah, it’s the total VRAM. The Vulcan memory allocator has some commands for fetching mem usage but they are complicated and I haven’t looked into it much yet
  11. Is the camera clear color white, or maybe that is a skybox peeking through?
  12. Josh

    Memory Pool

    I usually use shared pointers so I don't even have to worry about leaks most of the time. You also need to consider that other threads that are running may be allocating memory.
  13. Here's an example of it working. I will have an update up shortly: #include "UltraEngine.h" #include "ComponentSystem.h" using namespace UltraEngine; #define UI3D int main(int argc, const char* argv[]) { //Get the display list 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->SetAmbientLight(0); //Create a framebuffer #ifdef UI3D auto framebuffer = CreateFramebuffer(window); #endif //Create a camera auto camera = CreateCamera(world, PROJECTION_ORTHOGRAPHIC); #ifdef UI3D camera->SetPosition(float(framebuffer->size.x) * 0.5f,float(framebuffer->size.y) * 0.5f); #endif auto font = LoadFont("Fonts/arial.ttf"); auto sprite = CreateSprite(world, font, "AAAAAAAAAAAAA", 26, TEXT_CENTER | TEXT_MIDDLE, 400000.0f); auto ss = CreateSprite(world, 100, 100); ss->SetColor(1, 0, 0); #ifdef UI3D auto ui = CreateInterface(world, font, framebuffer->size); #else auto ui = CreateInterface(window); #endif auto label = CreateLabel("test 1\ntest line 2\ntest 3", 20, 20, 200, 200, ui->background, LABEL_BORDER | LABEL_MIDDLE | LABEL_RIGHT ); //Main loop while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false) { Sleep(10); #ifdef UI3D world->Update(); world->Render(framebuffer); #endif } return 0; }
  14. Yeah, that is the part I have done so far.
  15. Wow, I don't know why but it already looks like a game. I don't know how you guys do it. 😄 Please create a thread in the suggestions forum for any additional ideas you have!
  16. I think it would be something like this: panel->SetShape(Min(mouseposition.x, origin.x), Min(mouseposition.y, origin.y), Abs(origin.x - mouseposition.x) + 1, Abs(origin.y - mouseposition.y) + 1);
  17. Is that the background of the world showing through the geometry, or a texturing problem? Is tessellation enabled? What GPU do you have?
  18. Ultra Engine, at this point, is just a programming SDK for use with Visual Studio. The editor is still in development. It was released now so that people could have it early without waiting for the full editor to be finished.
  19. Okay, there are two game engines this site is related to. Leadwerks is my older engine that is sold on Steam. Its documenation is here: https://leadwerks.com/learn Ultra Engine is the newest and most advanced, with documentation here: https://www.ultraengine.com/learn It sounds like the videos you are referring to are for use with Leadwerks, not Ultra.
  20. Hello, You will need Visual Studio 2022 (free Community version is fine) to open the project solution file (.sln): https://visualstudio.microsoft.com/vs/ From there, you can copy and paste any of the code examples in the documentation into main.cpp and run it. For example: https://www.ultraengine.com/learn/LoadModel?lang=cpp
  21. He deleted my comment! lol
  22. In Leadwerks 2, all the post-processing effects were hard-coded. In Leadwerks 3+ and Ultra a post-processing effects stacks can be defined with Camera::AddPostEffect. This allows for any number of post-processing effects to be displayed in any order, and for new effects to be added. In Leadwerks a post-processing effect can either be a single shader or a script that handles more complex multi-pass effects. In Ultra a JSON file is used to define a series of passes the engine performs to render the effect:
  23. Updated 1.0.1 Fixed Agent::SetMaxSpeed and SetMaxAcceleration not being called under some conditions Multi-line labels in 3D interfaces now working CreateSprite now supports TEXT_TOP, TEXT_MIDDLE, and TEXT_BOTTOM flags, in addition to left, center, right Text sprites are now created with the center in the top-left corner instead of bottom-left (TEXT_TOP | TEXT_LEFT). I'm not 100% sure if this is best, but that is how it is working now
×
×
  • Create New...