Obi Official Forum
Bug / Crash Sticky collision material is broken? - Printable Version

+- Obi Official Forum (https://obi.virtualmethodstudio.com/forum)
+-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html)
+--- Forum: Obi Fluid (https://obi.virtualmethodstudio.com/forum/forum-3.html)
+--- Thread: Bug / Crash Sticky collision material is broken? (/thread-2766.html)

Pages: 1 2


Sticky collision material is broken? - asimofu_ok - 25-02-2021

Hi.
Fluid particles containing sticky collision materials bounce off and scatter when in contact.
For example in FluidViscosity sample.
[attachment=897]

This happened at Unity 2019.4.21f1 and 2020.2.6f1.
Something broken?


RE: Sticky collision material is broken? - josemendez - 25-02-2021

(25-02-2021, 09:48 AM)asimofu_ok Wrote: Hi.
Fluid particles containing sticky collision materials bounce off and scatter when in contact.
For example in FluidViscosity sample.


This happened at Unity 2019.4.21f1 and 2020.2.6f1.
Something broken?

The viscosity scene uses a sticky material by default, but I can't reproduce this in either Unity version (testing right now).

Only way I can get it to behave similar to this is using huge values for the stickiness parameter (> 10), which is expected to cause problems, since the sticky impulse becomes much larger than the depenetration impulse. Having a very large stick distance will also cause weird behavior (and have a very negative impact on performance, as particles now need to check object proximity inside a very large radius).

What are your collision material parameters?


RE: Sticky collision material is broken? - asimofu_ok - 25-02-2021

(25-02-2021, 09:55 AM)josemendez Wrote: The viscosity scene uses a sticky material by default, but I can't reproduce this in either Unity version (testing right now).

Only way I can get it to behave similar to this is using huge values for the stickiness parameter (> 10), which is expected to cause problems, since the sticky impulse becomes much larger than the depenetration impulse. Having a very large stick distance will also cause weird behavior (and have a very negative impact on performance, as particles now need to check object proximity inside a very large radius).

What are your collision material parameters?
[attachment=898]
I'm using the Obi Fluid sample imported into the newly created project as it is.


RE: Sticky collision material is broken? - josemendez - 25-02-2021

(25-02-2021, 10:40 AM)asimofu_ok Wrote: I'm using the Obi Fluid sample imported into the newly created project as it is.

I'm unable to reproduce this behavior, Unity 2019.4.21, new project, imported asset from the store. What Obi version are you using?


RE: Sticky collision material is broken? - asimofu_ok - 25-02-2021

(25-02-2021, 10:42 AM)josemendez Wrote: I'm unable to reproduce this behavior, Unity 2019.4.21, new project, imported asset from the store. What Obi version are you using?

I'm using Obi 6.0.1.


RE: Sticky collision material is broken? - josemendez - 25-02-2021

(25-02-2021, 10:46 AM)asimofu_ok Wrote: I'm using Obi 6.0.1.

Hi there,

Could reproduce. Seems like a bug, will fix it an provide a patch asap. thanks for reporting this!


RE: Sticky collision material is broken? - asimofu_ok - 25-02-2021

(25-02-2021, 10:57 AM)josemendez Wrote: Hi there,

Could reproduce. Seems like a bug, will fix it an provide a patch asap. thanks for reporting this!
OK. Thank you for your prompt response.


RE: Sticky collision material is broken? - josemendez - 25-02-2021

FYI: this only affects the Oni backend.

Switching to the default backend (Burst) results in correct behavior. While I get this fixed, you can use Burst. Install the Burst dependencies if you haven't installed them yet, see:
http://obi.virtualmethodstudio.com/tutorials/backends.html


RE: Sticky collision material is broken? - josemendez - 25-02-2021

Found and fixed the bug. In was simply a wrong sign (+ instead of -), coupled with a mistake in the unit test that tested it.

The fix will be included in the next update, let me know if you need a patch and I'll recompile the engine library for you.

kind regards,


RE: Sticky collision material is broken? - asimofu_ok - 25-02-2021

(25-02-2021, 11:11 AM)josemendez Wrote: Found and fixed the bug. In was simply a wrong sign (+ instead of -), coupled with a mistake in the unit test that tested it.

The fix will be included in the next update, let me know if you need a patch and I'll recompile the engine library for you.

kind regards,

Then, could you give me a patch?
This issue of Obi is a bit important in my current project.
(And I'm sorry, I want to avoid using Burst for the time being...)

Thank you.