How to enlarge an object( /mesh) according to its distance from the camera?

I don't know what this feature is called in general, but my goal is to have blender dynamically expand the mesh depending on the distance from the camera. This is a technique frequently used in Japanese anime and manga, and it allows for dynamic expression.

I know of a method that uses Lattice, but this is not very accurate and breaks down a lot when the camera is moved, so I would like to know of a more procedural method.

I thought about using a geometry node to expand the mesh directly based on the distance from the camera, but this was not feasible to my knowledge. I would like to know if there is any possible way other than this approach.

English is not my first language. I would be happy if I could get the message across. Thank you.

(option) VRM4U, which is plug-in for Unreal engine, have this function. This image of nodes is the author’s method of this function.

• What would you like to be the center of scaling? The camera, the object origin, something else? If unsure, a video of the effect would probably make it clear enough. Feb 13, 2022 at 5:05
• I would like to set the camera as the center of scaling. Feb 13, 2022 at 11:43
• @imjustaleaf Could you also tell us which answer led to the solution, and if it's one of the ones below, also mark it as "Accepted Answer"? That would be very helpful for others and the question would show up as solved. Thanks! Oct 3, 2022 at 11:35

To scale the geometry about the camera, by a factor modulated by distance from the camera:

This can be understood as shifting our coordinate system. We move the coordinate center onto the camera, multiply our positions by a scalar, then move the object back to where it was.

Here, the scalar is a function of distance from camera-- which is just distance from the origin in our new coordinate system. This uses a map range so that at a distance of 1 unit, the object will scale 1.0x, and at a distance of 10 units, the object will scale 4.15x.

Note that the scaling isn't actually by object-object proximity, but by vertex-object proximity, so meshes are actually deforming slightly, not just transforming. Not that you'll be able to see that, looking through your camera, not directly.

• Thanks! I finally got the result I have wanted ! Feb 15, 2022 at 21:46

didn't try Nathan's setup but here is my attempt at it... hope it adds something

• Thanks! I finally got the result I have wanted ! Feb 15, 2022 at 21:46