Transparency below 20% is fully transparent.



  • 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?



  • 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



  • 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)   
    


  • 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



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

    Great. Always willing to help into making Cinema 4D a better tool :-)


Log in to reply