У нас вы можете посмотреть бесплатно I Built a GPU Softbody Physics Engine from Scratch или скачать в максимальном доступном качестве, видео которое было загружено на ютуб. Для загрузки выберите вариант из формы ниже:
Если кнопки скачивания не
загрузились
НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если возникают проблемы со скачиванием видео, пожалуйста напишите в поддержку по адресу внизу
страницы.
Спасибо за использование сервиса ClipSaver.ru
#gamedev #shaders #opengl In this video I decided to test my knowledge of compute shaders and programming to code a GPU-Accelerated Softbody Physics Simulation. I decided to make the project with modern low level OpenGL and C++ and the GPU-Accelerated part of the project is made possible by glsl Compute Shaders. For those of you who don't know, Compute Shaders leverage thread parallelism and GPU acceleration to perform tasks which would usually be done on the CPU, on the GPU in order to speed up tasks. It isn’t really practical in most cases to use them for softbody simulations, especially in a game development scenario as you would not really have access to information crucial to performing CPU Side operations, but this was purely for experimentation. There are usually 2 ways to code a softbody simulation: there is the spring mass model and the gas model. In this video we’ll be implementing a softbody simulation that adheres to the spring mass model, both because it is more performant, and because more tasks can be performed in parallel with compute shaders. I’ll first explain collision detection, which in a softbody simulation is just solving the point in polygon problem. This problem is actually extremely difficult to solve in a robust manner because there are a large number of edge cases which need to be accounted for which make the problem difficult to resolve in an accurate and efficient manner. To this day I am convinced that there is no good way to solve this problem efficiently because of floating point precision limitations and use cases where the algorithm needs to be modified. Once collisions are detected a collision resolution algorithm needs to be implemented to resolve edge vs point collisions due to the fact that softbody simulations are usually made up of point masses connected to form shapes. Resolving the positions of point masses is one thing but we also need to update velocities accordingly. Because I couldn’t think of a good way to update velocities I had to consult an article about the 2D softbody physics of jelly car where they used physics related to the coefficient of restitution and represented the edge and point collision as a billiard ball collision which greatly simplified the problem of updating velocities. Finally, to help our soft bodies maintain shape, we can connect point masses with springs that apply hooke’s law and damping in order to make sure that points are correctly distanced from each other. A further constraint to ensure that soft bodies adhere to their original form is shape matching where imaginary springs are attached between a point and its predicted position in an imaginary frame. This is an overview of what will be covered in the video, feel free to skip around as I know the video is quite long. The source code is also linked below in case you want to check out some of the inner workings of my project. I Built a GPU Softbody Physics Engine from Scratch Join my Discord! / discord Timestamps 0:00 - Intro 1:15 - Compute Shader Discussion 5:45 - OpenGL GPU Pipeline Architecture 10:00 - Point Mass Integration 11:31 - Line Rendering and Edges 12:01 - Softbody Object Hierarchy 13:44 - Collision Detection(The “SIMPLE” Point in Polygon Problem) 18:06 - Collision Resolution(Position) 24:06 - Collision Resolution(Velocity) 26:54 - Spring Constraints 28:56 - Shape Matching(Imaginary Springs) 30:10 - Outro Links: Source Code: https://github.com/Biped-Potato/GPU-S... The Point In Polygon Problem: https://en.wikipedia.org/wiki/Point_i... Jelly Car Article: https://www.gamedeveloper.com/program... Music Used: ♪ Marshmellow (Prod. by Lukrembo) Link : • lukrembo - marshmallow (royalty free ... ♪ Biscuit (Prod. by Lukrembo) Link : • (no copyright music) lofi type beat “... ♪ Onion (Prod. by Lukrembo) Link : • (no copyright music) lofi type beat “... LAKEY INSPIRED - ♪ Better Days Link : • LAKEY INSPIRED - Better Days Super Circus Kevin MacLeod (incompetech.com) Licensed under Creative Commons: By Attribution 3.0 License http://creativecommons.org/licenses/b... The Legend of Zelda: Wind Waker - Outset Island