View Full Version : Camera based squash

07 July 2007, 04:34 AM
Yeah, so I got a brain scratcher on my hands. I want to be able to squash a polygon model based on the camera/facing ratio. However, it has to be done in such a way so that the edges/boundary of my model remain unsquashed and dimensional, yet the inside part of the model gets squashed inward, leveling that part of the model out like a plate. So what I'd be left with is a model that has a dimensional silhouette with the rest of it flattened. Kind of like taking a fully sculpted character and reducing it to a gingerbread cookie based on the camera.

I think I have a solution, except it's missing one very important step. What I do is just apply a squash deformer and constrain its orientation to the camera. The missing step is that I need to able to apply a fresnel/facing ratio shader to the "factor" channel of the squash deformer. The problem is that the "factor" channel is unmappable.

So does anyone either know how to come at this from a different angle or make the "factor" property mappable? Any and all help would be MAGNANIMOUSLY appreciated!!!

07 July 2007, 07:29 AM
just thinking.... why don`t you make a custom attribute somewhere called "FactorDriver" or whatever and map this with whatever you want, then directly connect the "FactorDriver" to the "factor" attr...

07 July 2007, 04:46 AM
I don't know exactly how custom attributes/expressions work. I understand basic programming, but would a custom attribute be able to interpret a fresnel map, or just any kind of map/texture for that fact, and shoot it out to the factor attribute taking into account uv's and whatnot? Could you elaborate please?

07 July 2007, 05:19 AM
I could be wrong but I think if you are relying on facing ration that comes from a samplerInfo node your outta luck. Attributes (such as facing ration) from the samplerInfo are calculated at render time. Im not sure what the solution to your problem is but sounds like you could pull if off with some lattices and clusters.

CGTalk Moderation
07 July 2007, 05:19 AM
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.