Solved In a screenshot with transparent BG, why are clothing items not properly rendered?

greedylust23

New member
Messages
4
Reactions
3
Points
3
Greetings, I'm facing this unexpected behavior and was hoping if someone could help me figure out why it is happening.

I have a plugin that allows me to take screenshots with a transparent BG. Nothing very fancy, I basically un-toggle the skybox and the plugin does the rest by capturing the camera's image in a RenderTexture, which then gets exported as a PNG image.

But after looking at the result I noticed that the clothing, when not "covering" a person atom's body, doesn't get rendered (see screenshot below). So it appears as if it was cropped.

My guess is that it has to do with the clothing material/shader, but I am not sure. I tried changing the clothes textures, render queue, physics, etc. but I wasn't able to fix this issue. Any clues?
1696667756.png
 
Solution
Best approach I had seen so far was basically to take a screenshot with black background and an a second one with white background and try to calculate the alpha value from those two images. I think that was based on @Eosin's idea? That was years ago, but yeah, and I also run into trouble. I think one of the issues was the one you describe here. Couldn't get it solved, so it was never released.

Color-to-Alpha only works if...
  1. ...the background of the target image is similar
  2. ...AND nothing of that color is on the character.
Interesting. Would you be willing to share it with me in DM?
I've recently started to experiment with transparent background images for some scenes, all is fair in the quest for more FPS ?, and want to continue exploring that option. Currently I'm taking a black background photo with Supershot and then in GIMP I use Colors > Color to Alpha. This so far gives me fairly good results, some small edits required to smooth it out, and is a reasonably quick process. But as I said, exploring better and faster options :)
 
Upvote 1
Best approach I had seen so far was basically to take a screenshot with black background and an a second one with white background and try to calculate the alpha value from those two images. I think that was based on @Eosin's idea? That was years ago, but yeah, and I also run into trouble. I think one of the issues was the one you describe here. Couldn't get it solved, so it was never released.

Color-to-Alpha only works if...
  1. ...the background of the target image is similar
  2. ...AND nothing of that color is on the character.
 
Upvote 0
Solution
Color-to-Alpha only works if...
  1. ...the background of the target image is similar
  2. ...AND nothing of that color is on the character.
Absolutely. The bg color needs to be something of limited use in the person and clothes, or else there's bullet holes, severe baldness or worse ?

So far I've only used it for scene improvement, artifacts are not that much a issue due to the scene background and image position/distance.
While there's ways to export parts of a person to make them as CUA, which would be ideal for FPS and 3D, it's a lot more work in comparison and hair or clothes options would be very limited. Unfortunately a 2D image has a limited angle to be used that mimics three dimensions, so it's very dependent on scene camera positions.
 
Upvote 1
Interesting. Would you be willing to share it with me in DM?
Sure, though right now it's got a lot of faulty code because I'm experimenting stuff. So later I'll share it.

Best approach I had seen so far was basically to take a screenshot with black background and an a second one with white background and try to calculate the alpha value from those two images. I think that was based on @Eosin's idea? That was years ago, but yeah, and I also run into trouble. I think one of the issues was the one you describe here. Couldn't get it solved, so it was never released.

Color-to-Alpha only works if...
  1. ...the background of the target image is similar
  2. ...AND nothing of that color is on the character.
I see, I also came across that suggestion, but I wanted to leave it as last resort. Thing is, it's only the clothing that is having issues. The person atoms render correctly, same as hair and even CUAs. So I think it's worth it to just focus on fixing the clothing, somehow. I'm currently messing around with the clothing materials, so far no luck but I keep trying.

Also, thank you guys for the replies.
 
Upvote 0
Back
Top Bottom