2
$\begingroup$

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.

$\endgroup$
  • $\begingroup$ 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 $\endgroup$ – diramazioni Jun 8 '16 at 14:27
  • $\begingroup$ Sorry, that was a mis-type. I meant the thickness modifier. $\endgroup$ – Drudge Jun 8 '16 at 18:14
  • $\begingroup$ 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 $\endgroup$ – diramazioni Jun 8 '16 at 20:21
  • $\begingroup$ 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? $\endgroup$ – Carlo Jun 12 '16 at 11:21
5
+50
$\begingroup$

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:

enter image description here

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:

enter image description here

Before (no driver): enter image description here After (with drivers): enter image description here

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.

$\endgroup$
  • $\begingroup$ 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. $\endgroup$ – Drudge Jun 12 '16 at 17:49
  • $\begingroup$ 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. :) $\endgroup$ – Leon Cheung Jun 13 '16 at 1:02
  • $\begingroup$ Ah, well, I guess I've got something new to bother TK about >_< Thanks. This driver solution will help with some things. $\endgroup$ – Drudge Jun 13 '16 at 1:20
  • $\begingroup$ Haha, I also agree that it can be a nice feature to have if possible, so he might deserve a bother. XD $\endgroup$ – Leon Cheung Jun 13 '16 at 1:32
  • 1
    $\begingroup$ 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. $\endgroup$ – T.K. Jun 14 '16 at 3:19
1
$\begingroup$

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.

enter image description here

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

enter image description here

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.

$\endgroup$
0
$\begingroup$

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.

enter image description here

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.