Download

Use of Unreal Engine 4 to visualize numerical simulations (fluids, cloth, etc...)

Hi guys.

I’m a complete noob when it comes to unreal, and before start studying it I would like to ask some questions to persons who already use it to see if it will fulfill my needs.

I am a programmer, and researcher, and I work developing new algorithms to simulate continuum media (fluids, soil, cloths, porous media, fracture, etc). I have a very simple code in opengl that reads a data file (that I myself defined) and I visualize my results. The thing is, it is very ugly, and practically unusable if I go to mobile, for example. When developing projects, me and my colleagues normally create from scratch a program to visualize the results, to deliver the final product (using QT and opengl), and we normally obtain a very good interface, but the opengl render leaves us wondering if we could find something better.

Lately, I’ve seem a lot of stuff done with UE, and I’m asking myself if using a gaming engine would make our life’s easier and make our simulation look way better.

For example, I already worked with SPH to simulate fluids, and elastic media. SPH is a particle method and I would need a program (written in UE, for example), that reads an input file (with the data with the positions of the particles) and render the particles (with different positions for different timesteps (or frames)). For two particles, the input file would be something like this (a VERY SIMPLIFIED version, in ASCII here, normally these files are in binary because of the size):

#position
(time)
(particle_id) (x_pos) (y_pos) (z_pos) (material_id)

#position
(time)
(particle_id) (x_pos) (y_pos) (z_pos) (material_id)

Is this kind of program possible using UE?

Also, is it possible to use UE to do BOTH, i.e., to simulate and visualize? Some examples can be done in real time, it would be nice to have a very good looking real time application to show.

Thanks in advance.

If you have or can write the simulation in C++ you can definitely do it in UE. For the visualisation, I’m not sure if UE out of the box got a method that is perfomant enough.

I think you should try it!

UE4 doesn’t have a system that’s optimized for that purpose so while C++ would allow you to implement something, it’d be up to you to make it work and run well.