Texturing based on camera direction
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 (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). Thanks! |
ok this might help.
Create your camera and your model I used a tours just as a test. THen apply a planar projection to it. Now in the channel box right click the projection centre X box and create an expression. set it to: polyPlanarProj1.projectionCenterX = camera1.translateX; polyPlanarProj1.projectionCenterY = camera1.translateY; polyPlanarProj1.projectionCenterZ = camera1.translateZ; replace the camera name and the projection names with yours. Now apply a texture to it and move the camera, you should see the texture moving based on where the camera is. Hope that is some help Alan |
that's exactly what I needed! thanks so much.
|
Danny has a script on his website that i use all time its great...
|
I'm having a bit of a problem- in the channel box there aren't any options for the projection. I must be missing something...
Thanks EDIT: It worked when I selected all the faces of the model and used the planar projection command on the polys shelf. hmm. before I was selecting edit polygons--->texture--->planar projection. Hrm. |
it creates a node underneath the shape node of the object that's where the channels are.
Alan |
that's exactly what I needed! thanks so much.
|
All times are GMT. The time now is 01:52 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Simply Maya 2018