Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Recent
    • Tags
    • Users
    • Login

    Crash in C4DNoise, whats wrong?

    Scheduled Pinned Locked Moved SDK Help
    3 Posts 0 Posters 236 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H Offline
      Helper
      last edited by

      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.

      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        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

        1 Reply Last reply Reply Quote 0
        • H Offline
          Helper
          last edited by

          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 🙂

          1 Reply Last reply Reply Quote 0
          • First post
            Last post