Page 1 of 2

adding a background photo

Posted: Fri Apr 27, 2007 7:48 am
by Daniel Hruby
Can anyone post some pics to illustrate the proper layer /channel structure in photoshop that a simple composite of an interior maxwell render + alpha channel + an exterior photograph? My window frame / grill is grey in the Aplha and therefore has some transparency. It should be white (no?) and the photograph should only show therough the panes of glass in my window.

A tutorial on how to compostie a perfect alpha mask in Photoshop so my interior renders have an exterior photo in the windows would be very helpful to me.

Thanks in advance.

Posted: Fri Apr 27, 2007 6:11 pm
by dyarza
Daniel,

There are lots of tutorials on the web for Photoshop. A quick search yielded this one:

http://www.tutorialized.com/tutorial/La ... ners/24141

I am sure there are better ones, but lets use this one as an example.

Using the concepts illustrated in the above tutorial, what you can do is create a layer mask for your rendering layer. Doing so will create an alpha channel in the "channels" tab. If you simply paste the alpha that M~R generates into that channel, your rendering will be cut out appropriately. Then you can have the photo in a layer below the rendering and you are done.

In Photoshop there are many ways to accomplish one thing so I am sure there are many other ways to do it. That is the method I use.

If you still can't get it to work maybe post a screenshot of your Photoshop setup and I can take a look.

D

Posted: Fri Apr 27, 2007 6:27 pm
by Daniel Hruby
cool thanks. this expalins the basics well enough. I will practice. The one issue I find troubling is why my window frames appear in my alpha as grayscale instead of white. White would mask out the background image but gray will let some eprcentage of the background photo to bleed through my window frames. In fact, glass windows even have a slight grey to them, which maybe is due to interior reflections needed? Maybe my aluminum window frames are reflecting too? I will try to post something after I play around with this a bit more.

Posted: Fri Apr 27, 2007 9:12 pm
by bjorn.syse
This is an interesting topic. I've wondered what the best practice for this is. I'm used to being able to use a background image an "environment" right in my 3d-application of choise, but with maxwell this has to be done with an .mxi which increases the rendertime a bit, am I right?

Posted: Fri Apr 27, 2007 9:32 pm
by Mihai
Well not really, you can use the physical sky and just put an HDR or MXI image file in the background slot of the Image based lighting panel. So you first tune your physical sky the way you want it, then you switch the panel to HDR/image based, set all channels except background to disabled (and to use physical sky for disabled channels), and set the background to screen mapping. Your render time will be the same as if you had used just Physical sky, or HDR/Mxi environment for that matter.

But this isn't a good way to proceed anyway since your background image is now locked to the render. If you decide to change it's hue/saturation/add some clouds whatever, you will have to render the whole image again. Better to use an alpha channel and then composite in the background image.

Posted: Fri Apr 27, 2007 11:40 pm
by dyarza
Daniel,

Post your alpha and rendering so we can take a look. Sounds like you have some reflections going on.

Posted: Sat Apr 28, 2007 1:41 am
by patrikpanda
.yes, you can use mxi as background, if you won´t change it, otherwise use alpha chanel.
.BUT....i found alpha chanel not being correct.it has some issues.
.every maxwell alpha chanel i used, was 1-2 pixels wider than rgb image, so i needed to correct the border and every reflective material (chrome, aluminium) produced grey colour - it means transparent part, and that seems to me not being correct.

Posted: Sat Apr 28, 2007 11:30 am
by w i l l
Yeah to get a smooth looking alpha, i deleted the studio/background then applied the same lambertian material to all parts - that means copying that mxs (or group of parts) to do this though, otherwise you'll have to re-apply materials.

Posted: Sat Apr 28, 2007 5:17 pm
by Daniel Hruby
Rendering:
http://homepage.mac.com/danielhruby/.cv ... pg-zip.zip

Alpha:
http://homepage.mac.com/danielhruby/.cv ... pg-zip.zip

Background:
http://homepage.mac.com/danielhruby/.cv ... PG-zip.zip



So you will see that it appears as though the frames in my doors and windows are going to be semi transparent. Any image in the background is going to come through my solid door and windows frames. Wall material between the windows in the kitchen are solid (white in alpha), but it is the frames that are to be anodized aluminum that are showing up weird in the alpha.

If its not too much trouble, could anyone send me a PS file with all three images composited so I can see the proper procedure? I realize the photo should be on the bottom, the rendering on top with a mask linked to it, but I am not sure how to get the alpha into the mask channel properly. I got it once, but the background was blowing through the window frames. :(

Thanks again!

Posted: Sat Apr 28, 2007 6:02 pm
by insomnia3d
Image
Quick 5 minute photoshop
Is that what you need? Unfortunately your glass on the alpha is screwing the process and hence the jagged edges. Your best bet is to remove the glass and do an alpha rendering without it, this way it will be purely black from the end of the frames.

Posted: Sat Apr 28, 2007 6:24 pm
by Daniel Hruby
Cool. Looks way better. Lots of work to do on the exterior model still (ie patio)

How do you get the alpha into the mask channel? "Select all" on alpha, save selection with the rendering as the destination? This gets the alpha into a channel on the rendering, but nothing seems to happen when I drop my background behind the rendering. Should I make a mask layer? How do I get the alpha to appear in the mask linked to the rendering layer???? I obviously am not grasping this without some illustration.

Can you send me the actual photoshop file so i can "reverse engineer" this basic concept. Thanks alot. This gives me hope.

One more thing, why do the door frames appear grayscale instead of white in the alpha and how did you work around keeping the background image knocked out? Did you need to modify the alpha?

Posted: Sat Apr 28, 2007 8:30 pm
by insomnia3d
What you need to do in order to avoid the half-arse alpha, created by the transparency is the following.
1. remouve, or hide, the geometry that make up the Glass on your model using the application of prefference.
2. When rendering choose only Alpha Channel on the render panel and choose your image output path since the image will not show up on the MXCL. This way when it says Done in the MXCL the image will be on the folder you have set.
3. When you open it you will notice that the the glass areas will now be pitch balck rather than graini grey. As far as the frames, could not tell you. I get some geometries that render in the Alpha s well, but do'nt know why. 1.5 hopefuly resolve this bug.

Ig you still want me to send you the file give me an email or something and i will send it.

Posted: Sat Apr 28, 2007 8:50 pm
by michaelplogue
Another way of making alpha masks would be to render out either the Object ID or Material ID channels, and use those for your masks. I'm putting together a quick scene to demonstrate.

Back in a bit.......

Posted: Sat Apr 28, 2007 8:52 pm
by lebbeus
Another way of making alpha masks would be to render out either the Object ID or Material ID channels, and use those for your masks. I'm putting together a quick scene to demonstrate.
sweet

Posted: Sat Apr 28, 2007 10:08 pm
by insomnia3d
forgot about that good point Mike.
As a point of refference Daniel, for every scene i make i always render the Id, material, Alpha and Zbuffer. if i use them great, and if i don't then you only end up loosing about ten minutes.