We will be out of office from December 23th to January 7th. During this time we'll check the forums less often, we'll be back at full throttle soon. Take care, Merry Christmas!
I've just upgraded to Obi Fluid 7--removed the previous version before adding the new package. I've got it running well in the Editor, but in an actual build (for Windows PC) the Fluid Mesh is not rendered. Any suggestions?
01-08-2024, 07:58 AM (This post was last modified: 01-08-2024, 10:50 AM by josemendez.)
(01-08-2024, 03:01 AM)Barliesque Wrote: I've just upgraded to Obi Fluid 7--removed the previous version before adding the new package. I've got it running well in the Editor, but in an actual build (for Windows PC) the Fluid Mesh is not rendered. Any suggestions?
Hi,
I'm unable to reproduce this, fluid renders fine in windows builds for us. Which backend are you using (Burst or Compute?) Which render pipeline? Unity version?
01-08-2024, 10:13 PM (This post was last modified: 01-08-2024, 10:25 PM by Barliesque.)
(01-08-2024, 07:58 AM)josemendez Wrote: Hi,
I'm unable to reproduce this, fluid renders fine in windows builds for us. Which backend are you using (Burst or Compute?) Which render pipeline? Unity version?
kind regards,
Unity 2022.3.20
URP 14.0.10
Burst 1.8.17
I have Obi Solver using the Compute backend. Testing in Editor, I get decent performance with Compute, but with Burst the frame rate bogs right down. I've made a test build using Burst, and the same thing happens.
Possibly related, the following shader error comes up during the building process:
Quote:Shader error in 'Shader Graphs/IndirectTransparent': invalid subscript 'shadowCoord' at 2024/usaf-hangar-hush-house/HushHouse.Unity/Library/PackageCache/com.unity.shadergraph@14.0.10/Editor/Generation/Targets/BuiltIn/Editor/ShaderGraph/Includes/Varyings.hlsl(132) (on d3d11)
02-08-2024, 12:10 AM (This post was last modified: 02-08-2024, 02:19 AM by Barliesque.)
Here's an export of the effect itself, so you can check any other Solver & Emitter settings.
By the way, in case you have any suggestions for how I might adjust my settings for better results, here's a video of what I'm trying to simulate: https://www.youtube.com/watch?v=tL-CCwUe8FU
02-08-2024, 07:49 AM (This post was last modified: 02-08-2024, 07:52 AM by josemendez.)
(01-08-2024, 10:13 PM)Barliesque Wrote: I have Obi Solver using the Compute backend. Testing in Editor, I get decent performance with Compute, but with Burst the frame rate bogs right down.
This is to be expected: Burst performs the simulation in the CPU while Compute uses the GPU. Compute should be at least an order of magnitude faster than Burst for relatively large scenes. For desktop targets, Compute should be used most of the time. For low-end mobile, Burst generally performs better.
(01-08-2024, 10:13 PM)Barliesque Wrote: Possibly related, the following shader error comes up during the building process:
This is a bug in ShaderGraph. Open up IndirectTransparent.shadergraph, and in the graph inspector, remove the Active Targets you're not using (in your case, Built-in). Doing this will get rid of the message.
(01-08-2024, 10:13 PM)Barliesque Wrote: I have Obi Fluid Surface Mesher set to Opaque.
I'm using a normal map, but no diffuse map.
Using normal or diffuse maps shouldn't make any difference.
(01-08-2024, 10:13 PM)Barliesque Wrote: Renderer features in use: (in order)
1) Obi Fluid Renderer
No need to have an ObiFluidRenderer feature if your fluid is Opaque. The renderer feature extracts a thickness buffer and a refraction buffer to be used with transparent fluids, but it's useless for opaque.
Will investigate this further and get back to you.
03-08-2024, 10:54 PM (This post was last modified: 03-08-2024, 10:56 PM by Barliesque.)
(02-08-2024, 07:49 AM)josemendez Wrote: This is a bug in ShaderGraph. Open up IndirectTransparent.shadergraph, and in the graph inspector, remove the Active Targets you're not using (in your case, Built-in). Doing this will get rid of the message.
Good to know.
(02-08-2024, 07:49 AM)josemendez Wrote: No need to have an ObiFluidRenderer feature if your fluid is Opaque. The renderer feature extracts a thickness buffer and a refraction buffer to be used with transparent fluids, but it's useless for opaque.
Ah, of course.
(02-08-2024, 07:49 AM)josemendez Wrote: Will investigate this further and get back to you.
Thanks for your help. I'm hoping to get this resolved in the next few days.
05-08-2024, 08:41 AM (This post was last modified: 05-08-2024, 09:35 AM by josemendez.)
Hi,
Your FireRetardant prefab had several ObiParticleRenderer components with no materials. While this worked fine in the editor, it threw an exception in the build, skipping any further rendering. A quick workaround would be to simply disable the unused particle renderers.
However it stands to reason that any renderers using no material should be simply ignored -both in the editor as in builds- instead of raising an exception. We've patched this behavior. If you wish to apply the patch to your project, replace ProceduralRenderBatch.cs with the file you'll find attached to this post.
The reason why rendering worked in the editor but not in the build is because Unity's GetInstanceID() method -which we use to compare objects and build render batches- returns 0 for null in the editor, but instead raises a NullRefException in the build. This difference in behavior is not mentioned in the documentation and led us to assume it would behave the same in the editor and in a build. Furthermore, the documentation states that GetInstanceID() never returns 0 which is incorrect as it *does* return 0 for null objects in the editor.
We've reached out to Unity so that they correct GetInstanceID's documentation so that it matches its actual behavior.
(05-08-2024, 08:41 AM)josemendez Wrote: The reason why rendering worked in the editor but not in the build is because Unity's GetInstanceID() method -which we use to compare objects and build render batches- returns 0 for null in the editor, but instead raises a NullRefException in the build. This difference in behavior is not mentioned in the documentation and led us to assume it would behave the same in the editor and in a build. Furthermore, the documentation states that GetInstanceID() never returns 0 which is incorrect as it *does* return 0 for null objects in the editor.
We've reached out to Unity so that they correct GetInstanceID's documentation so that it matches its actual behavior.
Seems to me that should be reported as a bug, rather than a documentation error. It stands to reason that the behavior of GetInstanceID() should be consistent between editor and builds.