Tuesday, January 27, 2015

Nitrous Soft Shadows & Shadow Map Resolution

Call me an idiot if you like, but when trying to achieve soft shadows from a Nitrous display, I just couldn't get it to work. Changing the Shadow Map size on the lights had no effect, nor increasing the Lighting and Shadows Quality slider in the Viewport Configs. Well, a little research and it turns out it's been there for a while if you try taking the Quality slider DOWN to the left. I didn't think to keep setting the quality of my viewport shadows down to lower and lower settings, but 2nd from the left is "Point Lights/Soft-Edged Shadows". Not sure how this affects other parts of the viewport quality but it might be handy on occasion.

You can use this feature along with a MaxScript command (available since 2014) that controls the shadow map resolution used to display shadows in the Nitrous viewports. Shadow Map size for lights ( you must have physical lights in the scene, not the default lights) can be set with a simple MaxScript command referring to the Nitrous Graphics Manager core interface. The default Shadow map size used by Nitrous is 512 but you can raise or lower this to your liking to affect the crispness of the viewport shadows. Use the following MaxScript command, typed into the Listener (w/o quotes of course):  "NitrousGraphicsManager.ShadowmapSizeLimit = 1024"  
(or whatever size you like, but not likely above 4096 which is the typical high end texture size limit for graphics cards). Keep in mind that though maxScript expects this number to be an integer value, it's probably a good idea to keep it power of 2.

No comments:

Post a Comment