Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Vector Grid - 'Geometry Wars'-style Fluid Mesh System

Discussion in 'Assets and Asset Store' started by mrsquare, Jan 27, 2014.

  1. mrsquare

    mrsquare

    Joined:
    Oct 25, 2013
    Posts:
    281
    Hey,

    The vector grid asset doesn't require a particular shader - it's a physical mesh that is dynamically created at runtime, and then the vertices are re-positioned at the simulated spring points each frame. So while you should be able to use it with your water shader, I don't think it would play nicely with the river tool asset you describe. It's quite dependent on a grid based array of springs, you can't really mould it into an arbitrary shape. Sorry!
     
  2. GhulamJewel

    GhulamJewel

    Joined:
    May 23, 2014
    Posts:
    333
    I made a game with this asset! Thank you very much without it I would not have able to!

     
    Deeeds and mrsquare like this.
  3. mrsquare

    mrsquare

    Joined:
    Oct 25, 2013
    Posts:
    281
    Looks great! :) Thanks for sharing
     
  4. monsieurA

    monsieurA

    Joined:
    Oct 7, 2012
    Posts:
    9
    Hello, the asset looks great.
    I would like to "lock" grid point around static objects, it is possible?
     
  5. mrsquare

    mrsquare

    Joined:
    Oct 25, 2013
    Posts:
    281
    Hey - yep, absolutely, you can 'lock' individual grid points to a position so that they won't ever move. You can't do this in the editor (as the grid points are only created at runtime), so you'd need to do some calculations from a script to work out exactly which grid points you want to affect, but once you've done that it's just a case of setting a boolean value on grid point.
     
  6. PendingFox

    PendingFox

    Joined:
    Jan 15, 2017
    Posts:
    42
    Hi mrsquare,

    Just wondering if it's possible to achieve this or something similar to this using your script?



    I'm developing a runtime editor which Ideally should have a viewport similar to C4D/Maya/Max etc. with dynamic grid zooming(shown in img above). Ideally I'm looking for a shader for performance sake but I'm open for ideas.

    Thanks in advance.
     
  7. mrsquare

    mrsquare

    Joined:
    Oct 25, 2013
    Posts:
    281
    Hey - cool effect, but don't think Vector Grid would be well suited for that I'm afraid. Modifying the grid dimensions is a relatively costly process as it's a physical mesh so therefore needs to rebuild all the vertex lists etc. each time the layout changes - if you're concerned about performance then it probably wouldn't be ideal.
     
  8. Deeeds

    Deeeds

    Joined:
    Mar 15, 2018
    Posts:
    739
    Wonderful looking thing, this! Incredible, in fact.

    On infinite scrolling, is it possible to control (dynamically) the rate of scrolling, and even go backwards and forwards, on demand (at ever differing speeds), based on player movement?
     
  9. mrsquare

    mrsquare

    Joined:
    Oct 25, 2013
    Posts:
    281
    Hey - yeah, absolutely, the scroll function just takes a Vector2 as an argument, so its totally up to you how fast/slow you want to scroll it. And no problem at all to go backwards :)
     
    Deeeds likes this.
  10. Deeeds

    Deeeds

    Joined:
    Mar 15, 2018
    Posts:
    739
    Brilliant!!!

    And, thank you!!! This is even more wonderful!
     
  11. Bamboy

    Bamboy

    Joined:
    Sep 4, 2012
    Posts:
    41
    I love this asset, so I'm finally getting around to sharing!

    I used VectorGrid for character deformations in my "worms" style game: https://bamboy.itch.io/asteroidians
    (Gifs are old, and the online multiplayer doesn't work well)

    And just recently, I used VectorGrid as a background for a Tetris-breakout mashup for Ludum Dare 41. https://fluffy.itch.io/brickris-tetout

    I'd love to see new updates for this asset. Any plans?
     
  12. quytech

    quytech

    Joined:
    Jun 18, 2018
    Posts:
    5
    Hi mrsquare, i bought Vertor Grid tool, tired to use on other mesh like human body, cube, capsule, etc imported from maya and 3dsMax. so my question is how to replace grid to mesh in this Grid Vector tool? or how to use without grid of this vector grid tool.
     
  13. mrsquare

    mrsquare

    Joined:
    Oct 25, 2013
    Posts:
    281
    Hey - thanks! Always nice to see assets getting put to use :)

    Busy day job and lack of ideas means that I'm not actively developing it at the moment (beyond doing the occasional bit of support) but if you've got any feature requests them I'm all ears!
     
  14. mrsquare

    mrsquare

    Joined:
    Oct 25, 2013
    Posts:
    281
    Hey - I'm afraid you can't really use it as a substitute for an existing mesh, its very much designed to be used in either flat or spherical configurations. I know people have constructed eg. cube meshes by combining 6 regular vector grids in a cube formation, but you can't just use it as a drop-in replacement for an arbitrary mesh shape.
     
  15. NnelGdaBandit

    NnelGdaBandit

    Joined:
    Dec 21, 2012
    Posts:
    18
    Hey @mrsquare,

    I hope you're doing well, we last talked what it feels years ago. I just wanted to let you know that a modified version of this is in our game Glitch's Trip.



    Thanks again for making this cool asset!
     
    mrsquare likes this.
  16. RendCycle

    RendCycle

    Joined:
    Apr 24, 2016
    Posts:
    329
    I'm interested in this asset and seems to be what I need. Before purchase, one important thing I have to know though is can the four corners of the Vector Grid be attached to different Game Objects and can follow its movement in world space? The Game Objects will carry the Vector Grid and should be able to move it around...
     
  17. mrsquare

    mrsquare

    Joined:
    Oct 25, 2013
    Posts:
    281
    Hey - hm, not really I'm afraid. The simulation is all done within the Vector Grid code itself, so it isn't as simple as just parenting a particular vertex to another gameobject. You could manually update the position of the corner vertexes to track a gameobject, but I don't think that would give you the desired effect as the rest of the mesh springs would be unaware of the change and would still try to pull back towards their old positions. You'd probably be better off with a dedicated 2D cloth asset I think - sorry!
     
  18. RendCycle

    RendCycle

    Joined:
    Apr 24, 2016
    Posts:
    329
    Shucks... alright. For the Cloth, I can't seem to make it work like a Net and totally bend the middle part like it has something inside it when the 4 corners are hanging upside down using a simple Plane. I also can't find anything in the Asset Store that would work like that and be dynamic and easily configurable too in runtime. I was also looking into your Jelly Mesh. I guess it cannot also do what I require?
     
  19. Funkeys

    Funkeys

    Joined:
    Apr 16, 2017
    Posts:
    64
    Hi mrsqare,
    I am interested in your asset and want to use it to produce a ship wake. To use it with my water shader, I would need to have 3 render textures created form the plane mesh. A heightmap, a normalmap and a foam cover. For the foam cover I would need some modificator I think, but for the other 2 textures would that be possible?

    br
    Funkeys
     
  20. Funkeys

    Funkeys

    Joined:
    Apr 16, 2017
    Posts:
    64
    Hey RendCycle,
    this might help you!
    https://assetstore.unity.com/packages/tools/utilities/uflex-59843
     
  21. RendCycle

    RendCycle

    Joined:
    Apr 24, 2016
    Posts:
    329
    I saw that asset before and was supposed to try it... But it does not support any GPU other than NVidia and the countless bad reviews made me stay away from it. :eek: Also found the free NVidia Flex for Unity (Beta) but it was deprecated just a while ago and it does not have cloth yet.

    Nevertheless, thank you for the suggestion sir! All the best to you. :)
     
    Last edited: Aug 6, 2018
  22. akareactor

    akareactor

    Joined:
    Apr 6, 2015
    Posts:
    80
    Is it possible to use custom material on the grid, to make a smooth surface, visually not a grid?

    P.S. OK, I found the answer :) Render Mode "render the grid as a solid sheet"

    But another question is popped: only spherical collider on the net?
     
    Last edited: Dec 26, 2018
  23. akareactor

    akareactor

    Joined:
    Apr 6, 2015
    Posts:
    80
    Hell, grid smoothing factor works only for Render Mode Grid, but I need smooth surface :( I declined a standard Cloth in favour of this asset only for smoothed grid, but never took it.
     
  24. giantkilleroverunity3d

    giantkilleroverunity3d

    Joined:
    Feb 28, 2014
    Posts:
    151
    I bought this. It would be cool if the wire mess could be a torus. Then with a pressure point on a centered gameobject the ball could swing around making a moving bump around the torus. Could make orbiting pressure inside a pipe.
     
  25. Rangerz132

    Rangerz132

    Joined:
    Feb 3, 2019
    Posts:
    10
    Hi! I just bought Vector Grid and it is fantastic!

    I have a question for you. I'm trying to instantiate different elements in my scene. Those will deform the grid. The problem is that my elements are prefabs and they can't have access to the grid, unless I make my grid a prefab too. When I tried to do it, my elements don't interact with the grid. I did some tests and my elements MUST be directly in the scene with my grid. What should I do?

    Thank you
     
unityunity