{"repo":"RoyTheunissen/GPU-Spline-Deformation","free":true,"listed":false,"github":"https://github.com/RoyTheunissen/GPU-Spline-Deformation","clone":"git clone https://github.com/RoyTheunissen/GPU-Spline-Deformation.git","description":"Baking spline deformation to a texture then applying it to a mesh via a shader.","language":"C#","stars":141,"topics":["unity","gpu","splines","spline","shaders","shader","deformation"],"license":null,"category":"game-templates","readme_excerpt":"Sample for baking deformation to a texture then applying it to a mesh via a shader. About the Project I saw Simon Trümpler's Tileable Liquid Mesh on Spline and I was wondering how the mesh was following the spline exactly. It gave me the idea of baking the deformation to a texture somehow, which actually turned out to be really simple. Video Article Getting Started - Add the package to your Unity project (tips on how to install it are in the Installation section) - Create the mesh you will be deforming that's pointing in the forward Z axis. Samples are provided. - Make sure it has a material with the Deformation Lookup Shader shader. - If the mesh does not start at (0, 0, 0) and stop at (0, 0, 1), adjust the Z Start and Z End properties accordingly. - Implement the IDeformationProvider interface in the script that is responsible for the deformation that you want to bake or use the provided BezierSpline script. - Add a DeformationTextureRenderer script to the scene. I recommend adding it next to the mesh you'll be deforming. - Assign the script responsible for the deformation to the Deformation Provider field. - Assign the material for the mesh that will be deformed (this is necessary for assigning it dynamically created textures) - You should now see the mesh deform along whatever deformation is provided via the script. Troubleshooting - If the mesh is not deforming, check that Amount is set to 1 in the material. This feature exists for quickly toggling the effect on and off ","default_branch":null,"files":null,"tree":[],"storefront":"/r/RoyTheunissen","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/RoyTheunissen/GPU-Spline-Deformation/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}