1
$\begingroup$

Is there a way to display an object in the viewport in one solid color against the background? In ZBrush it is frequently used to help judge the outside shapes of the model without internal details distracting you.

I mean interactive viewport mode, while you can still sculpt, not make a one-off rendering. An example in use is here:

https://youtu.be/riyDQBJxSBQ?t=55

$\endgroup$
2
$\begingroup$

Assign the object an emissive material the color you want. Set the world background color to something you like, if you like.

Switch the view mode of your window to'Material'. If you want the new background color too, you'll have switch to 'Rendered'. I find a pie menu (with gestures) helps speed up the switch.

If you want a new background color without rendering, you can change that in User Preferences 'Themes'. If you need a quick switch of background color too, that's scriptable... see this BSE answer.

$\endgroup$
  • $\begingroup$ One old trick for changing colors without too much faff is to animate them. Then you can just leave the timeline open at the bottom and scrub to the right color combination. $\endgroup$ – Robin Betts Mar 24 '18 at 18:26
2
$\begingroup$

Unfortunately GUI matcaps are compiled into Blender and not customizable, otherwise an easy way would have been to just add a custom matcap with only blacks and no specular.

One way to go could be to temporarily turn off the OpenGL lights in the viewport.

To do this (thanks to @batFINGER for improving my script!):

Open a Text window, create a script and save it in a text block nolights_button.py.

import bpy
from bpy.props import BoolProperty
saved_solid_lights = bpy.context.user_preferences.system.solid_lights[2].diffuse_color.copy()

def lightsout(self, context):
    solid_lights = context.user_preferences.system.solid_lights
    solid_lights[0].use = not self.lights_out
    solid_lights[1].use = not self.lights_out
    solid_lights[2].diffuse_color = (0, 0, 0) if self.lights_out else saved_solid_lights  

bpy.types.WindowManager.lights_out = BoolProperty(default=False, update=lightsout)

def draw_button(self, context):
    wm = context.window_manager
    self.layout.prop(wm, "lights_out", toggle=True)

bpy.types.VIEW3D_HT_header.prepend(draw_button)

Now, if you click "Run Script", a button will be added to the 3D Window header ("lights_out") that allows you to turn on and off the OpenGL lights, thus leaving you with just silhouettes.

enter image description here

You can hide the text window, but you'll have to run the script again if you close and reopen the file.

$\endgroup$
  • 1
    $\begingroup$ Interesting. Could make this an operator (and hence give it a keymap) and also save the diffuse color user pref. $\endgroup$ – batFINGER Mar 24 '18 at 17:59
  • 1
    $\begingroup$ Something like this is quick and easy pasteall.org/892176/python adds a button to 3d view header. (feel free to use in your ans) $\endgroup$ – batFINGER Mar 24 '18 at 19:00
  • $\begingroup$ @batFINGER I've added your contribution. thanks again, $\endgroup$ – Nicola Sap Mar 24 '18 at 19:50
  • $\begingroup$ NP The register checkbox on text editor will autorun any script with a .py extension on file load. $\endgroup$ – batFINGER Mar 24 '18 at 19:59

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.