PrevNext


 

This is about multiple shadows 陰翳(いんえい) created from multiple spot lights from a caster object.
Very often shadows are much more intriguing than the caster objects themselves. Many times I see complex and interleaving shadow patterns that it is hard to believe and relate to the caster object which is actually quite simplistic in shape or pattern. 

Technical Details:
I created this program using OF a little while ago. The program can take any mesh model object ( in .obj format, using ofxObjLoader) or objects in the scene. I placed 6 spot lights (shade with GLSL shaders), with different attributes of cut-off angle, cosine-exponential, field of view etc. The lights moved around with various orbits and speeds which can be modified by GUI or program code.

It generates real-time shadows basically using VSM shadow mapping with a shadow map for each of the light.

Using geometry instancing to generate a shadow map for each light and also instance draw for shading each light on the scene, the speed is very fast and at 60 frames/s with ease in my iMac. It should be able to add more lights without any performance hit.

The videos were recorded in one-shot, without any editing afterwards. I pressed keys to turn each light ON and OFF. And at times, I used the mouse to move the camera view around. 

The program has GUI to switch to show each light's view frustum (screenshot below). It can also switch the screen view to the light's point of view, and then use the mouse to drag/pan/zoom to help positioning each light in the desire orientation and location. The GUI is also for changing each light's attributes such as field of view, near plan, far plane etc.

By the way, for the one with antique Chinese chair, the mesh model I found seems to has an issue with some of the mesh faces winding, which messed up the front and back facing when rendering in OpenGL. And I have not got the time to fix yet.

Note: The video has no sound or music background, which I think is better this way.

Created with OpenFrameworks, GLSL, and some OpenGL codes.

 

Screenshot #1. GUI and light's frustum to assist the positioning and orientating the lights for casting shadows.

Screenshot #2

Screenshot #3

Screenshot #4

Screenshot #5

Screenshot #5

Screenshot #6


Prev / Next