Crash in C4DNoise, whats wrong?
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 06/05/2009 at 03:44, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 11
Platform:
Language(s) : C++ ;---------
Howdy,can anyone tell me why this code crashs?
>
\> Bool Execute(BaseDocument \*doc) \> { \> \> \> \> \> AutoAlloc<BaseBitmap>bmp; \> AutoAlloc<C4DNoise>noise(1234); \> if(noise==NULL || bmp==NULL) return FALSE; \> \> bmp->Init(100, 100, 24); \> for(LONG x=0; x<100; x++) \> { \> for(LONG y=0; y<100; y++) \> { \> Real r = noise->Noise( NOISE_BUYA, FALSE, Vector(x, y, 0)) \* 255; \> bmp->SetPixel(x, y, r,r,r); \> } \> } \> ShowBitmap(bmp); \> return TRUE; \> } \>When I use NOISE_BOX_NOISE it works fine. Any suggestions? Thank you very much.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 06/05/2009 at 03:47, xxxxxxxx wrote:
Oh, I got it. Using InitFbm() works fine.
bye
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 06/05/2009 at 06:17, xxxxxxxx wrote:
Yes, you need to call InitFbm for these noise types:
NOISE_BUYA, NOISE_FBM, NOISE_OBER,NOISE_DISPL_VORONOI, NOISE_ZADA
Just for completeness and to avoid hair pulling if it crashes again
