2

So I am rendering a scene with a train and landscape. I want to render the train separately from the landscape, since it is too extensive on my computer. The down side is that the train wont render with shadows on the landscape. Is there a way to render the landscape with shadows already on it? Any help is appreciated. I am using cycles.

EmptyStuff
  • 993
  • 4
  • 12
  • 20
  • It should be casting shadows by default.. Are you excluding the train layer from the landscape layer? Could you post some screenshots of your settings, or better a .blend? Without more info, it's hard to guess what could be causing this. – gandalf3 Feb 05 '14 at 22:37
  • Hi gandalf. I am on my phone to get now and I won't be home for 5 hours. I will post a picture and the blend file then. I purposefully excluding the landscape and the train, because rendering them together crashes my computer. I want to render the landscape with the shadows from the train already on it. So that when I put the two images together of the train and landscape and the landscape will have shadows from the train on it. Rendering them separately, the train won't display shadows since there is no sourounding landscape. – EmptyStuff Feb 05 '14 at 22:48
  • Okay. There is a difference between Excluding and Not including, but I'll wait until I can see what's going on. – gandalf3 Feb 05 '14 at 23:12

1 Answers1

9

If your computer is unable to render an image (insufficient RAM?) with the train included then it will most likely have the same issue if you try to use it to render the shadows. You may want to render the entire image on another computer that can cope with the entire scene in one go.

One thing that can work is to create a low poly mesh for the train, a simple outline of the shape that will cast a visually matching shadow. By rendering the background with the low poly train you can get the ground with shadows and then later composite the train over the top.

Using cycles you can have an object cast shadows and not be visible to the camera by setting the Ray Visibility options, found under object properties. By turning off camera the object will not be visible to the camera but it will still cast shadows and reflections on other objects. If you want to merge this into your materials you can add a Light Path node.

enter image description here

For blender internal the material settings have a similar option called cast only under shadow options.

enter image description here

Edit: In a cycles material you can use the light path node to control the mix amount to get an object that is transparent to the camera but still casts shadows.

enter image description here

The advantage of using a material is that you can alter the shadows. By using a translucent or glass node instead of diffuse you get softer shadows and the ability to add a colour tint. You may also want to use the original object material so that reflections also look correct.

sambler
  • 55,387
  • 3
  • 59
  • 192
  • Thank you @sambler for the great response. I will try that. Thank you for being so thorough!! – EmptyStuff Feb 07 '14 at 01:51
  • Could you give an example of using a light path node to achieve the same thing as turning off the object in cycles. Thanks. – EmptyStuff Feb 07 '14 at 01:55
  • The answer given by @sampler is spot on. A tool to have in your belt is building multiple render layers to help you break the work up so your computer can cope (or your patience tolerance is met!). I'm nearing completion of my first such use and this is the tutorial that got me well along: http://simulate4d.com/2011/10/compositing-a-scene-using-render-layers-in-blender/ My project has four layers, so a bit more repetitious than what that tutorial covered, but that's not hard to figure out: it's just more alpha over nodes. I'm working on getting the shadows just right on the two layers closest – tobinjim Feb 06 '14 at 15:40