River Modeler Documentation

River Modeler

River Modeler
Version: 1.0.3
Review

2.Getting Started #

Importing

Critical! At all times you must ensure your project is free of any console errors. Unresolved code errors will prevent this asset’s scripts from compiling. This results in all of its functionality remaining unavailable.

Project Setup

Ensure you have the following packages installed before importing:

  • Splines 2.4.0+
  • Mathematics*
  • VFX Graph*
  • Shader Graph*

* already installed with URP/HDRP

If this asset is imported without the VFX Graph package installed all of the VFX Particle functionality will be broken. There is nothing I can do to avoid this, but you can! To remedy this, re-import the asset from the asset store after installing everything.

Upon importing the asset, an auto-installer will validate these packages. Should one not be installed, a dialog pops up with the option to do so.

  • If you had to install the Shader Graph package, please right-click on the asset’s folder and choose “Re-import”. Otherwise the included shader graph fails to compile into actual shader code!

In Unity 2021.3 you will not see the option to install the Splines package, because Unity does not support it there (though it appears to work fine!).

You can, however, install it manually like so:

Using this asset with 2021, whilst error-free, is not supported. It is not tested on nor subject to support.

Scene Setup

Familiarity with Unity’s spline tool is assumed here. It is rather straightforward to work with. You can find a quick-start guide here: https://docs.unity3d.com/Packages/com.unity.splines@2.5/manual/getting-started-with-splines.html

River creation

To create a new river object, go to GameObject->3D Object->Water->River

In the dialog box that pops up, you can choose to create the river along with a new spline. If not, you are to assign the spline to use in the inspector.

You can also add the River Modeler component manually to any other object with a MeshFilter and MeshRenderer component!

To add a river to an existing spline, an option is available in the Spline component’s context menu

Notes:

  • The River Modeler and Spline Container components do not necessarily need to be on the same object. Neither does the Mesh Filter!
  • Scaling the Spline Container object is supported, but this only yields correct results if the Mesh Filter component is entirely separate

River editing

With the new river created, you’ll already notice that the river geometry reacts to the Spline’s shape as you adjust it. This is the crux of the workflow, but the River Modeler component holds various others settings.

Editing a river may appear to be jittery, this is not a performance issue but an optimization. The river is regenerated at a lower framerate (about 10fps).

Next steps

Further subjects:

Yes No Suggest edit
Last updated on August 23, 2024
0 of 0 users found this section helpful
Suggest Edit