32-bit texture and transparency

  • Pat Stevenson

    Pat Stevenson - 2012-12-11

    I'm building 2 AuthorMesh's, one that has a 32-bit texture loaded as PNG using libpng, and one that has transparency turned on using SetOpacity() from IFXMaterialResource.  The transparency is not showing through to the textured mesh beyond.  If I use a 24-bit texture adjusting for the size within libpng, everything is fine.  But not with a 32-bit texture with alpha channel.  Any ideas?

  • Michail Vidiassov

    Is there the bug in Intel viewer or only in Adobe Reader?
    What is Adobe Reader version?
    In what Rendering mode: Software, OpenGL, Direct X?

  • Pat Stevenson

    Pat Stevenson - 2012-12-14

    Adobe Reader is X and I've tried all Rendering Modes.  Deep Exploration doesn't show the transparency at all, unless I manipulate the u3d file directly.  24-bit works fine, it's just a 32-bit texture.  I tried stripping the alpha channel by libpng at the time of read, but still doesn't work.  I've been thinking about re-writing the PNG file back out as 24-bit and re-read in as 24-bit.  As I've looked through the U3D software it seems to handle 32-bit correctly.  So not sure.

  • Pat Stevenson

    Pat Stevenson - 2012-12-15

    Did some checking.  I'm actually using Adobe Reader 8.3.1 and that's the same version my customer has.  Although they probably have access to a later version.  The Renderers available are DirectX8, DirectX9, and Software.  The result is the same in all cases.  I'm using libharu to output the 3D PDF and I'm setting that version to HPDF_VER_17.

  • Pat Stevenson

    Pat Stevenson - 2012-12-17

    Found my problem.  Using libpng, I was using transforms during png_read_png() like PNG_TRANSFORM_STRIP_16 and PNG_TRANSFORM_STRIP_ALPHA to process the incoming image for texturing onto the IFXTextureObject.  I was trying to force a 24-bit texture during the read, but after taking the transforms out and accounting for the number of channels in the info_ptr after png_read_png() everything loads correctly.  My AuthorMesh now shows transparency through to the textured 2nd AuthorMesh behind it.  I wish the forum allowed me to post images, I would include a screenshot.


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks