View Full Version : An Problem with Rendering Alpha Channels
i2345679 06-01-2003, 01:59 PM 1st of all, my English is not ok. I'll try my best to translate my question from Chinese to English. hope u can understand. :p
Here I put a vertical Plane object in front of a Teapot. The plane has a tree picture in its' Opacity map channel.
http://www.discreet.com.cn/dl_forum/uploadImages/200353019173887217.jpg
I render the scene and got Alpha channel like this:
http://www.discreet.com.cn/dl_forum/uploadImages/200353019185968122.jpg
But It's not what I want. I planned to get a transparent hole on the Alpha channel of the Teapot, this way:
(note this picture is composited by Photoshop)
http://www.discreet.com.cn/dl_forum/uploadImages/200353019193427196.jpg
I tried to use Matte/Shadow material on the plane but it doesn't support Opacity map. The only result I can get is a rectangle hole... Can u help me?
|
|
Howdy !
Can't you simply render both teapot and tree seperately with their own alpha channels, and manually substract one from the other in Ps ?
mouj
i2345679
06-01-2003, 02:28 PM
:rolleyes: Yes, of course~I just did it.. Thanks for the replying:) But the key problem is: I want to know if 3dsmax can do this itself.
c_bigman
06-01-2003, 04:25 PM
off course, MAX can do it.
当然可以。
Use Blend material,sub-material is mate-shadow,
you can get you want!
使用混合材质,子材质为mateshadwo材质,用树的黑白做蒙板。
As always with max there is a plug-in for this :)
psd-manager 1.0 from cebas (http://www.cebas.com/products/feature.asp?UD=10-7888-33-788&PID=38&FID=330)
If you render stills and usually tweak them in Photoshop it's a big time-saver. It's a render effect that produces PSD files with all the layers and channels you want. You don't need to setup several scene files it renders everything in one go.
Daniel
chach
06-02-2003, 04:33 PM
what about an opacity map + planar UV's?
i2345679
06-04-2003, 05:56 PM
No, C_bigman, I'm sorry to say that ur mathod did not work with me. I tried lots of times on blending several Matte/Shadow and Standard Opacity maps with the scene. And this is a simple failure picture:
i2345679
06-04-2003, 05:58 PM
and the render result
i2345679
06-04-2003, 06:01 PM
And how comes the opacity area of the map seems lighter than the background here?
i2345679
06-04-2003, 06:04 PM
Thank you Daniel, for the sweet plug-in . But I still wonder the solution in 3dsmax itself:rolleyes:
Originally posted by chach
what about an opacity map + planar UV's?
Could you please show me your method clearly? What material to be used with Opacity map? And how to ....KILL THE ALPHA????:love:
Why don't you make a simple comlete black material and a simple comlete white material ans apply those to the objects the way you want. Then render and use one of the RGB channels instead of the alpha channel.
Daniel
chach
06-04-2003, 08:29 PM
here you go:
what i've done here is: applied a planar uvw mapping modifier to the teapot, then loaded the black/white image below into the opacity channel of the material, then applied an inverse of that to the glossiness channel of the material.
The glossiness map is only necessary, of course, if your material uses glossiness.
Any type of material should work the same.
I only applied planar mapping to preserve the integrity of the map for the sake of communication. I suppose any type of mapping will work, you'll just have to tweak the map as necessary. It is important to note that you've got to use an opacity map with enough opaque area to cover the entire surface, otherwise, areas outside the texture will dissapear or tile.
The planar map does introduce issues as far as the 'correctness' of the UVWs on the rest of the surface. I suppose you could address this by using mesh select in conjunction with uvw map or multi-sub-object mapping so that only the area you need to have the opacity recieves the map.
cool?
chach
06-04-2003, 08:44 PM
actually, i just tried c_bigman's method and it works too. If you want to try it and you set up a version of the example i provided above, just do this:
delete the uvw mapping modifier to restore the original 'correct' uvw's.
in the material editor, with our material active, click on the type ('standard') and change it to blend, keep old material as sub material, and make the new material a matte-shadow type.
viola!
Now, this is diferent than my method in that ANYTHING that is behind your object, including the inside opposite side of the teapot if it has a 2-sided material, or other objects, will be masked out.
If that doesn't matter, then I would say my method's a little better 'cause the bitmap opacity costs a little less (processing wise) then the blend w/ matte shadow.
P.S. shrry 'bout the crappy image, had to get it below 20kb, tho. I think it's legible, but, if you want the full res just let me know.
i2345679
06-05-2003, 07:06 PM
Umm...chach, thank you very much ~!
But~~I'm sorry to say But~~ it's not my ideal solution. The problem comes from a project about outdoor buildings and trees. I rendered the whole animation to image sequence and then want seperated Alpha channel animation for some of the materials(for example glasses, walls...I may need a Chn-Eng dictionary by my hand). My...friend, in the company..how to say it? work together with me ...need that to do some special effects on. And there came the question: How to let the trees be transparent in the Alpha channel and cover the rest of the objects as well? I thought it was not a problem b4 I assigned Matte/Shadow to the trees--the planar objects with tree-shape opacity map...
So you understand now? It's not an easy work to assign planar UVs to each of the rest objects and make them excectly match the animation seamlessly to the camera...as it should be. So I prefer found a way on the material of the trees but not the others(teapot and so on).
Actually I've made it before posting this topic, by a fake solution-just like Daniel said-to make all the trees completely dark and self-lit other objects to pure white. And that's enough for the working use. But it is a fake after all. The correct result should be in the Alpha channel but not RGB... I want the..truth :lightbulb
I found some useful details and thinking-ways in your replying, chach. And some question:
Originally posted by chach
in the material editor, with our material active, click on the type ('standard') and change it to blend, keep old material as sub material, and make the new material a matte-shadow type.
So what to be the Mask map? :banghead:
And,
Originally posted by chach
Now, this is diferent than my method in that ANYTHING that is behind your object, including the inside opposite side of the teapot if it has a 2-sided material, or other objects, will be masked out.
Yes, that is it! I just expected anything behind the object(the plane I used in the beginning of the topic) to be masked out from Alpha channel. But I can't get that result in my scene. Could you please make a scene like the following picture and do the material on the Plane01? THANK YOU! :beer:
chach
06-07-2003, 11:17 PM
Ahh, i2345679, I think I understand what your are looking for now; an image-level solution rather than the object-based one I provided. OK, I'll describe how to do what you want.
In essence, you should just have to create and apply a new material for each tree plane & render.
BTW, I do like the solution you are currently using as it may not be elegant, but, its quite creative, and I figure it probably works OK.
------------------
"So what to be the Mask map?"
The opacity map from the original material.
(I said:"change it to blend, keep old material as sub material, and make the new material a matte-shadow type")
-------------------
This solution is a cross-betweem c_bigman's and mine:
make a standard white material.
turn it into a Blend material (keep old material as sub-material).
UNCHECK OPAQUE ALPHA.
in the mask channel at the top level of the blend material load your tree mask image, inverted so that the tree shape is white.
apply to object
that's it!
I will post some images to illustrate what i've done below...
chach
06-07-2003, 11:22 PM
...
chach
06-07-2003, 11:23 PM
...
cool?
i2345679
06-11-2003, 05:21 PM
I'm sorry chach. I was a little busy these several days and didn't have time for CGtalking;) And thank you for the reply again and again. But there's still one error to fix:
i2345679
06-11-2003, 05:36 PM
And this is the result I want.http://www.discreet.com.cn/dl_forum/uploadImages/200353019193427196.jpg Note the difference between them? The alpha channel should never contains Plane01, it just shows the plane's 'alpha shadow' on the teapot. So, back to the beginning, how to make this? :rolleyes:
ok...u got that far then...why not just mask around the plane in photoshop, then fill with white and invert...then u have an alpha for the tree...then render the t pot on its own then u have an alpha for the tpot...
chach
06-12-2003, 08:46 PM
You can use the material I desribed above applied directly to the teapot, no foreground object is necessary, I just wanted to show that it masked out any scene elements behind the object. Let me know if you have trouble.
CGTalk Moderation
01-15-2006, 07:00 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.