I’ve managed to get cascading shadows working. It was mainly for the buildings and environment to cast shadows which worked out great. However, my character had some flickering while moving around.
Turns out it was the shadow being cast by my character. Increasing the shadowMapSize property of the cascading shadow map(CSM) made it more apparant, although I had to raise the value all the way to 16384 to see any definition. I wanted to keep the shadowMapSize low at 1024 as pictured, so I did not setup the character’s material in the CSM.
But I still want the character cast it’s own shadow. Can ThreeJS’s default shadows can coexist with CSM? Or are there better methods and solutions for doing this? Or is there just something I am missing about CSM to do this properly?
Are you using r183.1? They made significant improvements to shadows.
Yes, you can use multiple shadow solutions. See this example.
In one of my programs, I used two Directional Lights - one to create shadows for the outside world and one to create high resolution shadows inside a an airplane cockpit. The lights were different distances from the viewer and the boundaries of the area were defined to avoid overlap.
That was somewhat of a special case since the lights were on the lower left, so I did not have to worry about defining shadows on the left. On the right, I could extend the high-resolution shadows to project on the wing and have the low resolution shadows start beyond that. I only used this solution while in the cockpit. In exterior view, I just used a single light source.