--- Operating System, Graphics card ---
Mac OS X 10.8.2, NVIDIA GeForce 320M 256 MB
--- Blender version with error, and version that worked ---
with error: 2.66a
worked: 2.57, assuming from these comments:
http://blenderartists.org/forum/showthread.php?215069-(2-5)-Environment-Lighting-shadows-and-transparent-backgrounds
--- Short description of error ---
I have a problem with rendering shadows over the Shadows Only materials when Environment Lighting is enabled. I'm using Improved Shadows Only Material as described in this link:
http://code.blender.org/index.php/2011/03/improved-shadows-only-material/
In the examples, the middle one has caption saying "Ambient Occlusion and Environment Light enabled.". The shadows there are present, slightly different then without shadow only material, but are visible.
--- Steps for others to reproduce the error (preferably based on attached .blend file) ---
Just hit Render in the attached blend file. You won't see any shadows. Then, unchek World->Environment Lighting and shadows are back.
In the attached zip archive you have the blend file ready to be rendered and also 3 render results:
- no-shadows-only.png - for comparison how the shadows should look like
- so-env-light-disabled.png - means shadows only enabled, Environment Light disabled
- so-env-light-enabled.png - means shadows only enabled, Environment Light enabled
Description
Event Timeline
Miika worked on this 2 years ago, maybe he has time to check on this report.
However, it would save us time if you just load 2.57 (download.blender.org/release/) and try to create a working situation, and then read that blend in 2.66.
(Note that due to Mesh changes, files from 2.66 dont read in 2.57)
Hey,
Actually this isn't not a bug but rather limitation of shadow only option: It doesn't work well with lights with energy stronger than 1.0, due to the fact that shadows are calculated before color balancing or screen gamma mapping.
A simple solution for your blend file is to reduce environment lighting energy from 4.0 to something smaller.
Hey, thanks for reply.
I've just tested this with 2.57 and the result is the same as with 2.66a. You are right about the energy set to 4. I've tried to set it to 1. I'm attaching the results. Sadly the shadows differ very much. When Env Light is enabled the left part of the shadow is completely cut off.
Just a side note... What I wanted to do in the first place was to make separate render outputs containing: floor, object, object's shadow. So I could later composite this with Photoshop and move object with its shadow along the floor.
Due to limitations of Shadows Only Material (which in few other cases is very helpfull of course), I've found another solution - nodes:
http://blenderartists.org/forum/showthread.php?216113-Brecht-s-easter-egg-surprise-Modernizing-shading-and-rendering&p=2092620&viewfull=1#post2092620
I'm posting this in case someone would have same problem as I did.
I attached a tweaked blend file that has all light energies reduced and render exposure increased (scene -> color management) to make the geometry brighter. In that case shadow looks okay and lighting looks like in your original file.
Anyway, that node setup you linked is always better option if you need to match rendered shadows exactly. :)
Thanks, Miika. I very appreciate your help.
I've rendered your blend. Shadows are much better now. Great idea with changing exposure. There is still one problem with this way. In the tweak1.png (which I've just attached) the shadows are grey instead of blue (like in the previously attached no-shadows-only.png). Please compare also with tweak&floor.png where I've added tweak1.png over the floor render. The lack of color is noticeable here.
Anyway, this time I'll use the nodes, because I need the shadow to match the colors, to be blue. But your idea will help me in other cases where all I need is model with shadow over transparent background.
Thanks again for your help.