Announcement

Collapse
No announcement yet.

Transparent .png

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Transparent .png

    I have noticed thta Vray does not render transparent .png. One has to include clipmap. Is there a plan to support this in new upcoming version?

  • #2
    Re: Transparent .png

    I think Damien has mentions that they'll look into that. Not sure if it's promised. But it has been requested that there's at least some option to make V-Ray read the PNG alpha channel. I'd sure simplify and streamline the workflow.
    Please mention what V-Ray and SketchUp version you are using when posting questions.

    Comment


    • #3
      Re: Transparent .png

      It is definitely on the list as that makes working with SU billboards much easier. If we're lucky, there's a way through V-Ray's bitmap reader to get the alpha information. If not, then we'll have to write our own custom bitmap loader. Obviously the first is easier, but the second isn't so hard that it would be a barrier to supporting this. Its really just a matter of when this fits into the development schedule.
      Damien Alomar<br />Generally Cool Dude

      Comment


      • #4
        Re: Transparent .png

        I wonder, if VfSU reads png alpha channels automatically, it might actually not render correctly? I only ask because with some png materials I use (especially motion-blurred people) I have to manually adjust the climap in Photoshop to ensure that no white halo appears around the actual diffuse map pixels in the render. I assume an "alpha channel override" would be included so we could continue to insert standard clipmaps into the transparency slot? Or would automatic alpha channel detection inherently eliminate white halos?
        SU 2018 + VfSU 4.0

        Comment


        • #5
          Re: Transparent .png

          Originally posted by Jackson
          I wonder, if VfSU reads png alpha channels automatically, it might actually not render correctly? I only ask because with some png materials I use (especially motion-blurred people) I have to manually adjust the climap in Photoshop to ensure that no white halo appears around the actual diffuse map pixels in the render. I assume an "alpha channel override" would be included so we could continue to insert standard clipmaps into the transparency slot? Or would automatic alpha channel detection inherently eliminate white halos?
          The white halo is due to the transparent pixels also fading to white.

          If you make a copy of the original alpha channel, then fill the background with a colour similar to the edges, and then reapply the alpha channel your transparent edge pixels will not fade into white anymore and you shouldn't see the white halo.

          Maybe some screenshots would be better here?
          Please mention what V-Ray and SketchUp version you are using when posting questions.

          Comment


          • #6
            Re: Transparent .png

            Thom,

            I know what causes the halo (I thought that was obvious from my post? ).

            It's not possible to simply fill the background with an opaque solid colour as the pixels around the edge of most alpha images (people, trees, etc) aren't uniform. That was one of the first things I tried, making the background of trees solid green, but it looks ridiculous- a green halo instead. Furthermore I construct my png image components in such a way that they display correctly in SU and render correctly in VfSU so I can export raw SU renders or VfSU renders without changing any settings. If the png images had opaque backgrounds they would display incorrectly in SU.

            Of course the whole thing is caused by having to manually create grayscale clipmaps from RGB diffuse maps in the first place- a 255,255,255 white pixel and a 0,0,0 black pixel in an RGB diffuse map will turn into a 100% transparent alpha pixel and 100% opaque alpha pixel when converted to grayscale, causing any white pixels to disappear and black ones to be disproportionately opaque when rendered. I thought the Photoshop right-click layers "select pixels" trick would work around that, but it seems to select all visible pixels as opaque, even if they're 99.9% transparent. Any thoughts or Photoshop tips? I find the same problem with many downloaded diffuse and clipmaps, especially trees- they have the sky-coloured or purple halo around the details in the canopy. Only way I've found around it is to manually adjust the clipmap in PS.
            SU 2018 + VfSU 4.0

            Comment


            • #7
              Re: Transparent .png

              Might only work on tga files... Thought it would work in pngs as well...
              http://www.robinwood.com/Catalog/Tec...hiteHalo1.html
              http://www.robinwood.com/Catalog/Tec...hiteHalo2.html

              Su reads TGA images, but does it read the alpha channel?
              Please mention what V-Ray and SketchUp version you are using when posting questions.

              Comment


              • #8
                Re: Transparent .png

                Ahhh... in that tutorial link you posted I found the key to making it work- a free PS plugin which produces "rays" of colour radiating out from the opaque pixels! I'll have a little play with it and post the results back here. Unfortunately it would still mean that the same pngs wouldn't display correctly in SU.

                Originally posted by thomthom
                SU reads TGA images, but does it read the alpha channel?
                I just tested and the short answer is no... but the long answer is weird! If you save it at 16 bits/pixel SU reads the alpha channel, but the image looks insane, like a psychedelic 1960's poster... totally unusable. If you save it at the default 24 bits/pixel or 32 bits/pixel the image looks ok, but SU doesn't read the alpha channel! ???
                SU 2018 + VfSU 4.0

                Comment


                • #9
                  Re: Transparent .png

                  TGA image where the edges bleeds out and an alpha channel vs PNG with transparency:



                  Test model: http://download.thomthom.net/3d/sketchup/opacity.zip

                  The white halo effect isn't so very apparent in this example, but still there in the PNG version.
                  The TGA displays fine in SU as it reads the alpha channel.



                  In the PNG the alpha transparent pixels blends to white, but in the TGA it blends with the extra colour bleeding.


                  In PS you see that it doesn't display as transparent, but the alpha channel is still there.
                  Please mention what V-Ray and SketchUp version you are using when posting questions.

                  Comment


                  • #10
                    Re: Transparent .png

                    In my tests when I save with 32bits/pixels SU reads the alpha correctly.
                    With 24bit, SU doesn't.
                    With 16bit everything goes funky like an acid trip. (not that I've ever been on one...)
                    Please mention what V-Ray and SketchUp version you are using when posting questions.

                    Comment


                    • #11
                      Re: Transparent .png

                      Originally posted by thomthom
                      In my tests when I save with 32bits/pixels SU reads the alpha correctly.
                      Weird, that conflicts with my results. How did you save the TGA? I just opened a PNG and "saved as" in Photoshop.
                      SU 2018 + VfSU 4.0

                      Comment


                      • #12
                        Re: Transparent .png

                        The bush textured used in my example, and include in the .zip file, was originally a jpeg with accompanying alpha image.

                        I opened the file and created a new channel where I pasted the content of the alpha bitmap. Image->Mode was ticked to RGB 8bits/Channel.

                        When I saved I just left it on the default 32bits/pixel info and left the Compress (RLE) unticked. Done in PS CS4.
                        Please mention what V-Ray and SketchUp version you are using when posting questions.

                        Comment


                        • #13
                          Re: Transparent .png

                          That's strange, the only differences are that my "saved as" TGA was originally a PNG (but saved with exactly the same settings as yours) and I'm using PS CS3.

                          Results are back regarding the "Flaming Pear" Solidify PS Plugin and they're very good, see below. The big catch is that as the last image shows, pngs now don't display correctly in SU as they no longer have any transparency, but the VfSU render is excellent- perfectly clean edges to the figures. Thanks for another great tip Thom!

                          Here's the direct link to the Flaming Pear PS plugin collection. The "Solidify" plugin is in the "Free Plugins" collection.

                          http://flamingpear.com/download.html



                          SU 2018 + VfSU 4.0

                          Comment


                          • #14
                            Re: Transparent .png

                            Could you send me the original PNG, the solidfies PNG. and the TGA result you get? So I can poke around?
                            Please mention what V-Ray and SketchUp version you are using when posting questions.

                            Comment


                            • #15
                              Re: Transparent .png

                              No problem, check your forum inbox.
                              SU 2018 + VfSU 4.0

                              Comment

                              Working...
                              X