InitFbm(), max_octaves, and Ridged Multifractal
-
On 29/03/2017 at 03:41, xxxxxxxx wrote:
User Information:
Cinema 4D Version: R18
Platform: Windows ; Mac ; Mac OSX ;
Language(s) : C++ ;---------
Hi,got a little question... did the definition of InitFbm() change some time after R13? I see in my old code from that time that I used to pass a Real value as max_octaves to InitFbm(), but nowadays the function wants only an Int32. It seems that the definition of InitFbm() has changed some time after R13. Maybe R14, as I can't find any mention about changes in this function in the API changes since R15. Of course, there is a chance that I simply used the wrong data type back in the R13 days.
Funny: If you call InitFbm() with a max_octaves value of "1", the Ridged Multifractal Noise comes out inverted on Windows (mountains are valleys and valleys are mountains). On Mac that does not happen. I could reproduce this behavior even on an old R16 on Windows. I don't think it's desired to have different behavior on both platforms?
Also funny: The actual max_octaves value in InitFbm() does not seem to have any effect on the resulting Ridged Multifractal Noise. I have tried values from 1 up to 18, (always using 4.0 octaves in the RidgedMultifractal() function), and there was absolutely no difference in the resulting patterns (well, except for the inversion on Windows). Is that on purpose?
Cheers,
Frank -
On 29/03/2017 at 12:32, xxxxxxxx wrote:
Originally posted by xxxxxxxx
<ADDRESS>
User Information:
Cinema 4D Version: R18
Platform: Windows ; Mac ;
Mac OSX ;
Language(s) :
C++ ;---------
</ADDRESS>Hi,
got a little question... did the definition of InitFbm() change some time after R13? I see in my old code from that time that I used to pass a Real value as max_octaves to InitFbm(), but nowadays the function wants only an Int32. It seems that the definition of InitFbm() has changed some time after R13. Maybe R14, as I can't find any mention about changes in this function in the API changes since R15. Of course, there is a chance that I simply used the wrong data type back in the R13 days.
[...]No, the definition didn't change (the legacy Data Types look different, but represent the same PODs)
This was Cinema 4D 9.5:
void InitFbm(Real *table, LONG max_octaves, Real lacunarity, Real h)
And this is R18.041:
void InitFbm(Float *table, Int32 max_octaves, Float lacunarity, Float h)
Best regards,
Wilfried
-
On 30/03/2017 at 03:00, xxxxxxxx wrote:
Hi Frank,
I can't reproduce the differences between OSX and Windows. Can you provide me with a small code snippet (maybe a Python script), which demonstrates the differences?
-
On 31/03/2017 at 04:47, xxxxxxxx wrote:
OK, so it can't be due to a change in parameter datatypes...
I'll see if I can make a small example to demonstrate the issue.Thanks so far @ Andreas & Wilfried
Cheers,
Frank