Render to Transparency Shader

Something that I believe would be really useful is a "Render to Transparency" shader.  When the .png render is finished any surfaces that had that shader would be transparent.  I would use something like this for video game graphics where the character walks between two objects in the scene and I need the foreground to be in front of the character and a background image behind the character.  Currently I try to photoshop out these areas but it's teidious and doesn't always turn out well.

Another use might be for rendering clothes or hair on a character that renders to transparent.  That way maybe clothes or hair could be swapped onto different characters in a game without re-rendering the characters over and over again with different options.

I'm sure there would be many other uses for this too.

If there is a way to already do this please let me know thanks!

Thanks for considering!

 

For an example, in the picture, for a 2D point and click adventure game if I wanted a character to walk up the stairs I would need two images, one in front and one behind the character.  It would be very difficult to manually erase all of the inbetween spaces inbetween the stair railings and other details and this is where the transparency would really be beneficial.

(credit: content by petipet)

daz1.JPG
1447 x 891 - 216K

Comments

  • SevrinSevrin Posts: 6,306
    edited July 2020

    I don't know why you'd want to render to transparent when you could just hide whatever you want to be transparent.  You can already achieve do all that other stuff with Iray canvasses, HDRIs and the matte function.  

    @MEC4D made 3 nice videos about the matte function which would settle the handrail or whatever thing.  Here's the first one.

     

    Janna Sauna-Bty-Beauty.jpg
    800 x 800 - 288K
    Janna Sauna-Bty-Beauty No Janna.jpg
    800 x 800 - 239K
    Janna Sauna-Bty-Beauty No Bikini.jpg
    800 x 800 - 271K
    Janna Sauna-JannaDressed-Beauty.jpg
    800 x 800 - 98K
    Janna Sauna-Bikini-Beauty.jpg
    800 x 800 - 47K
    Post edited by Sevrin on
  • KravenKraven Posts: 16

    Hi Sevrin, thanks for your reply.  I understand that I could hide/show different parts of the scene but for sometimes I need to render part of an object but not all of it.  Thanks for sharing the video and the tutorial.  I guess for my applications it seemed easier if I could render a part of the image into transparency than into any color so I wouldn't have to do any photoshopping and trying to get the edge refine just right.  I'm trying to make a point and click game in Unity's Adventure Creator.

  • nemesis10nemesis10 Posts: 3,415
    Kraven said:

    Hi Sevrin, thanks for your reply.  I understand that I could hide/show different parts of the scene but for sometimes I need to render part of an object but not all of it.  Thanks for sharing the video and the tutorial.  I guess for my applications it seemed easier if I could render a part of the image into transparency than into any color so I wouldn't have to do any photoshopping and trying to get the edge refine just right.  I'm trying to make a point and click game in Unity's Adventure Creator.

    It is pretty easy to mask opacity; the Sickleyield invisible suit is an example.

  • Silent WinterSilent Winter Posts: 3,720

    You could also use the geometry editor to hide some of the polys (so you're just rendering the right-hand side of the stair-rail for example). (Bear in mind that'd affect the lighting though). Using Iray section planes might work too (I *think* you can use those in reverse so that only the foreground is shown)

Sign In or Register to comment.