HeroEngine Forums

HeroEngine Developers => Developer Created Tutorials => Topic started by: Prometheus2012 on Oct 17, 16, 10:36:48 AM

Title: ART - Simple Puddle Decal
Post by: Prometheus2012 on Oct 17, 16, 10:36:48 AM
Here is a neat trick for making puddles. This works best with flat surfaces such as roads or pavements, but you could make the plane any shape you want really.

First you start off by making a simple plane any size you want and then apply a texture with a rough puddle shape and a texture with a transparency in the diffuse alpha.

The texture is what makes the shape of the puddle here, so no need to make the mesh into a fancy puddle shape.

Make sure to select Gradient as alpha mode on the hero material.

Once you export to game, you can give it some "reflection" using a cubemap in the environment settings.

(https://s21.postimg.org/xt8jhwx3b/puddles.png)

I have attached all the files to this post including the max, textures and HGM.
Title: Re: ART - Simple Puddle
Post by: ToY-Krun on Oct 17, 16, 10:38:27 AM
awesome dan!
Title: Re: ART - Simple Puddle Decal
Post by: Prometheus2012 on Oct 17, 16, 10:46:33 AM
You can then turn physics off for the mesh to save on some overhead as you wont need to interact with it.

Place it as a decal anywhere you want. Feel free to post up experiments of your own.

It wont react like water when you step on it and ive yet to figure out how to give a surface actual reflection rather than just displaying a cubemap.

If anyone has a clue or though on that kinda thing, would be cool to do those as it would give us all realistic puddles. Although saying that, im thinking that having fully physics reactive puddles with reflection would be a real killer.

So this is a cheap alternative for now.
Title: Re: ART - Simple Puddle Decal
Post by: ToY-Krun on Oct 17, 16, 10:51:21 AM
well.. there is the "water/mirror" asset, however not as easily shaped as you can do with your plane, unless you used a ribbon type, but you can use the "plain_ripple" setting for a mirror, but yeah it then double renders everything so its not advised to use them in wide open areas etc.


and example:

(https://i.gyazo.com/ce8e980de7fa8494b8d860d47016704b.png)


Your plane and example shows well how to give the "illusion" of reflection while maintaining your resources :)
Title: Re: ART - Simple Puddle Decal
Post by: Prometheus2012 on Oct 17, 16, 11:07:25 AM
Aye i had played with the ribbon water for puddles but the performance factor made me look for other alternative methods.
Title: Re: ART - Simple Puddle Decal
Post by: ExileOnline on Oct 29, 18, 03:32:33 AM
Just a small update. This puddle technique is also good for pools of blood or toxic sludge.

Just play around with the diffuse colours on the property panel ingame