Welcome

I want to build a Virtual World in Unreal Engine,  with the purpose of educating Fluid Dynamics.  Still a lot of work has to be done.

Update October 2017. After a long time following courses on how to build in Unreal Engine, I finally have started with building blueprints. Busy building a watersystem

Update may 2017. I have reactivated the project. Was too busy with ordinary work :-). I am following a course on Udemy (Unreal Engine 4: How to Develop Your First Two Games) to get my skills on a higher level.

Share Button

Vectors

Tutorials and notes on vectors

Documentation vectors

Documentation splines

Documentation transforms

Documentation transformation

Documentation Spline Mesh

Set end offset

Share Button

Tutorial Lighting

Share Button

Main water system in Unreal

The dynamic water system on land is programmed as a blueprint.
BP_Watersystem contains both the logic and the assets of the water system. The backbone of the BP_Watersystem is a spline with points. The points represent a change in the water system, for example: input discharge, different structure (pipe, channel, weir..), different dimension. So each point (=Node) is connected with the database WaterSystemData. So in between 2 points (=branch) of the backbone spline, everything is the same, based on the information of the downstream point.. Spline and point represent the bedlevel of the structure.
Index 0 spline is downstream
With a weir the distance between 2 points is the length of the weir!
With a manhole the distance between 2 points is length and width of the manhole.

 

https://prezi.com/p/fff_kshz1l-s/

 

 

branch 0
Connector : my_Name
zDelta : YlevelDownstreams

When type is outflow
Velocity : Velocity upstreams (u2)
InputDischarge : Velocity at point

 

Notes:

  • BP_Watersystem is one line with no branches and has a fixed direction of flow.
  • A dendritic system is possible, because the 3D world may contain different BP_Watersystems which are connected at points. When calculation a dendritic system the sequence of making calculations is important.
  • Strategy for calculating the water-system.We assume a stationary flow. So new calculations are only made when changes are made to the water-system. In the future calculations will be made per time-step and change in storage will also be taken into account.
  • To get access to the information, or to change information menu are used.
    Link to page Navigation

Formulas used

BP_Watersystem has 2 different type of points

  1. Nodes : points of the spline. Same numbers as in spline
    Change : type, direction, discharge, dimensions
  2. Calculation Points: Only to get more accurate calculations.
    Interpolation between 2 Nodes.
    Used when drawing yline and Hline. Not used for drawing other objects.

Array WaterSystemData_Total contains information on the Nodes and the calculation points. Calculating the H and y is based on this database.

Points 0 and 1 can’t have InputDischarge.
Input of discharge is assumed  just upstream of the node, so is already flowing at the node. So the Inputdischarge is included when calculating the velocityhead

  1. Draw BP_Watersystem , start from downstream. Point 0 (= downstream point) is the locatie where the watersystem connects to another system. This could be a lake or sea where the velocity becoms 0 or almost 0. So the default parameters for each BP_Watersystem are
    – Name (text)
    – ConstructionVis (boolean)
    – YlevelDownstreams (float)
    – VelocityDownstreams (float)
    – Rotationtext (float)
  2. (BP_Watersytem) Function FillWaterSystemDataBasic puts the coordinates,  direction and length in array WaterSystemData
    Number Node
    -Coordinates World 
    – Coordinates Local
    – Length
  3. (UI_WaterSystemMainMenu) Enters the Data input from the panel for the selected point in the WaterDataStruct :
    StructureType (Trapezium, Rectangel, Weir, Pipe, Pump, Culvert, Manhole, outflow)
    InputDischarge (pump: pump capacity, outflow: velocity downstreams)
    -Connector (Names of BP_Watersystems, which are connected at this point)
    -Width (pipe: diamter, channel:bed-width, weir: width)
    SlopeLeft
    SlopeRight
    -Surface Level World
    Crest Level World
    Coefficient (channel:Manning, pipe:Chezy, weir: Coefficient)
    -Divide Length (Max length between calculation points
    -zDelta (for example when bedlevel pipe is different bedlevel channel, pump: switch on level)
    HLineVisible
    yLineVisible
    zPointVisible
    IndexVisible
    StructurVisible
  4. (BP_Watersytem) Function TotalDischarge will calculate the the TotalDischarge for each point, based on the upstream discharge and Inputdischarge. So this function starts upstreams en calculates towards the downstream points.
    NOTE If the water-system has branches (separate BP_Watersystem), first the TotalDischarge of these branches need the be calculates. The downstream discharge of these branches is input for the main BP_Watersystem.
    Check with pump of there is big difference in Discharge channel en Capacity pump
  5. (BP_Watersystem) Function CreateCalculationPoint. Adds calculation points in each branch based on the Divide Length. The calculation points are also directly drawn.  Reference to the calculations objects (white small sphere) are stored in array ObjectsCalc  (Node number and Reference).
  6. (BP_Watersytem) Function HlinePoint calculates for each point the following members in a WaterDataStruct
    -H level World
    -Y LevelWorld
    -Wetted Area
    -Wetted Perimeter
    -Hydraulic Radius
    -Velocity
    -H Slope
    -dH
    -H2 Level World
    -y 2 Level World
    -Time
    -Reynolds
    -Froude (net implemented yet)
    Input is a Datastruct , H level and Y level
    Output is a Datastruct, yLevelUpstreams and HLevelUpstreams
  7. (BP_Watersytem) Function Hline starts downstreams, asks for point 0 the waterlevel, then runs HlinePoint for each point and loads the information in the WatersystemData.
    Strategy:
    – calculates H2 which is the H level upstreams. H2 = H1 + dH
    – calculates y2 which is the y level upstreams. y2 = H2 – u2/2g . u = velocity downstreams, so this is a small error. So Length should be short and dH < 10 cm
  8. (SaveGame_Watersystem)
    Function SaveWatersystemData stores WatersystemData in an external file
    Make backupfiles? Save different versions. Probably there will be several BP_Watersystem in the world. Each has its own name.
    So when the file is stored, the name will be  WatersystemData_Name and WaterSystemData_Total_Name
  9. (SaveGame_Watersystem)
    Function LoadWatersystemData loads external file to WatersystemData and WaterSystemData_Total_Name
  10. (BP_WaterSystem) Function TotalCalculation which exits of the following functions:
    CreateCalculationPoints
    TotalDischarge
    Hline (sub = HlinePoint)
    ResultsfromTotaltoData
    DrawWaterSystem (based on array WaterSystemData_Total)
  11. (BP_WaterSystem) Function DrawWatersystem. Builts watersystem based on datafile.
  12. (BP_WaterSystem) Function DrawWatersystemPoint  redraws the selected point and the section before and after the selected point

 

Use in spline blueprints:

  • Object should be set to movable
  • Materials should be set to use in spline!!!
  • Set static mesh (make separate function?)
  • Set Forward Axis
  • AttachTocomponent?

Blueprints used:

Procedural Mesh and slice

https://docs.unrealengine.com/latest/INT/BlueprintAPI/Components/ProceduralMesh/

 

Share Button

Unreal Engine Framework

 

Documentation

Share Button

Blueprint Tutorials

Notes:

  • Pure function: Setting (tick) in function. No exec pins
  • Node Clamp. Setting the min and max of a number

Documentation:

Blueprint Node Reference

https://docs.unrealengine.com/latest/INT/Resources/Showcases/BlueprintExamples/index.html?utm_source=launcher&utm_medium=ue&utm_campaign=uelearn

Event Dispatchers

 

Saving a game to a file

 

  • Blueprint-Communication-and-You-1220373635
  • if statement = branch node
  • BSP pain causing volumes
  • damage automatisch in UE, gebruiken voor geld?
  • Node event any damage 25.14
  • Direct communication: cast to
  • reference get actors off class
  • BP Interface Editor!! 49.50
  • SphereReacebyChannel
  • 1:02:06 right mouse Collapse to Macro!!!
    Use only function is access outside the BP is necessary
  • In output you can change the sequence of output pins
  • 1:06:31 Setting up which BP interface is received in the new BP
  • 1:11:00 collision box with collision settings as fake door
  • 1:13:00 show 3d widget!
  • 1.34:00 event dispatchers
  • Gekeken tot 1:40

  • 2:30 view options : show engine content
  • rotation movement
  • Destroy actor after picking up coin
  • open level
  • 30:00 game instance
  • Gekeken tot 31:46

Share Button

Test met trello

asasassa

Share Button

Animals

Tutorials

Share Button

Rain

Tutorials

Share Button

Ocean

Tutorial

https://github.com/UE4-OceanProject/OceanProject

Share Button