Friday, October 7, 2022
HomeGame Developmentunity - How one can tear a gap in material sail rendered...

unity – How one can tear a gap in material sail rendered as a airplane mesh animated with a shader?


I’ve a procedurally animated sailcloth. It is only a sq. flat airplane mesh with 144 vertices.
I exploit a shader to govern the vertices and make it “fill” with the wind.
All of that works positive.

Now how would I am going about rendering harm on this flat airplane mesh?
If I had been to make use of a simulated material answer like Obi Material, it comes with tearing and holes out of the field, however the simulation is so costly that it’s unusable for my sport (too many sails).
That is why I switched to shader magic for the sail animation: it performs significantly better.

The issue is how do I am going about making holes/tears into these procedurally animated sails?

They at all times keep as a flat mesh, I’d suppose this should not be the toughest factor to do… However I’m utterly at a loss right here.

The holes will “seem” primarily based on cannonball hits to the sail.
The holes may be anyplace randomly, or at an actual vertex (procedural).
I wish to preserve every little thing procedural( not chopping out holes in blender and switching between meshes, and many others, as we’re a small workforce).

If the holes are randomly positioned on the mesh and dont consider the place precisely the cannonball hit the fabric mesh, then thats positive, I can most likely improve it later to “translate” the hitpoint to the closest vertex later, and go from there to make it extra practical.

I used Amplify Shader for the vertex displacement:
enter image description here

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments