Jump to content

Josh

Staff
  • Posts

    23,307
  • Joined

  • Last visited

Everything posted by Josh

  1. Ultra only uses frustum culling. People seem to have very little tolerance for the artifacts that GPU occlusion culling involves, so in the future I am more likely to look into some type of BSP system. Why would you want to render everything in the world that is out of the camera's view?
  2. That is possible. The UI rendering in Vulkan is something I have put off because I want to work on the editor right now.
  3. You need to create the 3D camera before the UI camera, or call camera->SetOrder() to adjust the order they render in.
  4. Other than setting the light quality, you don't have that much control over directional lights. They can only cover a limited area. In Ultra I plan to have a command like Light:SetShadowDistance(range, stage) to provide more control over this.
  5. In the default main.lua script there is some code that shows stats and FPS. --Render statistics context:SetBlendMode(Blend.Alpha) if DEBUG then context:SetColor(1,0,0,1) context:DrawText("Debug Mode",2,2) context:SetColor(1,1,1,1) context:DrawStats(2,22) context:SetBlendMode(Blend.Solid) else --Toggle statistics on and off if (window:KeyHit(Key.F11)) then showstats = not showstats end if showstats then context:SetColor(1,1,1,1) context:DrawText("FPS: "..Math:Round(Time:UPS()),2,2) end end I usually use a third-party tool like FRAPS because it ensures consistency across all programs.
  6. 1.0.3 Scale mouse tool now works in 2D viewports when global coords is in use, and scaling tool uses grid snapping now to increment the scale changes. I looked at Blender's quad view and the controls in the 2D viewports are really bad, it seems like they are just an afterthought.
  7. 1.0.3 Rotation mouse tool now works in 2D viewports, only when global coordinate system is in use. Really need to replace the widget with something made out of rings, but it works. Usage is like in 3ds max, so you can rotate on all three axes in any 2D viewport.
  8. 1.0.3 Added rotation mouse tool. This one works similar to rotation in 3ds max and Blender, again this one is much better than what I did in Leadwerks., and works with both local / global coords. I just made the widget out of three cylinders because my 3ds max subscription expired, but it can be replaced by overwriting UI/widgets/rotate.gltf.
  9. 1.0.3 Added scaling mouse tool. I think it works really well, with local or global coords / axis. This was hard to get right but I think it is working correctly, even in difficult / weird situations. Much better than the implementation in Leadwerks. Edit modes and tools are now actually selectable, so a lot of buttons were removed and will be added back in as I implement each button's functionality. Under the hood there's now a system that actually changes the editor mode and tool, instead of it just being hard-coded. Added a "Utilities" tab in the main side panel. I plan to use this for small dialogs instead of using a million small tool windows. Console now scrolls to the bottom when new text is added.
  10. 1.0.3 Translation on global / local coordinates now work Translation mouse tool is about 520 lines of code.
  11. In Ultra Engine, there is a new command that has not been documented yet called PopupMenu().
  12. I don't understand what you are trying to do. Maybe if you post your whole code someone can see what needs to be changed.
  13. You can do either of these: entity:SetPosition(x, y, z) entity:SetPosition(Vec3(x, y, z)) It mostly just depends on what the variables you want to use are. Both variations are included for convenience. If you already had a Vec3, it would be easier to use the command that accepts a Vec3, otherwise the individual parameters are probably easier.
  14. Some stuff I was experimenting with a while back, just posting here before I delete it: <?php $mode = $_GET["mode"]; $OPENAI_API_KEY = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxx'; // Chat if ($mode == "text") { $URL = 'https://api.openai.com/v1/chat/completions'; $content_type = 'application/json'; $messages = array( "Hello!" ); $data = array( 'model' => 'gpt-3.5-turbo', "messages"=> $messages, ); } // Image generation else if ($mode == "image_new") { $URL = 'https://api.openai.com/v1/images/generations'; $content_type = 'application/json'; $prompt = 'dirt rocks seamless tiling texture quixel'; $num_images = 1; $size = '512x512'; $response_format = 'url'; $format = 'png'; $data = array( 'prompt' => $prompt, 'num_images' => $num_images, 'size' => $size, 'response_format' => $response_format ); } // Image variation else if ($mode == "image_variations") { $URL = 'https://api.openai.com/v1/images/variations'; $image = curl_file_create(__DIR__ . './boberroof01.png'); $n = 1; $size = '512x512'; $response_format = 'url'; $format = 'png'; $data = array( 'n' => $n, 'size' => $size, 'image' => $image, 'response_format' => $response_format, ); $content_type = 'multipart/form-data'; } $curl = curl_init($URL); $headers = array( 'Content-Type: ' . $content_type, 'Authorization: Bearer ' . $OPENAI_API_KEY ); $payload = json_encode($data); curl_setopt($curl, CURLOPT_POST, true); curl_setopt($curl, CURLOPT_POSTFIELDS, $payload); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLOPT_HTTPHEADER, $headers); $response = curl_exec($curl); echo $response; $responseObj = json_decode($response, true); if ($mode == "text") { echo($responseObj['choices'][0]["text"]); } else if ($mode == "image_new" || $mode == "image_variations") { $imageUrl = $responseObj['data'][0]['url']; echo('<html><body><img src="'); echo($imageUrl); echo('" /></body></html>'); } ?>
  15. 1.0.3 Finished the behavior of the translation mouse tool. This was actually probably the hardest remaining task and now it is done. Drag positioning operates in the same manner as Leadwerks. Added Edit > Align to Grid menu item. Some improvements to the 3D grid appearance.
  16. The scrollpanel widget here might help; https://github.com/UltraEngine/Extras/tree/main/Code/C%2B%2B/CustomWidgets
  17. if window:KeyDown(Key.Space) and self.entity.position.x > 0 then
  18. That looks great. The animations are very smooth.
  19. I deleted and re-uploaded the 9.44 mb file on github.
  20. Those are supposed to be the same files.... A bug in Github's caching system?
  21. 1.0.3 Applied smoothing to viewport movement and mouse look..
  22. 1.0.3 Added grid in 3D perspective view.
  23. Josh

    Editor progress

    Using a shader for the grid gave much better results than trying to construct a wireframe mesh. The grid stretches as far as the camera range goes and has basically zero rendering cost.
  24. 1.0.3 WASD / arrow keys now work when the mouse is hovered over a viewport, without right-clicking into freelook mode.
×
×
  • Create New...