Giter Club home page Giter Club logo

waterinteractionplugin's Introduction

FluidNinja + Oceanology Guide

This is a guide for integrating the plugins so that you can get water interaction FX from Ninja while having the aesthetics and functionality of Oceanology.

GitHub release     ReleaseDate     Oceanology Discord Server     FluidNinja Discord Server

Preview Video:

WaterInteractionDemoVid.mp4

Shader performance comparison: image3

CPU performance cost: image7 It costs ~0.5ms on my Ryzen 9 3950X

Installation

Dependencies

https://www.unrealengine.com/marketplace/en-US/product/fluidninja-live
https://www.unrealengine.com/marketplace/en-US/product/oceanology

This guide is assuming you have a clean FluidNinjaLIVE 1.9.53.3 present in your content folder like this: image5

And that you did its migration guide(mainly for setting up FluidTrace collision channel). Also that Oceanology 5.4.0 is already installed in your project.

Step 1 - Clone Repo

Clone repo or download and extract the release package

Step 2 - Install WaterInteraction Plugin

In the files provided copy the WaterInteraction folder to your project Plugins folder.

Open your project and on the top left go Edit -> Plugins to open the plugins tab.

Search for “water” in the Plugins window and enable the plugin. image2

Step 3 - Checkout the Test Map

  1. Open settings on your content browser
  2. Make sure Show Plugin Content is True
  3. Find the WaterInteraction Content under Plugins
  4. Open the Test Map image9

Now you can play and hold LMB to run around and confirm the installation went through successfully!

Integration to your project

  1. Add or replace your existing Oceanology with the Oceanology_FluidNinja provided in the plugin.

  2. Open BP_TopDownCharacter in the plugin as an example. Copy the nodes in Begin Play event to your Player Character class

  3. Very Important!
    image1 Open NinjaLive_Area_Water blueprint, select NinjaLiveComponent, search for a variable called “Force Trace Mesh Vertical Position” and make sure it is the same value as the Location.Z of the Oceanology_FluidNinja in your level. Do the same for NinjaLive_Water_Splashes, only increment it by -20

  4. Optional: image4

You can define which object types interact with the water sim by adding them to this array. You can also define which bones to trace for skeletal meshes(You might want to add hand_r and hand_l if you have swimming in your game)

Editing Appearance

It is important to note when making changes it is recommended you make a duplicate beforehand for comparison.

The adjustments you can do are across a very wide set of interlinked parameters in the materials and blueprints, so be careful to test what they do thoroughly and make deliberate changes.

Material Parameters

You can edit a lot of material parameters that affect the colour, normals, height etc. of the waves generated by the water simulation by opening up M_Oceanology_Inst_FluidNinja.

There you can see a lot of parameter categories, keep in mind that most of the Oceanology parameters are overridden by the blueprint, so focus on the Ninja parameters whose changes are kept. You can hover over the parameter name to see where it’s coming from, all those coming from MF_FluidNinjaFX you can edit. image10

A cool simple one you can try out first is ApplySineWavesToNormal, set it to true and compare how the ripples look while you walk around.

Simulation Parameters

The sim and interaction with it is controlled by parameters in two places. You can find params on interaction in the Class Defaults of the NinjaLive_Area_Water actor, There you can adjust important things such as Trace Mesh Size and Interaction Volume Size. The simulation itself is controlled by NinjaLiveComponent, where you can adjust things that control how the fluidsim is drawn. There are additional parameters stored in the Default Preset variable, you can open the Data Table and check them out also.

Very Important!

You can debug what is happening with the underlying simulation by setting the Trace Mesh Invisible variable to false.

Then you will see the simulation rendered to the trace mesh like this: image8

waterinteractionplugin's People

Contributors

sartaq12 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.