Obi Official Forum
Bug / Crash SDF generation got slower in obi 5.5 beta - Printable Version

+- Obi Official Forum (https://obi.virtualmethodstudio.com/forum)
+-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html)
+--- Forum: Obi Cloth (https://obi.virtualmethodstudio.com/forum/forum-2.html)
+--- Thread: Bug / Crash SDF generation got slower in obi 5.5 beta (/thread-2457.html)



SDF generation got slower in obi 5.5 beta - TotahAmiti - 02-09-2020

Hey,

We've tried the new obi 5.5.
And it seems that the SDF generating code was ported to c#,
and that with the same model it now takes roughly 10 times more.

Do you have any idea why it takes so much longer?
We planned to use it to generate SDF real-time in our product, as we change our model and need a rebaking.

Bests


RE: SDF generation got slower in obi 5.5 beta - josemendez - 02-09-2020

(02-09-2020, 09:50 AM)TotahAmiti Wrote: Hey,

We've tried the new obi 5.5.
And it seems that the SDF generating code was ported to c#,
and that with the same model it now takes roughly 10 times more.

Do you have any idea why it takes so much longer?
We planned to use it to generate SDF real-time in our product, as we change our model and need a rebaking.

Bests

Hi there,

The old SDF generation code was written in c++ with some assembly, for that reason alone it is much faster. Algorithmically, it's the exact same thing that the version shipped in 5.5 though. So the only difference is the language used to write it.

Having C++ code around severely cripples our ability to support new platforms (which is one of the main reasons behind adding the Burst backend), so we decided to rewrite the SDF generation code in C# to make it platform agnostic. Same for all editor tools that used C++ code at some point. SDF generation is not generally done at runtime outside the editor (not in typical use cases, at least) so we took a temporary performance hit in benefit of wider platform support.

Expect performance to improve in next updates, as we extend Burst to editor tools and offline generation processes too.


RE: SDF generation got slower in obi 5.5 beta - TotahAmiti - 06-09-2020

(02-09-2020, 09:55 AM)josemendez Wrote: Hi there,

The old SDF generation code was written in c++ with some assembly, for that reason alone it is much faster. Algorithmically, it's the exact same thing that the version shipped in 5.5 though. So the only difference is the language used to write it.

Having C++ code around severely cripples our ability to support new platforms (which is one of the main reasons behind adding the Burst backend), so we decided to rewrite the SDF generation code in C# to make it platform agnostic. Same for all editor tools that used C++ code at some point. SDF generation is not generally done at runtime outside the editor (not in typical use cases, at least) so we took a temporary performance hit in benefit of wider platform support.

Expect performance to improve in next updates, as we extend Burst to editor tools and offline generation processes too.

Thanks again Jose for your response and great support Sonrisa