How to add image to a plane primitive keeping the background transparent?
handel_035c4ce6
Posts: 460
I did the obvious - made a plane and slapped the image as diffuse map - but the background became white - probably because of the white diffuse color. Reducing opacity makes the whole the image transparent and I saw no option to make the diffuse color transparent.
Is there a way to do this?
BTW - I tried to export it from Blender as Dae but got error when importing. If this import can work and some1 can help with expor to Dae options?
Edited.
Post edited by handel_035c4ce6 on
Comments
It sounds like you need a transparency map in the Opacity (3Delight) or Cutout Opacity (Iray). Areas of the map that are black will hide that part of the diffuse image map. Areas that are white will show the diffuse image map.
So what will happen if I just put the same image as transparence map too?
BTW - when rendered the white background became black.
Edit: nothing good happened if I put the same image; will rework it now to check... the transparent background has to be black and the image has to be 100% white, right?
Edit 2: Works, but soem semi-transparent blueish shadows appeared around the figure.
You can have a little bit of gray along the edge where it transitions from black to white. But have pure black and white where you want the diffuse totally invisible or totally visible.
Which render engine are you using?
I rendered it on Iray; I loaded the image in a image editor, selected the transparent background and made it black; then inverted the selection and made the actual image white.
BTW - question - when importing an OBJ is the default shader for iray or 3delight?
If the Surfaces pane says Daz Studio Default, it is a 3Delight shader. It if says Iray Uber, it is an Iray shader. When I import an OBJ, I see Daz Studio Default (3Delight), even though I currently have the Iray render engine selected for rendering. You can apply the Iray Uber shader to convert it, if you wish.
Keep in mind the preview in the viewport shows a downsized low resolution image that will show a blury transparent edge it can look different in the final render.
Instead of using a 3DL: Diffuse / iRay: Base Color texture and a black-withe 3DL: Opacity / iRay: Cutout-Opacity map you can also save the transparent image as PNG that supports saving the Alpha-Channel along with RGB colors. This has some advantages: first PNG uses a lossles compression and your images look crisp sharp even at the transparent edges - filesize will be slightly bigger, second you can load the PNG into both the color and the transparency (opacity) slot of the shader like you tried it before.
But it all depends on the quality and resolution of the source image and how sharp the transparent edge is. BTW once you save the original transparent render as JPG the transparency is lost and a white backround will show up now you apply the (Cutout) Opacity map and thats where the issues with the blueish shadows can happen.
I have exactly this - I made a skimpy bikini, put them on a babe and rendered it with transparent background to make a poster. But cannot find a way to do this in daz and as it is just 2 clicks on Blender I tried to export it from there but again couldn't find a way to import it with the transparent background. Also is there a way directly to load the imported OBJ with Uber shader instead of changing it with every import?
And yes - it is "default" shader although the render is set to Iray. Unfortunately I have more then 30 objects imported and changing the shader manually will be PITA, so if I apply the iray shader will it change keep the textures, the colors etc settings for each surface?
Edit: Nice! I found the option to change all the surfaces at all the objects from Daz default to Daz Uber with 1 click (at least I think so).
Well I tried my own suggestion recently and realized that this is no longer possible. I'm pretty shure this was possible in an earlier DazStudio version. I also searched the [LIE] Layered Image Editor for the settings Use Alpha for the PNGs but didn't find anything like this. I could swear I saw this setting somewhere in the LIE not long ago. It seems there is no other way than to create an Opacity map. Once you have the transparent PNG saved this is no big deal. I used the free image editor PaintDotNet to do that. Paint.NET - Free Software for Digital Photo Editing
I recorded a video showing my attempts in creating a billboard and let it "point at" the camera. Strange the plane spins like crazy even when I restrict it to rotate just on two or even only one axis, never got it quiet right. I guess you need a plugin like Billboard Nodes Plugin or a free alterantive would be mcjBBOrient for DS 1,2,3,4 but the latter works only on animated camera movements not dynamicly by changing the view perspective.
Also if you want to do something like this the SpriteIt (Shareware) plugin from GenerationX can help you - read the manual here: http://www.pilning.net/SpriteItPlugin.pdf
Demo Video https://youtu.be/8KLkyGB7IE4
DazStudio DeathTrooper Billboard
[Edit]: The Figure I use in this video is Death Trooper Armor for M4 for Poser - ShareCG
parented to the 3Dnd Storm Trooper body suit that has no hands, feet or neck. The missing neck is an issue if you bend the head too much. Maybe I download another free M4 bodysuit from shareCG for that.
I searched with Google: "site:daz3d.com layered image editor use alpha mask" couldn't find anything official about "use alpha mask".
References and related threads:
Software Guides » Layered Image Editor » reference » Layered Image Editor Panel Overview
Layered Image Editor and IRay renders
layered rendering with alpha ?
If the rendered image of the figure has a transparent background, load it into a graphics program, convert it to a black and white, turn the contrast all the way up (Maybe adjust the brightness as well) until it is a silhouette, then copy the entire image and paste it into a new layer on a blank image of the same dimensions. Save it as a .png, (to flatten the layers) then Invert the colors so it is a white silhouette on a black background, and save it.
When you add the original image to a plane in Studio, use the black-and-white image as the Cutout Opacity map. Only the original image will show then, all around it will be transparent. You might want to shade the plane with the stock matte rubber shader first, to avoid reflections.
This is how I make my own billboards in the graphics program Paint.net.
I have actually resorted to rendering twice once with everything coloured white in opengl doing a video where I needed a matching opacity video for another software that could not use a png series with alpha, namely iClone.
I have since fortunately found an easier postwork solution for that using Hitfilm.
Maybe my video isn't the best straight to the point tutorial and not that easy to follow along because all what I tried in the LIE first. If I had used the original white stromtrooper that would have looked slightly different. But the black trooper disappears if you load in the same transparent PNG into the opacity channel. This shows it only reads the black as transparent and the white specualrity spots as visible. Then you see me creating the black-and-white opacity map at minute 12:00 but the Paint.net layer window didn't show up in the video. All in all not my best video.
I can understand that the shader channel for the (cutout) Opacity map expects a black-and-white image and nothing else but I was a bit disapointed that there is no option in the LIE for to read in the PNG alpha mask. Is there something you can do with the transparent PNG in the (cutout) Opacity channel and LIE that I didn't get right? But maybe I just missread Blending Options use Alpha Channel and thought you could do something like that in there.
@ Wendy_Carrara
That sounds like a nice workaround rendering the OpenGL black and white image series. I also grabed Hitfilm Expres as it was anounced for free in the Free Software that Makes Life Easier thread, later visiting the homepage and saw what a feature rich software this actualy is. I should see if I can use it for something but since I record in MKV format and that is not supported to edit in Hitfilm. I'm also not patient enougth to have it re-encode the whole screen recordings in HD, I just 'glue' the video sequences together without re-encoding and quality loss.
@ Petercat
Good point about avoiding reflections on the billboard with low speculatity, I didn't go into detail about those shader settings at all.
Can something like this be made by using the LIE mask layers?
Unfortunately I used Photoshop a long time ago when there were no layers masks so my knowledge of layer mask is based mainly on the highly scientific approach by poke and reload.