I have a plane for the ground, but leaving a sharp edge between it and the camera looks odd. so I tried to use mist to help blur the edges and make it look somewhat natural(since I can't just make it huge, blender insists on clipping at a certain size) however, I also want freestyle on some objects. when rendering, it draws lines even on things that shouldn't be visible, like things in dense fog. is there a way to constrain the effect to specific meshes or exclude it from others?
-
1$\begingroup$ FYI, you can change the clipping distance of the camera in the camera settings. $\endgroup$– CharlesLMar 12, 2014 at 13:18
-
$\begingroup$ Related - you can obscure the freestyle edges by the mist by using the compositor to mask them out based on the density of the mist or smoke - blender.stackexchange.com/a/105536/29586 $\endgroup$– Rich SedmanApr 3, 2018 at 7:20
2 Answers
You can avoid freestyle rendering in mist by setting a "distance from camera" modifier.
- Goto "Render Layers"
- Scroll down to "Freestyle Line Style" Panel
- Click "Alpha"
- Click "Add Modifier" and then select "Distance From Camera"
- Select "Mix" for the blend type
- Select "Curve" for mapping type
- Add a point in the center of the curve ui
- set the right most point x pos to 0.3 and y pos to 0.0
- set the center point x pos to 0.25 and y pos to 0.5
- set the left most point x pos to 0.0 and y pos to 1.0
EDIT:
- set the Range Max to the depth of your mist.
PROTIP: Gain more control over falloff by adding points to your curve. Adjust shape until the "Distance From Camera" modifier falloff matches your mist.
Put your objects into groups, depending on the group freestyle can apply the linestile or not. Go to the Freestyle Lineset Options and hit the "Group"-button. Below there will be a new field "Group" and two buttons "Inclusive" and "Exclusive".