Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Tutorial getting fluid rendering to work in URP
#1
Hey everyone,

I just purchased obi fluid and im having a little difficulty trying to get it to work right.
Initially the fluid rendering didnt work at all. I got it to work now, (I put a little tutorial at the bottom of my post for those also running into this issue, as its not documented anywhere). However, it looks off in VR still.

Made this post to ask a question but got a quick email reply from the customer service! But decided to post this part anyway as it might help someone Sonrisa

[b]-------------Tutorial-------------[/b]
Get Fluid rending in URP (2019.3.9f1 tested):
- After creating the first blueprint, a forwardrenderer asset appeared in the asset folder (might have already been there but dont think so)
- Find the  ObiFluidRendererFeature.cs script, open it and comment out the first and the last line. Additionally change the namespace for the renderer from LWRP to Universal, new script looks something like this:
//#if UNITY_2019_2_OR_NEWER && SRP_LIGHTWEIGHT
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using UnityEngine.Rendering;
using UnityEngine.Rendering.Universal;
...
...
//#endif

- Now go to the forwardrenderer asset and click Add Render Feature ->Obi Fluid Render Feature
- Now go to your URPAsset (Assets/Settings/UniversalRP-HighQuality.asset for me), select it and in the inspector and add the forward renderer to the renderer list. (I set it as default not sure if thats needed)

Now fluids should render like normally.
Reply
#2
Hi there,

Thanks for posting this tutorial. I have a question though.

Can anyone tell me where I can locate ObiFluidRendererFeature.cs file? It does not seem to be included with the asset when installed from Asset Store.

Using Obi Fluid v5.3


Thanks!
Reply
#3
Hi,

Searching for it in Unity should reveal its location: /Obi/Scripts/Fluid/Rendering/ObiFluidRendererFeature.cs
Reply
#4
Well for *()# sake.

I searched and searched for that file and couldn't find it. Even put it in the search bar and nothing came up.

Now all of a sudden its there! I must have been temporarily stupid.


Thanks!
Reply
#5
(25-04-2020, 05:52 PM)docgonzzo Wrote: Well for *()# sake.

I searched and searched for that file and couldn't find it. Even put it in the search bar and nothing came up.

Now all of a sudden its there! I must have been temporarily stupid.


Thanks!

Been there. No worries! Guiño
Reply