Learning Fluid Dynamics in a online multiplayer immersive 3D/VR learning environment

Update 08-05-2021

Working Avatars! Visit the Sneak preview, hit this link to download, install and visit the prototype

Update 21 – 02 – 2021

Sneak preview prototype, hit this link to visit the world

At the channel
At the sluice

Update 1 September 2020.

Update 7 june 2020.
Version 0.01. Simple prototype dedicated server and clients running om a server at Avans University. Looks a bit weird, but this is a milestone for me.

v0.01

Update June 2020
Starting for the third time. read my thoughts.

Update 2019 First video on the project

Update June 2018
Followed several online courses on using blueprints in Unreal Engine.
See https://unreal.fluiddynamics.eu/main-water-system-in-unreal/

First video will follow soon?

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

List of activities by avatars

List of activities which could be performed by avatars (students)

NrActivityRole
1Measuring levels island and water.
Draw a cross-section of the island
2Measuring a cross-section at a channel , ditch or river. Based on this information the student can calculate : wetted area and hydraulic radius.
3Measuring the velocity at cross-section at a channel , ditch or river. Combined with the area, the discharge can be calculated
4Calculate the Energylevel based on water level and velocity at cross-section at a channel , ditch or river
5Decide on the roughness coefficient (manning) based on the structure (vegetation) at a channel , ditch or river
6Calculate (at cross-section at a channel , ditch or river) the slope of the energyline based on manning. Info needed : velocity, roughness coefficient and hydraulic radius.
7Schietend of Stromend water (froude)
9Turbulente of laminaire stroming (reynolds)
8Measuring waterlevels in the length of a channel , ditch or river. Calculate velocity based on energy slope, hydraulic radius and roughness coefficient
9Advanced. In a cross-section at a channel , ditch or river the velocity is different, depending on the distance to the “wall”. Student measures at different locations in the cross section and calculates the average velocity.
10At a short crested weir in a channel , ditch or river. Measure waterlevel upstreams and downstreams. Measure velocity upstreams. Measure crestlevel. Decide (based on calculation) if crest is submerged or freeflow.
11At a short crested weir in a channel , ditch or river. Measure crestlevel, width crest, waterlevel upstream and downstream, velocity upstream. Decide on crestcoefficient. Calculate discharge at weir.
12At a long crested weir.
13

Calculate pressure on a object below surface (pascal)

Erosion?

Share Button

Library’s

Back

FDBlueprintVariableLibrary

FDJsonLibrary

STRUCT
Functions

Share Button

Basic assignments watersystem

A list of basic assignments for students

  1. Measuring levels land and water. Making a cross section over the island.
  2. Calculate the wetted area (m2) for a cross section of the channel or ditch or pipe.
    Instruments needed:
    – fixed measure poles which shows the coordinates or a moveable device which the avatar can put at a location en which shows the coordinates.
    – Online calculator
    – something to store the data measured and calculated. Each avatar should have some kind of notebook.
  3. Measure the velocity in the channel. Could be with a device, or just something flowing in the water.
  4. Calculate discharge
Share Button

Sneak Preview prototype

Sorry at the moment it is not possible to visit the 3d world.
A new update is comming soon!

There is a “first” version of a prototype of the world running.
The world lives on a server of Avans University of applied sciences. At this moment the main focus is on building a world in Unreal Engine running on a dedicated server.

If you have comments, questions, bugs … let me know at:
h.massink at avans.nl

current version is 1.02

You should be able to visit this world. You need to take the following steps:

step 1
Download and unzip the FD_Versie ….zip file from
https://drive.google.com/drive/folders/1v80wANeN4VCgNj1AmMn3S5gZStX9yDzS
Right mouse click on the file and select download.

This is my private GDRIVE so be patient.

step 2
Click on FluidDynamics.exe


step 3
Windows will probably complain. You need to thrust the file (me?).
If somebody know how to solve this, let me know 😊

step 3b optional.
Could be that Unreal has to install some software / drivers

step 4
When the programs starts you will get the following screen:

If you don’t have a username, you can use the guest1 tot 5. Password is the same.
If all goes well you wel enter the world.

Some remarks :

  • If you want to edit your avatar, hit the Open Character Editor button. You have to do this before entering the world.
  • If you want to use the new character, hit the new avatar checkbox.
  • If your mouse cursor gets stuck, hit right mouse button
  • Hit the F and tell me the FPS in the chatbox
  • Uninstall: Just delete the zip file and the unpacked maps.

Share Button

Q&A Dedicated Server

Back

Q:What is the best method to update the playerlist. At the moment I use the Gamemode onpostlogin and on logout? This method could be inaccurate. Instead use OnTick to check number of players every tick. Only update widget when number has changed. On the other hand the number of players is only needed to check if a new client could get access.

Q: How can we use the Server Stat Replicator Class (Gamemode) to monitor the server?

Q: How to actually use the prelogin in C++ gamemode. For me this looks like high skilled programming. For example, how do you now the name and password of the client connecting and going through the prelogin? I get the idea that the students starts the program, enters his username and than makes contact with the server. So there is some kind of a lobbylevel. In the current project there is no lobbylevel.

Q:Is it possible to append a record to JSON file on disk, instead of reading the file, adding the record and writing the file again?

Q: If a new player comes into the world, he needs to get all the info of his world. For example , the definition of how all the other avatars look? What is the best way to get acces to this info. Through GameState?

Q: Is it correct that you can’t get access to to playerstate on the gamemode and gameinstance?

Q:Difference in use between Event Running on Server and Has Authority?

Q: Commandlines or bat file for automatically package server and client

Q: Explanation usage FString, static FString and const static FString

Q:Which software can be used for adjusting the Json PlayerInfo file outside of Unreal?
A:..

Q: How can the Server be monitored within Unreal

Q:What do the other methods of packaging (shipping, debugging) actually differ from development?

Q: What launcher software can we use? without annoying the virusscanner?

Q: How to run calculations on a different thread in C++

Q: Is het possible to adjust the watersystem in ue4.26.1 in runtime
A: Looks like this is not the case. For the watersystem on the island, I will try to use my system with the materials of the unreal watersystem.

Q:Should we store the PlayerInfo on the Server or on the clients
A:All Info will be stored on the Server

Q: Should we use Cars and Drones to travel in the world, or just teleporting?
A: Although Cars and Drones are more like the real world, Teleporting takes less time and is thereby preferable.

Q: How to change gamemode during runtime?
A: Project settings, GameModeClassAliases


Q:Is it possible to have a map in the World Outliner always collaps?
A:Shift and klik arrow at WorldMap and klik only on arrow again


Q: How to make sure a variable is not saved to disk.
A: Use setting Transient

Transient

Q: How to emulate bad internet in de editor.
A: Play > Advanced settings

simulate bad internet

Q:Video 42:39. Get access to gamemode in widget through game state. From client.
In this way you can get access to settings (variables) from the gamemode.

get access to gamemode
Share Button

FD Menu

Back

Menu’s

  • WBP_ChatText
  • WBP_ChatWindow
  • WBP_ScreenMenu

Events ChatWindow

  • UpdateChatWindowInChatWindow

Share Button

FD Character

Back

Names in project : FluidDynamicsCharacter (C++), BP_ThirdPersonCharacter

Tasks :

  • Show Name above avatar
    – Event Set Player Name Text
  • Flip flop between first en thirdperson view

Share Button

FD PlayerController

Back

Names in project : FDPlayerController (C++), BP_FDPlayerController (BP)

C++

BP_BookmarkComponent

  • Make list of bookmarks based on BP_Bookmark ‘s in level
  • Show list in screenmenu
  • Teleport to selected bookmark

BP_JumpToAvatarComponent

  • Make list of avatar names in level
  • Show list in screenmenu
  • Get location selected avatar
  • Teleport to selected avatar

Tasks :

  • Intermediair between ScreenMenu and GameInstance
    – Sent LoginNameToGameInstance
    – SentPlayerInfoToSaveToGameInstance
    – MessageServerWhenLeaving
  • Intermediair between gamemode and Playerstate
    -SetFDPlayerInfoOnPlayerState
  • Intermediair Gamemode and ScreenMenu
    -InfoToLoginMenu
  • Chat
    -UpdateChatWindow
    -GetChatMessage
  • Playercontroller – GameInstance
    -MessageServerWhenEntering
  • Contains al Key events
    -Y (chatwindow)
    -M (mousecursor)
    -N (loginnames)
    -R (Read FDPlayerInfoArray)
    -F (FPS)
    -L (show avatar names)
    -Tab (1 or 3 person)
Share Button

FD PlayerState

Back

Names in project : FDPlayerState (C++), BP_FDPlayerState (BP)

C++

Tasks :

  • Has the FDPlayerInfo which goes with the client
    – Set FDPlayerInfo

Share Button