Announcement

Collapse
No announcement yet.

Ideas for creating dynamic duct tape?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Ideas for creating dynamic duct tape?

    Hiya,

    I'm working on a VR game where the player can build/construct items/weapons. When the player attaches 2 pieces together, I'd like to add duct tape dynamically.
    I did some R&D, and the closest thing is using the Spline tool to cover the bounds. Still no idea on how to implement it, but seems like an idea.

    What are your thoughts on how I can achieve this? (Please see image)

    Attached Files

    #2
    If it's not that many configurations, it'd be much much easier to pre-make those meshes.

    Comment


      #3
      Originally posted by darthviper107 View Post
      If it's not that many configurations, it'd be much much easier to pre-make those meshes.
      There will be a lot of combinations. I'm mostly thinking about the cylinder taped to the iron at the back. It could be a thicker piece of iron, or it could be a thinner gas cylinder.

      When you say pre-make, you mean model the gas cylinder with the duct tape, and when the player attaches it, just reveal/spawn that piece?
      It does give an idea... maybe I can model the tape piece/pieces, then spawn the correct one based on which combination the player happens to put together.

      Comment


        #4
        I mean the tape pieces, have a number of them that you could switch out depending on the configuration. Also, if you can, try and make it a part of one of the other meshes, so maybe that canister has the tape mesh as a part of that mesh, rather than having the tape mesh as a separate mesh so that it reduces the number of draw calls. At least if it's simple enough in terms of the number of combinations.

        Comment


          #5
          Perhaps you could spawn in a circle of points in an array with a diameter slightly larger than the object you are taping. The number of points is equal to how many vertices are in your spline. With each point, trace towards the center of the circle, and if it hits the mesh then you set the point's position to that location.

          After you iterate through each point, find out which points are concave (going inwards) relative to the two points around it. For each point that is concave, you move the point (using its angle with the two points around it) until the three points form a straight line. This creates those duct tape "bridges" over gaps such as the ones between the fuel tank and the pipe in your screenshot.
          EDIT: Oh yea, some concave areas may consist of multiple points, so your implementation of "unconcaving" your points should handle this possibility.

          Once that is done, just create your duct tape spline using those points.

          Since this is really only going to be done once per duct tape created, it shouldn't be performance-heavy either. Obviously, more points means better looking tape.
          It's a bit complicated for just creating tape, but it's the most dynamic implementation off the top of my head. I believe this should work.
          Last edited by Lexeon; 06-22-2019, 07:11 AM.

          Comment


            #6
            Thank You! Your input/advice is much appreciated.
            Cheers!

            Comment

            Working...
            X