View Full Version : File projection with alpha?
Carl.
11-02-2006, 12:53 PM
Hi everyone,
Having trouble putting this shader together. Desired effect is to have a cutout graphic / image projected over several objects for a motion graphics pitch.
basic set up is a file projection plugged into lambert color.
Two problems:
1 - Have turned off wrapping in the 2D placement and tried plugging the projection node into transparency but i just can't get the graphic to appear as a solid cut out. Have tried both psd and file nodes. The alpha is just inheritted from the rgb values and creates a semi transparent image. how do i extract the alpha information from the file or plug in a seperate matte image for the projection to work properly?
2 - The projection hits all faces through the objects. Is there a switch i can use so the graphic only hits / renders on the front facing (to the projection) faces?
Do hope someone can help.
Thanks in advance.
Carl
laxman
11-02-2006, 04:04 PM
ok check out the attachement for a shading setup that works. Assume you have two different object, therefore two different materials. Create a file node in the projection mode. Then delete the connection between the file node and the projection. Pressing shift, middle click the file node and drag it to the projection, select 'out alpha' on the left and on the right, expand the 'image' tab and select the r, g, and b inputs. Middle click and drag the projection onto the transparency of each material. Now put any file with an alpha channel, and the white parts of the alpha will be cut out. To control the projection, select it and click fit to box, then move the manipulators.
For the second questions, you can't select only the from faces, you will have to duplicate the material you you on the object, and apply it to the front face, so that it has a separate material.
Carl.
11-03-2006, 06:00 AM
hi laxman,
thank you for your help. i think i'm almost there now. i should have stated that i wanted to keep the rgb image (attach 01) but use the alpha (attach 02) to keep it sollid.
i set up like you said and that gave me the correct shape but no color (see attach 03). instead i see the default lambert.
after playing around i discovered i could plug the graphic outColor into image and the outAlpha into alphaGain. I then had to plug the projections outColor to the lambert color and the outAlpha to each transparency channel. it wouldn't let me pick just the top transparency (see attach 04).
this gave me almost what i'm after (attach 05) but the alpha seems to be causing some nasty halo edges. i tried expanding the white pixels in the alpha, tightening the region, but this seemed to exagerate the problem.
...hold up. i just tried adding the files' outAlpha into alphaOffset as well. this seems to have made a nice solid cutout (see attach 06).
have i gone about this the right way or is there an alternative method i'm missing?
real shame about the back faces rendering. will have to re-think the idea. a friend of mine has suggested a 3d studio max concept where by the inside face renders transparent. so probably a double sided shader set up in maya. this wouldn't eliminate the normal faces of other objects passing through the projection revealing the graphic though. the original goal was to have one instance of a graphic appearing to change shape and split up as different, invisible objects/shapes passed underneath it.
thanks again for your help. any other tips would be much appreciated.
c
laxman
11-03-2006, 06:42 PM
hmm, I don't understand what the problem is or what your are trying to do. If you don't want the backfaces to render you could just apply a different material to the rest of the object, so that you can control their transparency separatly.