Posts: 7
Threads: 2
Joined: Jul 2022
Reputation:
0
Hi,
After spending a good amount of time adjusting the fluid parameters in the editor until getting the look I liked, I tried to make a build and was surprised to get a pretty different result. Here are pictures of the editor (left) and the build (right):
I also tried to make a build of one of the examples provided, and I seem to be getting a similar result, where the fluid in the build looks whitened.
I'm using Windows 10, the Build In Render Pipeline, the ParticleShader in the emitter, and I've tested in both Unity 2021.3.8f1 and 2021.3.9f1 Here are the fluid renderer settings I'm using in my scene:
Thanks in advance!
Posts: 5,974
Threads: 22
Joined: Jun 2017
Reputation:
383
Obi Owner:
(04-09-2022, 08:05 PM)asama Wrote: Hi,
After spending a good amount of time adjusting the fluid parameters in the editor until getting the look I liked, I tried to make a build and was surprised to get a pretty different result. Here are pictures of the editor (left) and the build (right):
I also tried to make a build of one of the examples provided, and I seem to be getting a similar result, where the fluid in the build looks whitened.
I'm using Windows 10, the Build In Render Pipeline, the ParticleShader in the emitter, and I've tested in both Unity 2021.3.8f1 and 2021.3.9f1 Here are the fluid renderer settings I'm using in my scene:
Thanks in advance!
Hi there,
Obi uses Unity's built-in reflection probes for reflections. Recent Unity versions seem to have a bug that sometimes cause reflection probes to not be available after rendering the skybox, only in builds. See this related thread:
http://obi.virtualmethodstudio.com/forum...-3564.html
The absence of reflections will cause the fluid to look different in build than in-editor. Only seems to be reproducible on certain specific GPUs, and only in 2021 and up. I've already reported this as a bug to Unity.
For the time being I'm preparing an alternate fluid shader that accepts a specific cubemap as input for reflections. Will make it available for download here asap.
kind regards,
Posts: 7
Threads: 2
Joined: Jul 2022
Reputation:
0
(05-09-2022, 07:43 AM)josemendez Wrote: Hi there,
Obi uses Unity's built-in reflection probes for reflections. Recent Unity versions seem to have a bug that sometimes cause reflection probes to not be available after rendering the skybox, only in builds. See this related thread:
http://obi.virtualmethodstudio.com/forum...-3564.html
The absence of reflections will cause the fluid to look different in build than in-editor. Only seems to be reproducible on certain specific GPUs, and only in 2021 and up. I've already reported this as a bug to Unity.
For the time being I'm preparing an alternate fluid shader that accepts a specific cubemap as input for reflections. Will make it available for download here asap.
kind regards,
Hi,
Thank you for the quick reply and for providing a temporary solution! I'll keep an eye on the fluid shader fix with the cubemap. Could you also share the page that contains the current status of the issue in Unity to know when to switch back to the original shader?
Thanks!
Posts: 5,974
Threads: 22
Joined: Jun 2017
Reputation:
383
Obi Owner:
05-09-2022, 03:27 PM
(This post was last modified: 05-09-2022, 03:27 PM by josemendez.)
(05-09-2022, 03:15 PM)asama Wrote: Hi,
Thank you for the quick reply and for providing a temporary solution! I'll keep an eye on the fluid shader fix with the cubemap. Could you also share the page that contains the current status of the issue in Unity to know when to switch back to the original shader?
Thanks!
Unity hasn't replied back to the bug report yet, since I created it only 2 days ago.
At the last page of the following thread you can find the temporary patch that allows you to use any cubemap for the reflections, instead of the built-in probes:
http://obi.virtualmethodstudio.com/forum...age-2.html
kind regards,
Posts: 7
Threads: 2
Joined: Jul 2022
Reputation:
0
05-09-2022, 04:19 PM
(This post was last modified: 05-09-2022, 04:20 PM by asama.)
(05-09-2022, 03:27 PM)josemendez Wrote: Unity hasn't replied back to the bug report yet, since I created it only 2 days ago.
At the last page of the following thread you can find the temporary patch that allows you to use any cubemap for the reflections, instead of the built-in probes:
http://obi.virtualmethodstudio.com/forum...age-2.html
kind regards,
Awesome, thanks! Another issue that I've been having is that the FluidShader is giving me an error and not rendering, so I haven't been able to use it. The ParticleShader works fine though, would the default particle shader work with the changes you made?
Here's the error I'm getting if I use the FluidShader in any emitter:
RenderingCommandBuffer: invalid pass index 1 in DrawMesh
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
Thank you.
Posts: 5,974
Threads: 22
Joined: Jun 2017
Reputation:
383
Obi Owner:
05-09-2022, 04:31 PM
(This post was last modified: 05-09-2022, 04:36 PM by josemendez.)
(05-09-2022, 04:19 PM)asama Wrote: Awesome, thanks! Another issue that I've been having is that the FluidShader is giving me an error and not rendering, so I haven't been able to use it.
Here's the error I'm getting if I use the FluidShader in any emitter:
RenderingCommandBuffer: invalid pass index 1 in DrawMesh
UnityEngine.GUIUtility rocessEvent (int,intptr,bool&)
Thank you.
The FluidShader is, as the name implies, used to render fluid. It cannot be used in a ObiParticleRenderer, you can only use particle shaders there. It's kinda like using a bloom shader to render the surface of an object, it doesn't make much sense since they're designed for different purposes.
FluidShader is used internally by the ObiFluidRenderer component to render the fluid, you don't need to do anything to use it or place it anywhere. See:
http://obi.virtualmethodstudio.com/manua...ering.html
http://obi.virtualmethodstudio.com/manua...ering.html
(05-09-2022, 04:19 PM)asama Wrote: The ParticleShader works fine though, would the default particle shader work with the changes you made?
Particle and fluid rendering are two completely different things, the patch I provided doesn't contain any changes to particle rendering. It will continue to work as it did.
Posts: 7
Threads: 2
Joined: Jul 2022
Reputation:
0
05-09-2022, 09:18 PM
(This post was last modified: 05-09-2022, 09:26 PM by asama.)
(05-09-2022, 04:31 PM)josemendez Wrote: The FluidShader is, as the name implies, used to render fluid. It cannot be used in a ObiParticleRenderer, you can only use particle shaders there. It's kinda like using a bloom shader to render the surface of an object, it doesn't make much sense since they're designed for different purposes.
FluidShader is used internally by the ObiFluidRenderer component to render the fluid, you don't need to do anything to use it or place it anywhere. See:
http://obi.virtualmethodstudio.com/manua...ering.html
http://obi.virtualmethodstudio.com/manua...ering.html
Particle and fluid rendering are two completely different things, the patch I provided doesn't contain any changes to particle rendering. It will continue to work as it did.
Got it, thank you for clarifying that. After replacing the files with the patched version on the link and after adding the cubemap to the FluidRenderer component, I'm getting a different result than before on the build but still not the same as in the editor.
Editor left, build right:
PatchEditor.png (Size: 113.36 KB / Downloads: 16)
Do you know what might be causing that difference? Here are the emitter and fluid settings:
Thanks!
Posts: 5,974
Threads: 22
Joined: Jun 2017
Reputation:
383
Obi Owner:
(05-09-2022, 09:18 PM)asama Wrote: Got it, thank you for clarifying that. After replacing the files with the patched version on the link and after adding the cubemap to the FluidRenderer component, I'm getting a different result than before on the build but still not the same as in the editor.
Editor left, build right:
Do you know what might be causing that difference? Here are the emitter and fluid settings:
Thanks!
- What platform are you building for? Does it support floating point render buffers?
- Are your quality settings the same for both build and editor?
- How have you created the reflection cubemap? I take it is not a realtime probe cubemap (since the original bug is that these stop being available in the build?)
kind regards,
Posts: 7
Threads: 2
Joined: Jul 2022
Reputation:
0
06-09-2022, 09:27 AM
(This post was last modified: 06-09-2022, 04:52 PM by asama.)
(06-09-2022, 07:40 AM)josemendez Wrote: - What platform are you building for? Does it support floating point render buffers?
- Are your quality settings the same for both build and editor?
- How have you created the reflection cubemap? I take it is not a realtime probe cubemap (since the original bug is that these stop being available in the build?)
kind regards,
- I'm building for Windows 64-bit. Are there any settings that need to change for it to support floating point render buffers?
- Yes they are the same, the one the editor uses is the one selected from the list of quality levels right? These are the quality settings I'm using:
- I've created a custom cubemap following this post:
https://docs.unity3d.com/ScriptReference...bemap.html
Here's how the cubemap looks:
Thank you.
Posts: 5,974
Threads: 22
Joined: Jun 2017
Reputation:
383
Obi Owner:
Hi,
I have been unable to reproduce this so far. Would it be possible for you to send a sample project to support(at)virtualmethodstudio.com so that I can take a look? thanks!
|