PDA

View Full Version : masking the backface of a mesh?


lymth
11-09-2009, 01:53 PM
Hi

So i want to mask out stuff that appears behind the cameraview. im doing cameraprojections on a mountain from 8 different angles, and i have images etc from those angles. Is is possible to make the projection black on the backside of the mountain? im doing batchbake on the projections so i want to stitch the stuff together - would be ALOT easier if the unprojected faces are blacked out

tried flipped normal with samplerinfo but that doesnt work since the normal is correct.. dont think the facingratio works either, i think the output of that one is absolute'd

thanks

lymth
11-09-2009, 02:46 PM
ok i solved this. how is how i did it:

parent directional light to my image projection camera
use surface luminance out -> vCoord @ ramp

this ramp i have 1 black color and the other color is my projected texture. I use very little/no interpolation on this ramp. had to do manual tweaking, dont know what value to use here exactly but i think it should be the same for all (?)

i hook it up to the incadenscence of a lambert shader which is all black in color. Then i get a texture without the lambert shading =). maybe can use surfaceshader aswell maybe, didnt try this

ok, then i use batch bake selecting my projection camera there..


cheers

CGTalk Moderation
11-09-2009, 02:46 PM
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.