The Weirdness of PNG files

Ghosty12Ghosty12 Posts: 2,068

Doing well redoing a comic I did years ago for a website, and getting everything ready and wanting to be even fancier with my characters.. I decided I wanted logos and so on for my heroes outfits, and so got stuck into making them.. Anyway while doing some test renders, I came across this issue with PNG files not rendering properly as the images below show, that in viewport everything is fine but on rendering in iRay the logo came out as a big black square..

The weird part is that in earlier test renders with an early version of the logo they worked, but for reasons that still flumox me later versions of the logo decided not to.. What I can't work out is that changing the logo image in photoshop (since I did not really like my original) a little would make the image not work when rendering in Daz Studio, yet as before the original logo that was created in Photoshop and was a PNG and worked nicely..

In short I have no idea now what I did in Photoshop on the earlier PNG for it to work that later ones would not, in the end I saved them as TIFF and all seems good now but is still a mystery as to what I got right and wrong.. If anyone can give me any suggestions please on what I need to do and where I may have gone wrong would be greatly appreciated, thank you in advance..  :)

 

Viewport.jpg
752 x 920 - 115K
Render.png
700 x 1400 - 786K

Comments

  • felisfelis Posts: 4,697

    I think you have to add how you have applied the logo. Png supports alpha channel, but I don't think tiff does.

  • Ghosty12Ghosty12 Posts: 2,068
    edited June 2020
    felis said:

    I think you have to add how you have applied the logo. Png supports alpha channel, but I don't think tiff does.

    Ahh thank forgot that bit.. :) The logo has the bird on a transparent background and saved as a PNG, then just dropped it into the diffuse and glossy settings in the surfaces tab for those parts of the suit..  The funny thing is that when I had them TIFF and did the same thing they worked fine, I know I messed up somewhere just not sure where..

    Post edited by Ghosty12 on
  • lilweeplilweep Posts: 2,561
    Ghosty12 said:
    felis said:

    I think you have to add how you have applied the logo. Png supports alpha channel, but I don't think tiff does.

    The logo has the bird on a transparent background and saved as a PNG, then just dropped it into the diffuse and glossy settings in the surfaces tab for those parts of the suit.. 

    is this not something that should go in OP...?

    Anyway, dont you need an opacity mask to mask out opacity? I didn't realise you could just put a transparent PNG in diffuse and expect the alpha mask to apply. 

  • Ghosty12Ghosty12 Posts: 2,068
    edited June 2020
    lilweep said:

    Cheers for the link forgot about using the LIE method will try that instead.. Will also try the other methods there are well thank you for the info.. :)

    Post edited by Ghosty12 on
  • LeatherGryphonLeatherGryphon Posts: 11,682
    felis said:

    I think you have to add how you have applied the logo. Png supports alpha channel, but I don't think tiff does.

    I'm pretty sure TIFF does support alpha channels.  Wasn't that one of the major features of TIFF when it came out back when we were still painting on cave walls?

  • NorthOf45NorthOf45 Posts: 5,558

    I don't think Studio shaders directly support images with alpha channels, which is probably why there is still an HSV/RGB color selector and separate opacity controls. You will have to convert the .png or .tiff to .jpg or other RGB format and make an opacity mask from the alpha channel. I know I have had to do that before.

  • felisfelis Posts: 4,697

    You can use png with alpha channel in LIE.

  • MelissaGTMelissaGT Posts: 2,611
    edited June 2020

    What I would do is modify the base clothing texture directly with the logo you are trying to add. I did that in this image with both the banner and Rosawyn's skirt - 

    That way, you can ensure that the logo blends in as part of the actual fabric, hopefully avoiding the "sticker" look. 

    Post edited by MelissaGT on
  • NorthOf45NorthOf45 Posts: 5,558
    felis said:

    You can use png with alpha channel in LIE.

    Yes, but that is before the shaders get the image. LIE builds a new .png, which will use the alpha layers during compositing, but the shader will only use the RGB channels for color. (I'm talking about surfaces; environments and lighting can use higher bit depths, but they aren't surfaces)

  • Ghosty12Ghosty12 Posts: 2,068
    edited June 2020

    The issue is that in my OP I am using the super suit with all of its material zones, and using some of the iray shaders was no issue.. But trying to do the L.I.E method did not seem to work correctly or was doing something wrong which is possible.. For me at the moment with certain shaders using TIFF's worked out for me.. Thank you all for the help.. :)

    Post edited by Ghosty12 on
  • outrider42outrider42 Posts: 3,679

    How about a decal then? A decal can be freely positioned overlapping any material zones.

  • ed3Ded3D Posts: 2,303
    edited June 2020

    _  both TIF and PNG can have Transparency 

    from google: https://www.quora.com/Which-image-formats-allow-for-transparent-backgrounds

    Among the file formats that allow alpha channel (transparency) are: PNG, TGA (32 bit), TIFF (32 bit), EXR, GIF, BMP. There are many others but these are the most common.

    It is important that these images are in RGB mode. CMYK mode does not support alpha. Also for some of them one has to specifically save it at 32 bits, 24 bits for color plus 8 bits for alpha.

    Post edited by ed3D on
  • AscaniaAscania Posts: 1,855
    ed3D said:

    _  both TIF and PNG can have Transparency 

    from google: https://www.quora.com/Which-image-formats-allow-for-transparent-backgrounds

    Among the file formats that allow alpha channel (transparency) are: PNG, TGA (32 bit), TIFF (32 bit), EXR, GIF, BMP. There are many others but these are the most common.

    It is important that these images are in RGB mode. CMYK mode does not support alpha. Also for some of them one has to specifically save it at 32 bits, 24 bits for color plus 8 bits for alpha.

    From your link: GIF: GIF supports a full 256 color range but only 256 colors can be referenced at once. As for transparency, GIF does not support alpha-channel transparency.

     

  • 3Diva3Diva Posts: 11,751

    What I would do is modify the base clothing texture directly with the logo you are trying to add. I did that in this image with both the banner and Rosawyn's skirt - 

    That way, you can ensure that the logo blends in as part of the actual fabric, hopefully avoiding the "sticker" look. 

    Gorgeous render! The modifications look great. 

Sign In or Register to comment.