Difference in calculation between Mac and PC / Instancing / TOPs

64-Bit Build 2021.15800 Mac

hello everybody,

the last three days i tried to figure out why some calculation in a tutorial from paketa12 is not working. it has been driving me crazy cause i couldn´t figure it out. it started with the kissing sphere tutorial on patreon (https://www.patreon.com/posts/kissing-spheres-30954103). since the calculation is the same in the the elastic grid tutorial is the same, and he provided a file. (https://www.patreon.com/posts/elastic-grid-in-60430593)

The problem turned out to be the same in both tutorials. long things short: paketa12 and i had a video talk yesterday night and tried to figure out whats the problem. we couldnt solve it as files on his machine are working, and once im opening it, the problem occurs again.

Basically everything should look like in the tutorial and shows up like this on my mac:

To figure out if its a problem in the instancing we made a file with two DAT-tables and fixed sizes and middle points and used it for instancing in the geometry. this seems to be working. File is provided here. working on mac and pc. testinwithpaketa_SIMPLE.toe (3.9 KB)

then we made the calculation on both computer and exchanged them. pc working, mac doesnt.
testinwithpaketa_SIMPLE2.toe (4.5 KB)

we haven´t been able to figure out the problem yesterday, so we would be super happy to figure out where the problem is.
really looking forward to find a solution for this. thanks in advance.

i´ll be happy to provide our testing files and links to the project, once you give me the permission to do so.

best regards from berlin
florian

Hey @FlorianLamm

Thanks for the report and sorry you are encountering this issue.

You should be able to upload a file now, or you can send the file at support@derivative.ca and mention this forum post.

Best,
Michel

Thanks so much michel, i updated the post with the files.

Hey @FlorianLamm

Pretty sure I found the origin of the issue :slight_smile: It’s the Math TOP rounding to integer that seems to be different between PC and Mac when fed with the Ramp TOP.

I will log an issue for a developer to look into it.

Here is a minimal sample file where you can see it: mathTOProundMac.toe (3.9 KB)
cc @paketa12

Just to make sure we can track down if it’s on a specific hardware, can you please share the specs / a screenshot of your Mac “About this mac” dialog ? (Apple logo top left → About this mac)

Thanks,
Michel

1 Like

thank you so much for that fast reply @JetXS

please see my mac specs here:



1 Like

When rounding a value of 0.5, the direction it will go (0 or 1) is GPU dependent, there is no guarantee which direction it will go unfortunately.

1 Like

thank you so much, Michel and Malcolm …you guys are fantastic

just for some future projects: is there any workaround or does this basically means to avoid rounding with math top? or could this maybe even be fixed in a future release?

If you need a deterministic result then likely the route you are taking to generate this data needs to be different. It’s not something we can fix, it’s just how the GPU behaves.

I didn’t know about this ‘round math’ misleading but this type of diagonal is very important in TOPs computation and so here are two alternatives: one with a simple rotation for which you need a precise pivot and my favorite one, with displace TOP with 1/2 ramp values and pivot y to 0.

2 Likes

Perhaps instead you could use Ceiling or Floor, whichever you wanted in this case. I am assuming those functions are not GPU dependent.

1 Like

@paketa12 Can you maybe sent me that file, so i can see if it works and what you have down exactly?

@ben unfortunately ceiling and floor is not working for me. or at least its reproducing the same failure.
but i also guess that im a bit to much of a noob to have a proper guess why thats the case.