Carrot Juice
04-08-2004, 10:04 PM
Does anyone know how to write a script that would planar projection map all the faces of a model visible to the camera along the direction that the camera is facing every frame (with all the default planar projection attrs)?
I'm planning to use this in conjunction with "use frame extension" and a sketched-looking outline (tomcat) in order to acheive a hand-drawn effect. This script (if it's possible) would create painterly shading that has different texture and strokes each frame because of the 'use frame extension' images, and scales with the closeness of the camera. (if it just did a planar projection on all the faces instead of only those visible to the camera, the strokes in the image would seem to get bigger as the camera moved closer).
I have already figured out how to use the command polyProjection -ch 0 -type Planar -ibd on -icx 0.5 -icy 0.5 -ra 0 -isu 1 -isv 1 -md c pSphere1.f[0:99];
to make a projection map along the direction of the camera, but I'm unsure how to do this every frame as I am very new to MEL. Also what would seem to be the largest problem here is getting the projection map to apply only to visible faces. Perhaps the same stroke size consistency effect could be acheived by scaling the projection based on the camera distance, but I don't know how to do this either.
Thanks!
I'm planning to use this in conjunction with "use frame extension" and a sketched-looking outline (tomcat) in order to acheive a hand-drawn effect. This script (if it's possible) would create painterly shading that has different texture and strokes each frame because of the 'use frame extension' images, and scales with the closeness of the camera. (if it just did a planar projection on all the faces instead of only those visible to the camera, the strokes in the image would seem to get bigger as the camera moved closer).
I have already figured out how to use the command polyProjection -ch 0 -type Planar -ibd on -icx 0.5 -icy 0.5 -ra 0 -isu 1 -isv 1 -md c pSphere1.f[0:99];
to make a projection map along the direction of the camera, but I'm unsure how to do this every frame as I am very new to MEL. Also what would seem to be the largest problem here is getting the projection map to apply only to visible faces. Perhaps the same stroke size consistency effect could be acheived by scaling the projection based on the camera distance, but I don't know how to do this either.
Thanks!
