How do I use GIMP to create masks to add photos to a Visual Studio scene?

I need to be able to take a jpg, cut out a portion of it that I want by removing its background, and then apply it to a plane in VS.  I don't have Photoshop, just Gimp. I realize that I need to create a separate mask file where the transparent part of the photo is black and the object of interest in the photo is white.  I tried to create such a mask as a PNG file by using the selection tools and paint bucket.  In VS, I created a plane, set the Surfaces | Base Color attribute to my original photo, and then the Surfaces | Cutout Opacity attribute to my mask file, followed by setting its slider = “1”.  

The problem is that, once the photo is applied to the plane in VS, the background that is supposed to be transparent appears as a gray-colored film, and not fully transparent.  I have spent hours trying to understand all of this with various videos, but nothing quite explains exactly what I am supposed to do here and I quickly get confused.  I am missing some important concept.  I get the feeling that there is more to it than simply painting the portion of the background black and the object in the foreground white and saving it as a PNG file.

Does anyone know how to use Gimp to create a mask that can be used in VS?

Comments

  • SofaCitizenSofaCitizen Posts: 1,879

    That doesn't sound like anything GIMP-specific but the transparent part of the cutout not working like that sounds a bit like the black is not really black. Make sure your cutout mask image is using RGB (not CMYK) and that the black is R=0 G=0 B=0 - or as a hexvalue #000000.

    Also, I may have misread your post a little but make sure your cutout image is just black and white. Black for Opacity=0 and White for Opacity=100%  - you do not want any other colours/details in there.

    Additionally, for most photo frames you do not need any transparency. If you look at the original image that comes with the asset you can make a new image at the same size (with any overlayed images you need) and swap out the base image. That is fine to do for your own images.

  • davidpratt14davidpratt14 Posts: 38
    edited September 2

    Thank you, SofaCitizen!  That was indeed the problem. The Gimp Opacity was just under 100%. Goodness gracious!

    Post edited by davidpratt14 on
  • I assume you mean Daz Studio, not Visual Studio.

  • charlescharles Posts: 845

    A couple of things extra when dealing with Daz Studio and the shaders. If you have an image or texture file like a .png file, and slide it into a shader slot like Opacity Cutout....then decide, hey that didn't look right, and change the source. YOu won't see the update in the shader slot even if you drag it back in due to how Daz caches, unless you restart. It should however use the right texture for rendering though. Also daz can't handle actual transparent levels in the original source, that's why you need to use the B&W opacity map. It allows for gradiance, so unless make sure you have full black or full white for the areas you want. Make sure to save using PNG, lossless, not JPG which could possibly cause greying through lossy compression. But also if you are still having issues, if you could show some examples that would help us grok the issue a bit better.

     

  • There is a refresh images command if an update is not picked up (in the Surfaces pane option menu, shortcut cmd/ctrl i).

    I do tend to avoid using PNG alpha as it has behaved oddly in some cases, but I am not sure it is correct to say DS can't handle it.

Sign In or Register to comment.