# FS Distance from Camera settings to maintain constant line thickness

I am using Freestyle with the Distance from Camera thickness modifier. I am trying to figure out the proper distance settings/curve to keep the thickness of a line constant in relation to the geometry it is on. For example, if the line is a marked edge representing a seam on a piece of clothing, I want it to always be 5mm thick in relation to that garment regardless of camera distance.

I want these settings to work out to long ranges where the line would eventually vanish, and I'm trying to avoid just eyeballing it.

• You need to play with the "Distance from Camera" modifier for thickness not geometry. Freestyle/blender is pixel based so is up to you to establish the relation between pixel and real mm Jun 8 '16 at 14:27
• Sorry, that was a mis-type. I meant the thickness modifier. Jun 8 '16 at 18:14
• to visualize the correct amount to put as values enable limit in the camera panel and play with the "end" value to figure out the min and the max Jun 8 '16 at 20:21
• Freestyle edge thickness is by default camera distance indipendent. So you would like to make modifier affect only some objects and not other? First tought would be to use different freestyle line sets. What exactly you would like to relate the parameter with? Could you add more information about the "relation to the geometry is on" part of the question? Jun 12 '16 at 11:21

Short Answer: Not really possible right now.

Long Answer: There may be a workround.

First, Let's see what Range Min, Range Max, Value Min and Value Max mean:

As you can see, Range Min and Range Max actually indicate the distance between camera object and the nearest/fartherest point on the mesh bound. The Fill Range by Selection button can calculate those two values based on selected object. Value Min and Value Max are both thickness values in pixel.

However, these four parameters won't dynamically change with the relative distance between camera and extreme points on object. You have to drive them with that distance value:

Before (no driver): After (with drivers):

NOTE: The method above can be very limited because the distances to nearest and fartherest point can be different, which makes the expression less accurate. Anyway, assuming this is what you are going to make.

• Interesting, I hadn't considered a driver. Why doesn't it work to set a large max distance with a curve? I'm not sure drivers will be a practical solution when dealing with a whole scene with many objects. Jun 12 '16 at 17:49
• Not possible right now I'm afraid, sorry dude. Bacause modifiers are global, instead of per object or per line set. You have to turn to other solutions. I bet @T.K. holds the key to it. :) Jun 13 '16 at 1:02
• Ah, well, I guess I've got something new to bother TK about >_< Thanks. This driver solution will help with some things. Jun 13 '16 at 1:20
• Haha, I also agree that it can be a nice feature to have if possible, so he might deserve a bother. XD Jun 13 '16 at 1:32
• Hi guys! A simpler solution would be just to insert keyframes to the Range Min/Max and Thickness Min/Max properties and edit the curves in the Graph Editor. Still this solution requires a line style per object, which could be tedious to set up when you have a large scene with many objects. I guess there could be a better solution, possibly implemented as a new thickness modifier, to take account of the apparent size of an object after the perspective/orthographic projection according to the camera settings.
– T.K.
Jun 14 '16 at 3:19

## Use different Freestyle Line Sets

As by default the thickness is by default camera distance indipendent, I would suggest to group your objects whose freestyle line thickness should not be affected by the modifier you mentioned and asssign to that group a custom thickness value, without modifiers, by taking advantage of the line set Selection by masks (Group in this case).

In the following example, the grey cubes (they all have the same size) are in the line set with the modifier, while the red parallelograms are in another without modifiers.

With setup like this, you should be able to adjust the screen size indipendently.

Obivusly the choiche of the masking method (using object's groups in this example) for distinguish the line sets strictly depend on your specific scene/project setup, so just take mine as an example.

Try changing the camera settings from perspective to orthographic and play with the orthographic scale to zoom in or out.

This way, objects always maintain the same size regardless of the camera distance.

• This does technically work, but it's no good if you are trying to use a regular lens. Orthographic lens flattens everything. Jun 12 '16 at 6:57