Posts: 6
Threads: 1
Joined: Feb 2022
Reputation:
0
Hi there, I'm a new user of Obi Fluid, and it's been amazing so far! Thanks for making such an amazing tool. I'm currently working on a 2D game project in Unity that uses Obi Fluid, and I've run into a weird issue that is specific to Mac builds of my project. When I preview the game in Unity, I can see the obi fluid simulation just fine. However, when I create a Mac build and play the build, the fluids don't show up. Also interesting to note - the fluid DOES show up in a Windows build of the game. It's only the Mac build where I seem to be having the issue.
A few other notes about my project:
- Using Unity 2020.3.26f1
- Using the standard render pipeline
- Have tried both Burst and Oni solver modes, and neither change the end result in the Mac build
- Building and running on a 2015 Macbook Pro using macOS Big Sur v11.6.4
Happy to answer any more questions to help diagnose the issue. Any help would be extremely appreciated! Thanks!
Posts: 6
Threads: 1
Joined: Feb 2022
Reputation:
0
Hi again! Just bumping the thread. We'd love to get obi fluid working with the mac build of our game. Any help here would be appreciated. Thanks for your time and energy! =)
Posts: 6,346
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
28-02-2022, 10:13 AM
(This post was last modified: 28-02-2022, 10:14 AM by josemendez.)
(28-02-2022, 12:19 AM)coopal00ps Wrote: Hi again! Just bumping the thread. We'd love to get obi fluid working with the mac build of our game. Any help here would be appreciated. Thanks for your time and energy! =)
Hi there,
We usually don't check the forums during weekends, no need to bump!
Obi is developed and maintained on Mac, so it's by far the most tested platform. Since I'm unable to reproduce this on my end, I think the best way to narrow down the issue is for you to test a build done on a different Mac. If it works, then the issue is with your project's build process on your machine, if it doesn't then this is a runtime issue, probably rendering (since you mention using a different physics backend makes no difference).
Here you can find attached a build of one of the sample scenes:
https://we.tl/t-T7huydynJU
Here's what you should see when running it:
Let me know whether it works for you.
Posts: 6
Threads: 1
Joined: Feb 2022
Reputation:
0
28-02-2022, 06:32 PM
(This post was last modified: 28-02-2022, 06:42 PM by coopal00ps.)
(28-02-2022, 10:13 AM)josemendez Wrote: Hi there,
We usually don't check the forums during weekends, no need to bump!
Obi is developed and maintained on Mac, so it's by far the most tested platform. Since I'm unable to reproduce this on my end, I think the best way to narrow down the issue is for you to test a build done on a different Mac. If it works, then the issue is with your project's build process on your machine, if it doesn't then this is a runtime issue, probably rendering (since you mention using a different physics backend makes no difference).
Here you can find attached a build of one of the sample scenes:
https://we.tl/t-T7huydynJU
Here's what you should see when running it:
Let me know whether it works for you.
Hi Jose, thanks so much for the reply! I downloaded the build that you linked, and I was able to successfully run it on my mac! The fluid in the build showed up just fine. What would be helpful for me to try or to help diagnose the problem further at this point?
Also I just realized that I am, in fact, getting a message about Burst falling back to the Oni backend.
The message underneath the solver backend dropdown in my inspector says "The Burst backend depends on the following packages: Mathematics, Collections, Jobs, and Burst. The default backend (Oni) will be used instead, if possible."
Hope that's helpful.
Posts: 6
Threads: 1
Joined: Feb 2022
Reputation:
0
Ok, so I've been trying to get Burst working to see if that might enable the fluids to render on my system. I have to apologize because I missed the documentation about Burst when I was initially setting up Obi Fluid. I got all the required packages installed, and now I'm running into some issues when I try to use Burst as the backend. I have the following package versions in the project:
- Burst 1.5.6
- Collections 1.1.0
- Jobs 0.11.0-preview.6
- Mathematics 1.2.5
When I run the game using Burst, I get the following error:
"System.IndexOutOfRangeException: Index {0} is out of range of '{1}' Length.
This Exception was thrown from a job compiled with Burst, which has limited exception support. Turn off burst (Jobs -> Burst -> Enable Compilation) to inspect full exceptions & stacktraces"
I guess I have a couple questions at this point...
1. Is it worth it to get Burst working? My thinking is that Burst might enable fluids to render on my mac, but I could be wrong.
2. If Burst is worth fixing, what is the cause of the error?
Posts: 6,346
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
01-03-2022, 08:54 AM
(This post was last modified: 01-03-2022, 08:56 AM by josemendez.)
(28-02-2022, 08:18 PM)coopal00ps Wrote: When I run the game using Burst, I get the following error:
"System.IndexOutOfRangeException: Index {0} is out of range of '{1}' Length.
Another user reported this recently. This seems to be a bug in Unity 2020, since it's the only version where we've been able to reproduce it. Should work fine in 2021.2.7.
(28-02-2022, 08:18 PM)coopal00ps Wrote: 1. Is it worth it to get Burst working? My thinking is that Burst might enable fluids to render on my mac, but I could be wrong.
2. If Burst is worth fixing, what is the cause of the error?
Burst is generally a bit more efficient than Obi, specially on mobile platforms. However, Oni should work fine too and unless you're deploying to mobiles the difference will be negligible. Only cause that I can think of for it not working in your builds is that it is just not being included in the build. Select Obi/Plugins/libOni.bundle and make sure it's marked as included in Standalone builds, and x64 Mac architecture (these are the default settings):
let me know how it goes,
Posts: 6
Threads: 1
Joined: Feb 2022
Reputation:
0
Got it working with oni!!! You were right about the bundle file...the option to enable the plugin for any platform wasn't selected by default. I think this is actually identical to what happened to bribri_. As soon as I toggled on the checkbox for "Any Platform" and set the Mac OSX CPU dropdown to "Any CPU," it worked. Thanks so much for your help Jose, I'm pumped that we were able to get it working in our build!
Also if you're interested in seeing your tool in action, you can check out our game here:
https://pandamander.itch.io/o-kraken-my-kraken
My friend and I are attempting to make a game every month this year, and this was our first game together! Haha.
Enjoyed using obi fluid, and hope to use it again in future projects. Cheers.
- Cooper
|