Fountain
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.
Once you've opened your project.
The next basic steps are as follows.
Particle System
Open up your particle system editor.
Convert your particle system.
Add a Bounding Box.
This process will need two systems, one of which will need multiple emitters.
Adjust the Lifetime
Min: 0.5
Max: 1
Adding a new Module.
Right click under Color Over Life on the grey section, move down to Velocity, and select Initial Velocity.
Setting values.
Select the arrow beside Start Velocity then select the arrow beside Distribution.
The values are as follows:
Max: X 50, Y 200, Z 50
Min: X -50, Y -100, Z -50
Next module.
Values
Open up Speed Scale and change the Y value to 5 as well as the Max Y Scale to 5.
.
Rotate.
Lets get rid of these cross hairs.
Reminder.
Create your material.
Editor.
Transparency.
First nodes.
Parameters
To do this you're going to right click on the node, and select Convert to Parameter.
Once you've done that.
After that double click on each choose a color for both respectively. Mine will be a dark green and a light green.
Multiply!
Make some connections.
Time to use your next Multiply.
Connections!
Last Multiply.
Lets finish this off.
Save!
Size.
Max: 2 for all
Min: 1 for all
Spawn rate.
Done! You should have something that looks like this.
Time for the spray.
Getting a little faster now
Initial Velocity
Size by Speed
Lifetime again
Min: 2
Max: 3
New modules.
Resilience Constant 3
Resilience Scale over Life Friction 0.5
Set the Response to Bounce.
Next up Constant Acceleration
X 0 Y 90 Z -980
This is how you fake gravity on your particles and have them "fall" from the emitter.
Initial Location
Max: X 2, Y 2, Z 2
Min: X 1, Y 1, Z, 1
Initial Velocity
Max: X 100, Y 200, Z 100
Min: X -100, Y 100, Z -100
Spawn
Duplicate.
To do this right click on the emitter and select Emitter, Duplicate. Do NOT duplicate and share as you will be changing one of the modules.
Change the Velocity.
Max: X 100, Y 100, Z 200
Min: X -100, Y -100, Z 100
The reason you're do this is to have a more bloom effect of your system falling "off" of the first system.
To complete
One last thing before the water is done.
Changes.
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.
Base Color
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.
More Multiplies...
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.
Comment!
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.