Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Creating procedural puddles?

Discussion in 'Game Design' started by DevMerlin, Apr 13, 2016.

  1. DevMerlin

    DevMerlin

    Joined:
    Dec 21, 2011
    Posts:
    96
    I'm working on a simple game - one that involves water. Up until current I've just been using a circle mesh
    with the water filter applied to it - but I'd like to offer more dynamic puddles then that, as those get old after
    awhile. To do so, I'd like to look at ways to produce dynamically-shaped visible puddles, but I'm not really sure
    of where to start.

    Can anyone suggest a way of doing this, either with an asset or via procedural code? Even tutorials would be a helpful thing to locate, but most seem to deal with a 3D object.
     
  2. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    Well, if you can procedurally make a 3D mesh, you can procedurally make a 2D one.

    So, yeah, I would suggest going through the mesh tutorials at catlike coding.

    Another alternative might be to have your water be a simple flat plane, but the ground be a procedurally generated lumpy mesh. This might be easier since you can start with a simple grid mesh, and then just shift the vertices up/down in accordance with a noise function.
     
    Kiwasi, Martin_H and AndrewGrayGames like this.