GPU Particle Sprite Water
What this tutorial will show you how to create.
What you'll need
An FBX of your fountain mesh.
An FBX plane that fits in the base of your fountain (this will be a water shader)
This tutorial will assume you have a (very) basic understanding of particle systems in UE4.
The next basic steps are as follows.
Create a new particle system. Organize your content folders as you go, helps with finding things later. Place it where you need it to come out of your fountain.
Open up your particle system editor.
Double click on the particle system to open up the editor.
Convert your particle system.
Right click on the black bar, go down to TypeData, and select GPU Sprite.
This process will need two systems, one of which will need multiple emitters.
Lets get rid of these cross hairs.
Create your material.
Create a new material, right click in the content browser and select Material. Place this in whatever folder you feel necessary.
Double click and open up your material editor.
Change the Blend mode to Translucent, you can find this option box by clicking anywhere on the grid of the material editor to bring up the basic material options in the side bar.
Create your material.
Time to use your next Multiply.
Lets finish this off.
Done! You should have something that looks like this.
Time for the spray.
Getting a little faster now
Size by Speed
One last thing before the water is done.
As you can see
You're fountain is nearly there but...
What you'll need
If you don't know how to make these, go into Photoshop, Render clouds, apply an Ocean Ripple filter, and save out. Do this again but with a larger Ocean ripple filter. Generate Normal maps from these two images. As this isn't a tutorial to show you how to make these, but how to use them if you need more clarification you can find various other tutorials online to clarify that process.
Place your Plane into the Fountain.
Next create a Lerp node. To do this Click and press L.
After that create a Fresnel node. Right click on the grid and type Fresnel.
After that Create and Constant node and Convert to Parameter, rename as Fresnel Parameter. Change the value to 1.
Connect the Dark color to Lerp A, Connect Light color to Lerp B.
Connect the Fresnel Parameter, connect to the ExponentIn input on the Fresnel node.
Connect the Fresnel node into the Alpha input of the Lerp.
Create two Multiply nodes.
Connect the Lerp to the first Multiplies A input, and the Depth fade into B.
Connect this Multiply to the second Multiplies B.
Create a Constant. Convert to Parameter, rename Diffuse Multiply. Change value to 1.5.
Connect that to the second Multiplies A.
Input all of this into the Base Color input of your main node.
Opacity and Refraction
Create another Constant node, Convert to Parameter and name it Opacity Fresnel Exponent.
Connect this Constant into the ExponentIn input.
Create a 1-x node. To do this right click and search either 1-x or one minus.
Connect the output of the Fresnel into your 1-x.
Create a Multiply.
Connect the Depth Fade to A, and the 1-x to B.
Create another Multiply, and another Constant.
Convert the Constant to a Parameter, and rename to Refraction. Change the value to 3.
Connect the Previous Multiply into the B of this Multiply, and your Refraction constant into A.
Connect the output of this Multiply into the main Opacity input.
Connect the first Multiply to the main Refraction input.
Ripple Sizes controlled by Normals.
Create an Absolute World Position node. To do this Right click and type in World Position. Select World Position under the Coordinates heading.
Create a Constant, Convert to Parameter, and name this Overall Wave Size. Set value to 1200.
Create a Divide node, to do this click and press D.
Connect the WorldPosition node to the A, and the Overall Wave Size to B.
Create a Mask. Right click and type Mask.
Create two Panners, to do this, click and press P
Also create two constants. Convert both to Parameters. Name one Small Ripples, name the other Large Ripples.
Connect the mask to the coordinate input of both Panners.
Set the value of Small Ripples to 0.75, and the value of Large Ripples to 0.25.
Create two Multiplies.
Connect the first Panner to the A input of the first Multiply, and connect the Small Ripples to the B.
Connect the second Panner to the A input of the second Multiply, and connect the Large Ripples to the B.
Bring in your Normal Maps, connect the first multiply to the input of one Normal Map.
Connect the second multiply to the input of the other Normal Map.
Create an Add node, to do this Click and press A. Connect the first Normal Map to A, and the second to B.
Create a Constant3Vector, Change the color to off white. Not completely white, and not into grey.
Create another Multiply node. Connect the Add node to the A of the Multiply, and the Constant to the B.
Connect the main output of that multiply into the main input Normal.
Wave Speed and Surge Height
Create another Constant node. Convert to Parameter, rename Wave Height. Change value 0.5.
Create a Multiply node, input the Time node into A, and the Wave Height to B.
Create an Absolute World Position. Just like you did before.
Create another Constant node, convert to Parameter and name it Speed and Surge Divisor.
Change the value 20.
Create a Divide node. Input the World Position into A, and the Speed and Surge Divisor to B.
Create two Mask nodes. Turn one to just R channel, and the other to just G channel.
Input the divide node into both Masks.
Create two Add nodes. Input the multiply into both Add A.
Input Mask R into the first Add B, input Mask G into the second Add A.
Create two Sine nodes. Right click and type Sine.
Input one add into one Sine, repeat for the other.
Create two ConstantBiasScale Nodes. Right click and type Constant Bias and select the correct node.
Create another Add node, input the first ConstantBiasScale into A, and the second into B.
Create a Constant2Vector node.
Create an Append node. Right click and type Append.
Connect the Add into the Append B, and the Constant2Vector into A.
Create another Multiply.
Create a Constant, convert to Parameter, rename Wave Height Surge. Change value to 10.
Input your Wave Height Surge to A, and the Append to B.
Connect the Multiply to the World Position input on the Main node.