View Full Version : Cut poly by alpha?
illbrat 03-08-2009, 09:09 PM Hi!
Is it possible to automaticly cut a poly plane by using an image with alpha? the reason why i want this is becuse i want to use imageplanes with alphas to work with accurate occlusion aswell.. any ideas??
| |
achoury
03-08-2009, 10:33 PM
Hi!
Is it possible to automaticly cut a poly plane by using an image with alpha? the reason why i want this is becuse i want to use imageplanes with alphas to work with accurate occlusion aswell.. any ideas??
Hi
You can achieve what you want by using mib_fg_occlusion and mib_transparency.
So plug the node mib_fg_occlusion to the Shading Group for the first material.
and mib_transparency node to the Shading Group for the second material.
Then assign the texture you want to cut to the Transp slot of mib_transparency node
Activate Final Gather and render that's all
http://www.postmyimage.com/images/images7No51567.jpg
hope this what you want
/Rachid
illbrat
03-08-2009, 10:40 PM
incredible! Its exactly what I wanted!
Thank you alot!
Kinematics
03-15-2009, 08:57 AM
Sorry Achoury, I still can't get the connections exactly. Could you be more specific? I used two surface shaders and added the fg_ao and transparency to the other. I'm getting black around the alpha
Okay I got it to work by creating two surface shaders and I had two mib_fg_occlusion's attached to each. I connected the mib_transparency to the surfaceshader group node and then broke the connections with the original surfaceshader which I now connect to mib_transparency via outColor->input and I mapped the alpha image to transparency.
Somehow I think its not correct though it works. What did you do Achoury?
achoury
03-15-2009, 10:14 AM
Sorry Achoury, I still can't get the connections exactly. Could you be more specific? I used two surface shaders and added the fg_ao and transparency to the other. I'm getting black around the alpha
Okay I got it to work by creating two surface shaders and I had two mib_fg_occlusion's attached to each. I connected the mib_transparency to the surfaceshader group node and then broke the connections with the original surfaceshader which I now connect to mib_transparency via outColor->input and I mapped the alpha image to transparency.
Somehow I think its not correct though it works. What did you do Achoury?
Hi
You don't need to have two mib_fg_occlusion, use just one!
So create one lamber_A and assign it to all the objects except one that you want to use with mib_transparency.
Create another lambert_B and assign it the the object you want to cut with the texture.
Create one node mib_fg_occlusion and plug it to the Sahding Group->material Shader of the first lambert_A.
Create one node mib_transparency and plug it to the Sahding Group->material Shader of the first lambert_B.
Connect the output of your texture to the Transp parameter of the node mib_transparency.
Your texture must be black and white, Filter Type Off and Alpha Is Luminance On.
The Input of the node mib_transparency must be white.
take a look at the attached scene.
/rachid
It works as a charm :D
Thank you, Achoury.
achoury
03-15-2009, 08:31 PM
It works as a charm :D
Thank you, Achoury.
Thank you, but why do you leave the the Input of the node mib_transparency black?
Put the value to white. or something like 0.8
http://www.postmyimage.com/images/images32O49009.jpg
/rachid
It's just for fun. I saw it looks more interesting when there is contrast in the final render :D but I did understand your technique though.
achoury
03-16-2009, 12:21 AM
It's just for fun. I saw it looks more interesting when there is contrast in the final render :D but I did understand your technique though.
well it's not my technique, but I can't remember where I read an article about that! maybe Lamrug or here in Cgtalk.
/rachid
vBulletin v3.0.5, Copyright ©2000-2009, Jelsoft Enterprises Ltd.