Any way to render a physical object as an alpha channel?
![Harry Ominous](https://farnsworth-prod.uc.r.appspot.com/forums/uploads/userpics/731/nPAEXH0O2GFL8.jpg)
in my spare time, as well as doing conventional image-making, i also make home-brew games, usually sprite-based
one thing i've long wanted to be able to do, quickly and easily, is to create overlays of things like clothing items. these could then be used to clothe in-game sprites
at present i do this as follows:
1) create an all-black figure (v4 or m4)
2) clothe it with an outfit, and pose it appropriately
3) render
4) i now have a black clothed figure. in the gimp i select the black areas and cut them out
that kinda works, but the selection process is not accurate, you always get a degree of bleed-out, especially for dark clothes, and it almost always requires a degree of manual fudging. for animated sprites that can involve a whole load of laborious effort, and the results are never entirely satisfactory
what i WANT to be able to do is to render the black figure as an alpha channel. so, it acts in the scene as a figure would be expected to do (i.e. hiding the back parts of clothing, or putting an arm in front of a dress, as in my attached example, and so on), but in the rendered frame there is a big fat transparent alpha channel in place of the black figure
any suggestions gratefully received
![](https://farnsworth-prod.uc.r.appspot.com/forums/uploads/thumbnails/FileUpload/3a/384cc76aab72dc8926a17a2d2d0ff9.jpg)
![](https://farnsworth-prod.uc.r.appspot.com/forums/uploads/thumbnails/FileUpload/3a/384cc76aab72dc8926a17a2d2d0ff9.jpg)
Comments
If you render the item in white, ambient strength set to 100% and colour to white, with everything else set to black, no specular strength, that should give you a mask. But I don't think there is (currently) a one-click way to do that.
unless i've misunderstood what you're suggesting that doesn't get me any further forward
i've set the diffuse channel to white, ambient to white 100%, and everything else to black
but all i end up with is a solid white area where previously i had a solid black area. the white area doesn't come out as a transparent channel (which is what i'm aiming for), i'd still have to manually cut it out in my image processing app. and there would inevitably be some white or grey pixels left behind (as can be seen from the faint figure outline that appears in my attachment)
i was vaguely hoping that there might be some hoodoo solution using the shader mixer or something, kind of like a reverse shadow catcher...
Way not just hide the figure in the Scene Pane and render. The clothing will still be the same even if the figure is not visable.
The only way to retain Aplha is to have nothing in the background, change the background colour to what ever colour you need and save the image as TIFF/PNG
... but than the arm is not longer cut out the shirt
LOL DOH! facepalm.
thanks for the input, but i don't think you've really grasped what i'm trying to do (or i haven't explained it very well)
if you simply hide the v4 figure then the clothing will NOT be the same as if the figure was visible
with the figure hidden then the back areas of the clothing obviously then become visible, and, if you take the examples i've posted, you would see that, with the figure hidden, the figure's arm in front of the dress would also disappear, which is not what i'm attempting to achieve at all
my guess is that there isn't any way to do what i want, but it seemed worth asking the question, just in case somebody knew s a way to do it. simply hiding the figure isn't a suitable way to do it though
EDIT: cross-post, i see you've got what i'm trying to do now
You'll will probably have to do it in a few stages. Render the clothing with the figure hidden. Make the figure visible and give it solid color like, give the clothing a solid color like blue and use this render to create a mask from.
soory doesn't work my bad again. I am going back to bed.
deleted
oh! i got quite excited then
"fantom" sounded like exactly the kind of thing i might have been looking for (if i knew what that was, exactly)
but, i guess you've deleted the post because it doesn't quite work as hoped?
(i've just tried it myself, and all i got was the same effect as simply hiding the figure)
Take a look at this thread:
http://www.daz3d.com/forums/discussion/16878/
it is for figure against hair, but otherwise the same.
What I said was make the things you want to mask out black, make the things you want to keep white (using ambient to make sure there's no shading) and use that image as your mask (in Photoshop cmd(Mac)/ctrl(Win) click its channel to load the luminance as a selection, then use that selection as a layer mask on the real image).
LOL yeah sorry about that.
The only way I got a really good mask was to use Surface Mask Creator form the DAZ3D store. Here is a thread about it working in DS4.5 . The below is what I did in DS4.6 latest public release.
Mask made in Surface Mask Creator and applied in Photoshop
But I wanr you not everything works as it should with Surface Mask Creator in DS4.5 +
Adam is working on a new one, not too sure how he is getting on.
thanks for the feedback all
it looks like i was searching for the wrong thing, trying to get a one-step alpha channel (the ideal, because a lot less work, and when you're creating around 40 frame sprite animations for every single character action, then the slicker the process the better)
but, using masking looks like it will give me pretty much what i want to achieve. i've just run a small successful test, but i've still got to see if the workflow can be streamlined to make it a worthwhile technique for me - as the final edited image has to integrate properly into the games writing software i use too
once again thanks for the replies
in Carrara I would give the figure a shadowcatch shader then render to png series with alpha enabled
not familiar enough with studio's shaders to know if there is a simillar shadermixer shadowcatch solution for figures etc.
thanks for that. i was hoping that DS would have something similar, as DS is my renderer of choice for games graphics, but i do also have carrara, so i'll try out your suggestion
having done some experimentation with the suggested technique of using masking my feeling is that it would work ok for one-off images, but probably isn't going to be feasible for the quantity of frames i need to produce for most of my sprite-based animations
sorry, it's taken a while to get round to testing it out, but thanks so much for that suggestion
carrara's not my usual app of choice for this kind of work, so it took a bit of experimentation (in the end i had to delete all of the figure's shading domains, for some reason, in order to get it working), BUT, get it working i did
and, it works perfectly, just how i'd hoped Daz Studio could be made to work - the figure's there, and obscuring the parts of the image that i want obscured, but it doesn't render, so you end up with a perfectly clean alpha channel, and don't have to faff around with masks and whatnot
(the problem i now have is that pretty much all my regular characters and template poses are saved in DS format, so i'd still be faced with a mountain of work in order to transfer my workflow over to carrara, but that's a story for another day)
and, just to prove it, here's a test render from carrara to demonstrate how it works in practise
1) shows a v4 in one of her party frocks
2) shows the same scene, with v4 simply hidden, and where you can obviously see the back bits of the dress
3) after applying a shadow catcher to v4, and with "render alpha channel" on, and rendering to a .png file. it can be seen that the v4 object acts on the scene (to hide the back of the dress) but does not actually appear in the render itself. so, you end up with precisely the effect i was asking about in my initial post
this is a tremendously useful feature. i only wish it were available in DS
Carnite has two videos on Shadow Catching in DAZ Studio
http://www.youtube.com/user/carnite/videos
thanks. i do occasionally use regular shadow catching (i.e. onto a ground plane) in DS, but that wasn't what i was asking about here
however, if there IS a way to replicate the same effect in DS (in other words, rendering an object directly to an alpha channel) then i'd love to hear about it
There is a Member here Adamr001 who is working on just this for DS4.6. I'm a tester and it will do exactly what your after when finished.
cool, thanks for the headsup on that. i'll keep an eye out for it
i must admit that in general i prefer using DS to Carrara, and i wasn't looking forward to having to transfer all my stuff bwtween the two apps in order to use the Carrara feature. if there's a DS equivalent just over the horizon then i'll wait for that to come out
Hello, Im in need of this and im wondering if its already an implemented feaure
i use a clunky masking technique when i want to achieve the effect. i render the human figure as all black, and then remove the black stuff in the Gimp. it's extra faff, and it's nowhere near pixel perfect, but it just about works
i'd love to hear that DS had implemented a similar effect to the one that carrara uses to achieve this effect, because it's the kind of feature you'd expect to find, but it's been so long that i'm not hopeful
I had hoped it'd be implemented by now. Thank you. This is a really needed feature
Though it may not be of help to 3DL users, this is a buiilt-in feature of Iray, using canvases and node rendering. You can render specific objects, and they render as if part of the whole scene -- complete with the shadows, reflections, etc. imparted by the scene. The object only shows the part of it that would shown in a complete render.
A picture explains it better.
Wow that;'s exactly what I need! Could you specify me how to do that? I'm using iray
yeah, i'd love to know how you do that too
i currently use 3delight for preference, but i'd switch over to iray if there's an easy way to achieve the effect using it
I found a great tutorial on deviatnart!
http://snowsultan.deviantart.com/art/Iray-Canvas-Tutorial-565641976
It's actually pretty easy, glad we found this