Arnold Procedural confusion - possibly just a C++ issue

Hello. I am experimenting with Mandelbulb fractals in Arnold for Maya based on some examples from the Arnold documentation. When using the C++ source code and the provided DLL from the Arnold 4 documentation found here (see Source Code section):

https://support.solidangle.com/display/ARP/Large+Datasets+from+Procedurals

everything behaves as expected when working with Arnold 4. Changing the different parameters has the desired response.

However, when using the more up-to-date Mandelbulb.cpp source code and it’s corresponding DLL from the new Arnold 5 documentation here:

https://support.solidangle.com/display/A5ARP/Large+Datasets+from+Procedurals

I have found that both the “power” attribute and the “julia” attribute do not work properly in Arnold 5. The “power” attribute merely seems to have a subtle scaling effect on the generated fractal, when it should instead have a very drastic effect on the overall form of the Mandelbulb. The “julia” parameter, intended to be a boolean switch which changes the fractal from a Mandelbulb to it’s corresponding Julia Set fractal, simply causes the fractal to disappear. The Arnold procedural still takes time to generate points, just with no visual result.

I have used this tool - https://text-compare.com/ - in order to compare the two source code versions, but the math/procedure for generating the Mandelbulb appears to be the same in each. The only major change to the math I noticed was that the Arnold 4 version utilized a kind of optimized version of achieving some inverse square math based on some code from Quake3, but I created my own DLL from the Arnold 5 C++ code replacing it’s regular “1/sqrt(x)” math with the Arnold 4 method and the issue still remained.

Arnold 5 seems to have several changes to its C++ API compared to Arnold 4, but my experience with C++ is fairly limited and I haven’t yet found any obvious reason why the new source code does not behave as expected. If anyone with more C++ experience could take a look and see if they could spot the difference between the two code versions, I’d be grateful.

Thank you very much for reading this long post and taking the time to help.

Can you get the running code under a debugger? If the operative code is unchanged, the parameters being passed are probably being mangled before they get to the fractal generator; that might happen if somebody’s doing an unexpected cast or simply scaling a value in the UI.

Hi, @Theodox. Thanks for the reply.

I haven’t had the opportunity to continue troubleshooting this issue, but I made a post at the Arnold support community here:

and they are going to try to update their documentation with working code.

I will make an update here if I make any progress with this problem or new working source code gets put on the Maya to Arnold docs. You’re correct that tracing the trouble parameters through the code is probably the best way to see what’s going on here, since certain parameters behave as expected.

Thanks, again!

Just wanted to follow up here and mention that the Arnold 5 documentation has been updated with working versions of this Mandelbulb procedural. Thanks, again, @Theodox for stopping by the thread. Cheers!