Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Jun 2009

    how to manage transaprency in m3g


    I have an image with a transparent background and I want to texture it on a mesh, the problem is that if I do it , I have a black area around in the background zone.
    Do you have any idea on how to play with the blending and the compositing mode in order to obtain the transparency?Here is what I used to create this

    Image2D image2D = new Image2D( Image2D.RGB, iImage );
    textureLeaf = new Texture2D( image2D );
    CompositingMode cm = new CompositingMode();
    Mesh cubeMesh = new Mesh(_cubeVertexData, _cubeTriangles2, appearance2);

    Thank you

  2. #2
    Nokia Developer Expert
    Join Date
    Mar 2009

    Re: how to manage transaprency in m3g

    It looks like your texture doesn't have an alpha channel, so it won't have any transparency either. Try using Image2D.RGBA instead of Image2D.RGB, and make sure that the source image ("iImage") has an actual alpha channel (instead of color-key transparency). You should also use CompositingMode.ALPHA instead of REPLACE. I hope this helps.


Similar Threads

  1. m3g file creator
    By yehoshua in forum Mobile Java Media (Graphics & Sounds)
    Replies: 1
    Last Post: 2007-11-26, 13:48
  2. Known bugs in the Nokia M3G implementation
    By taarnio in forum Mobile Java Media (Graphics & Sounds)
    Replies: 5
    Last Post: 2005-11-14, 13:51
  3. M3G (JSR 184) Detail about External Reference in m3g file
    By amitian in forum Mobile Java Media (Graphics & Sounds)
    Replies: 1
    Last Post: 2004-12-28, 15:50

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts