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
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Transparency below 20% is fully transparent.

    Scheduled Pinned Locked Moved Bugs
    5 Posts 0 Posters 981 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

      On 18/08/2015 at 10:45, xxxxxxxx wrote:

      When I set the transparency of a bitmap in the viewport with BaseDraw.SetTransparency with a value below 50 (25% in the 0-255 range), and draw the bitmap with BaseDraw.DrawTexture with the alphamode set to DRAW_ALPHA_NORMAL or DRAW_ALPHA_FROM_IMAGE, the bitmaps disappears.

      If the alphamode is set to DRAW_ALPHA_NONE, everything works fine.

      Is this a limitation or a bug?

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

        On 19/08/2015 at 01:29, xxxxxxxx wrote:

        Hello,

        could you provide some code that shows what exactly you are doing and that would help us to reproduce the issue?

        Best wishes,
        Sebastian

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

          On 19/08/2015 at 17:08, xxxxxxxx wrote:

          Using this code, I get smooth transparencies from 0 to 255:

            
          bd.SetTransparency(-trans)   
          padr=[c4d.Vector(x,y,0),c4d.Vector(x+w,y,0),c4d.Vector(x+w,y+h,0),c4d.Vector(x,y+h,0)]   
          cadr=[c4d.Vector(1,1,1),c4d.Vector(1,1,1),c4d.Vector(1,1,1),c4d.Vector(1,1,1)]   
          nadr=[c4d.Vector(0,0,-1),c4d.Vector(0,0,-1),c4d.Vector(0,0,-1),c4d.Vector(0,0,-1)]   
          uvadr=[c4d.Vector(0,0,0),c4d.Vector(1,0,0),c4d.Vector(1,1,0),c4d.Vector(0,1,0)]   
          bd.DrawTexture(image,padr,cadr,nadr,uvadr,4,c4d.DRAW_ALPHA_NONE,c4d.DRAW_TEXTUREFLAGS_INTERPOLATION_LINEAR)   
          

          But with this code, as soon as the transparency is set to 50 or below, the drawn image simply disapears.

            
          bd.SetTransparency(-trans)   
          padr=[c4d.Vector(x,y,0),c4d.Vector(x+w,y,0),c4d.Vector(x+w,y+h,0),c4d.Vector(x,y+h,0)]   
          cadr=[c4d.Vector(1,1,1),c4d.Vector(1,1,1),c4d.Vector(1,1,1),c4d.Vector(1,1,1)]   
          nadr=[c4d.Vector(0,0,-1),c4d.Vector(0,0,-1),c4d.Vector(0,0,-1),c4d.Vector(0,0,-1)]   
          uvadr=[c4d.Vector(0,0,0),c4d.Vector(1,0,0),c4d.Vector(1,1,0),c4d.Vector(0,1,0)]   
          bd.DrawTexture(image,padr,cadr,nadr,uvadr,4,c4d.DRAW_ALPHA_NORMAL,c4d.DRAW_TEXTUREFLAGS_INTERPOLATION_LINEAR)   
          
          1 Reply Last reply Reply Quote 0
          • H Offline
            Helper
            last edited by

            On 20/08/2015 at 23:55, xxxxxxxx wrote:

            Hello,

            indeed, this seems to be a bug. Thanks for reporting this, a bug report was filed.

            Best wishes,
            Sebastian

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

              On 21/08/2015 at 04:13, xxxxxxxx wrote:

              Great. Always willing to help into making Cinema 4D a better tool 🙂

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