This article describes how to set up lighting and save those changes in a SOLIDWORKS part template
Lighting is a very subjective setting in SOLIDWORKS. Some may not care much about lighting, while others may find it a crucial aspect of their daily routine. If you sometimes find your models don't look bright enough, or the shading is off, or parts of the model are darker than others, this article may solve those problems.
Default Light Settings
Let's start by exploring what the lights look like when a new part is created. The easiest way to do this is start a new part using the default part template. If you have already created custom part or assembly templates and want to use one of those, that's fine.
After starting a new part, create some geometry. This is necessary so we can adjust the lights and see what effect our changes have on the model. In our example, a simple block with a sphere on top works well.
Notice the 3 "hot spots" visible on the sphere. Those hot spots are created from Directional lights. The brightness of those spots are controlled by a setting called Specularity, which we will talk about shortly.
If the model is rotated, you may find certain sides of the block are darker than others. If this doesn't change while rotating, it's because there are lights that are locked to the model. This creates an effect more akin to walking around the model while it is stationary in a room.
In contract, when lights are not locked to the model, rotating the model is more realistic. The effect is that the viewer is stationary, and the model is being rotated. That is, in essence, exactly what is taking place, albeit in a computer aided fashion.
Accessing Light Settings
Light settings can be found in the DisplayManager tab near the top of the FeatureManager on the left side of your SOLIDWORKS window. After accessing the DisplayManager, click the "Scene, Lights, and Cameras" button, shown in the following image. From there, expand the Lights folder to gain access to the existing lights.
Right clicking the Lights folder allows for adding additional lights. It is possible to add spot lights, point lights, and even sunlight, but that is outside the scope of this article. We will focus on modifying or adding ambient and directional lights.
Modifying Light Settings
The most basic type of light is Ambient. It cannot be deleted, and there can't be more than one. To edit the Ambient light settings, right click it and select Edit Light...
There isn't much that can be edited when it comes to Ambient lights. It can be turned off, it's color can be altered, and it's intensity can be adjusted from 0 to 1. The default value is .3, but we're going to change it to .2 for the sake of this article. Use the slider, arrows, or key the value in directly, whatever you find easiest.
Click the green check when finished, and we will move on to the more interesting Directional lights.
Modifying Directional Lights
Directional lights are the most common lights in SOLIDWORKS. They help add realism to the model. They can even enhance the users ability to differentiate between faces of the model. Use the right mouse button to edit Directional lights in the same way the Ambient light was edited.
The first option, "On in SOLIDWORKS", allows for turning the light off. This can be convenient when there are multiple lights and one needs to be turned off for whatever reason. Unchecking the box is easier than deleting the light when you might need it later.
"Keep light when scene changes" is an option available for most light types. It does just what it says. If the scene changes, the light will be retained. This is normally an undesirable situation. It has the effect of causing lights to multiply unexpectedly.
Consider what can happen if other saved scenes have lights with this option checked. As scenes are changed, any light with "Keep light when scene changes" checked is going to be retained. Change scenes a few times, and next thing you know, you've got way too many lights!
Best practice is to always set your scene first. This makes perfect sense when you consider every scene has it's own lighting. Once the scene has been determined, then tweak your lights.
Ambient Setting
In our example, we're going to set the Ambient value in the Directional light to zero. We already have an Ambient light on it's own. Best not to mix things up.
Brightness Setting
This is the brightness of the Directional light. It defaults to .3, but we're only going to have 2 Directional lights, so let's set it to .6.
Specularity Setting
This setting is the shininess of an object, or how much it reflects. A higher value increases the intensity of the hot spots. Leave this at .3.
Light Position
Here is that "Lock to model" option mentioned earlier. The default directional lights are usually checked, but we're going to uncheck it. This will give the effect that we are rotating the model while we stand still, rather than leaving the model stationary and walking around it.
The Longitude and Latitude settings can be adjusted, if you like, but it's actually much easier to grab the yellow handle attached to the light and drag it around the screen. It's also kind of fun. Notice how the model dynamically updates as the light is moved.
Go right ahead and move the light around as you see fit. We will be doing this with another light shortly. In our example, the light will be positioned at roughly 100° longitude and 30° latitude. Click the green check when you're all done.
Modify The Second Directional Light
Edit the second Directional light. We will be leaving the settings very similar to the first Directional light, but the position will be different. In our example, all settings are the same, except the Brightness has been set to .5, with light position approximately -30° longitude and 10° latitude.
Deleting Lights
Standard SOLIDWORKS functionality is used for deleting lights. Feel free to select the third Directional light and press the Del key, or right click it and select Delete from the menu.
Once the third Directional light is gone, feel free to go back and tweak the other lights as you see fit. As previously mentioned, lights are very subjective. This article was meant to give you a starting point, but if you prefer something different, now is the time to make those adjustments.
For various reasons, the templates on your computer may have slightly different default light settings. There may also be a different number of lights to start with. Add or delete lights as you see fit.
Adding Lights
If you need to add a light, simply right click the Lights folder and select "Add Directional Light". As mentioned, there are options for adding other light types as well, but we will not get into those variations at this time. Exploring is encouraged, though!
Renaming Lights
Renaming requires nothing more than a slow double click, same as renaming anything else in SOLIDWORKS. It is usually not necessary to rename lights unless dealing with a model that contains numerous types of lights at different locations.
Point lights are great if modeling living quarters or actual light sources, such as a light bulb in a lamp. Use the "Lock to model" option to keep the light properly positioned, and use xyz coordinates to position the light exactly where desired.
The "Edit All Lights..." Function
Right clicking the Lights folder and selecting "Edit All Lights..." puts you in what might be described as Edit Light mode. It becomes possible to page through every light in the model, editing and tweaking settings one light at a time. It is a convenient way to edit lights if it is necessary to make changes to more than one light.
Save The Template
Once the lights have been set to your liking, it's time to save the template. Delete whatever geometry you created first, then select File > Save As. Set the file type to Part Template and give it a name. Next time a new part is started, use that template, and your lighting will be just the way you like it.
Happy Modeling!