Posts: 3
Threads: 1
Joined: Nov 2019
Reputation:
0
Hello, recent Obi Fluid user here!
Now that 5.0 is out, with "Experimental LWRP Support", How would I actually test this feature?
I'm using Unity version 2019.3.0b11 with the Universal Render Pipeline (Which should work the same as LWRP), this is a blank project with the Fluid Package
I have the fluid rendererer feature attached to my Pipeline asset, but the fluid still won't render (But I can get the particle renderer to work)
Is there something I'm missing, or is the update not yet compatible with URP?
[attachment=480]
Posts: 6,326
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
21-11-2019, 07:33 PM
(This post was last modified: 21-11-2019, 07:37 PM by josemendez.)
(21-11-2019, 05:06 PM)TheDopple Wrote: Hello, recent Obi Fluid user here!
Now that 5.0 is out, with "Experimental LWRP Support", How would I actually test this feature?
I'm using Unity version 2019.3.0b11 with the Universal Render Pipeline (Which should work the same as LWRP), this is a blank project with the Fluid Package
I have the fluid rendererer feature attached to my Pipeline asset, but the fluid still won't render (But I can get the particle renderer to work)
Is there something I'm missing, or is the update not yet compatible with URP?
Still documenting it! Sorry :S.
There's ObiFluidRendererFeature.cs, which is a scriptable renderer feature for LWRP. By creating a custom forward renderer and adding this feature, fluids will be rendered in LWRP.
Have yet to check for compatibility with URP, that's in part why it's still experimental. (things change and get deprecated so freaking fast from Unity's side... is hard to keep up. We were still working in LWRP support when they announced it was getting replaced by the identical-but-not-quite URP).
Let me know if you need help setting it up!
Posts: 3
Threads: 1
Joined: Nov 2019
Reputation:
0
(21-11-2019, 07:33 PM)josemendez Wrote: Still documenting it! Sorry :S.
There's ObiFluidRendererFeature.cs, which is a scriptable renderer feature for LWRP. By creating a custom forward renderer and adding this feature, fluids will be rendered in LWRP.
Have yet to check for compatibility with URP, that's in part why it's still experimental. (things change and get deprecated so freaking fast from Unity's side... is hard to keep up. We were still working in LWRP support when they announced it was getting replaced by the identical-but-not-quite URP).
Let me know if you need help setting it up!
I already tried creating a custom FR and gave it the ObiFluidRendereFeature, but still nothing.
I'm pretty sure it might work in LWRP, but my current project involves URP, and it does not seem to work currently.
Posts: 6,326
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
(21-11-2019, 09:22 PM)TheDopple Wrote: I already tried creating a custom FR and gave it the ObiFluidRendereFeature, but still nothing.
I'm pretty sure it might work in LWRP, but my current project involves URP, and it does not seem to work currently.
Hi,
Did you provide both a color and a fluid material, like in the regular FluidRenderer? FluidColorBlend (color material) and DielectricFluid (fluid material) work well.
Will beging testing URP asap.
Posts: 3
Threads: 1
Joined: Nov 2019
Reputation:
0
(22-11-2019, 11:19 AM)josemendez Wrote: Hi,
Did you provide both a color and a fluid material, like in the regular FluidRenderer? FluidColorBlend (color material) and DielectricFluid (fluid material) work well.
Will beging testing URP asap.
As you can see in my screeenshot that I posted with the OP, I did indeed provide the color and fluid materials for the feature, I even used FluidColorBlend and DielectricFluid
Posts: 5
Threads: 2
Joined: Nov 2019
Reputation:
0
Unity version 2019.2.11
[attachment=481]
Posts: 2
Threads: 0
Joined: Nov 2019
Reputation:
0
(23-11-2019, 03:13 AM)TheFlyHawk Wrote: Unity version 2019.2.11
Exactly the same issue here. However, I was able to attach the rendering feature by editing the ObiFluidRendererFeature.cs file.
Specifically, I commented the compiler directive #if UNITY_2019_2_OR_NEWER && SRP_LIGHTWEIGHT from the top of the script along with the #endif at the bottom. Looks like it was causing some kind of conflict.
Posts: 6,326
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
23-11-2019, 08:28 PM
(This post was last modified: 23-11-2019, 09:41 PM by josemendez.)
(23-11-2019, 04:34 PM)darbycostello Wrote: Exactly the same issue here. However, I was able to attach the rendering feature by editing the ObiFluidRendererFeature.cs file.
Specifically, I commented the compiler directive #if UNITY_2019_2_OR_NEWER && SRP_LIGHTWEIGHT from the top of the script along with the #endif at the bottom. Looks like it was causing some kind of conflict.
SRP_LIGHTWEIGHT is a version define, created by the /Obi/Scripts/Obi.asmdef assembly definition file if com.unity.render-pipelines.lightweight version 6.0 or higher is present in the project. (You can check this yourself by selecting the Obi.asmdef file found in /Obi/Scripts/, and looking at the version defines section in the inspector).
So as long as you're using Unity 2019.2 or higher and LWRP 6.0 or higher, both precompiler constants should be defined, and the renderer feature should compile without issue.
Maybe your LWRP package is a lower version than 6.0? (or Unity got confused due to some other reason?)
Posts: 2
Threads: 0
Joined: Nov 2019
Reputation:
0
(23-11-2019, 08:28 PM)josemendez Wrote: SRP_LIGHTWEIGHT is a version define, created by the /Obi/Scripts/Obi.asmdef assembly definition file if com.unity.render-pipelines.lightweight version 6.0 or higher is present in the project. (You can check this yourself by selecting the Obi.asmdef file found in /Obi/Scripts/, and looking at the version defines section in the inspector).
So as long as you're using Unity 2019.2 or higher and LWRP 6.0 or higher, both precompiler constants should be defined, and the renderer feature compiled without issue.
Maybe your LWRP package is a lower version than 6.0? (or Unity got confused due to some other reason?)
Thanks for the response. LWRP is version 6.9. However this was part of an upgrade of an existing project to LWRP. One that had used Obi Fluid 4 (replaced with v5), so it's possible the compiler got confused in some other way. I tried it with a fresh LWRP project in Unity 2019.2.13 and didn't get any errors, so all is well.
I just pulled up the fluid mill example, set up the LWRP with a custom forward renderer, dropped in the Obi renderer feature and it works beautifully, as below. Really great work getting this to work with the LWRP
Posts: 6,326
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
23-11-2019, 09:44 PM
(This post was last modified: 23-11-2019, 09:45 PM by josemendez.)
Glad you're happy with the result!
For the OP: rest assured I will check for compatibility with URP during next week and carry out any adjustments needed to ensure compatibility with URP as well.
|