Hi, how can I link lights to specific objects? Something like Lighting layers.
thanks for the link
You can also do it via renderlayer setups. Put the lights on one layer and the objects on another. On the render layer enable viewing of the objects and the layer containing the lighting rig that you want use. This way only those lights can be seen by those particular objects. Sometimes light groups are preferable, sometimes this method. Experience will dictate which is appropriate (particularly when reflections are involved). This method is HAZARDOUS when using the z-combine node because it amplifies the artifacts from the z-combine antialiasing mask, ripping holes in the alpha channels of all objects having overlap with another render layer.
Yes thanks. This method I try first before I posted this thread but I had problem with rendering - when I tried render only one separate layer everything look ok. But when I try to render two layers it looks like one rendered layer with objects and lights from both layers - no effect.
I read the wiki link. It is what I have been looking for - but - from unknown reason I cannot assign more then one light. When I try to assign another light to another object - the first one bacome assigned to the second light…
I don’t know who moderates this forum or why there are no stickies here but this is one topic that needs to be made a sticky. There are certain fundamentals to Blending that every user needs to be made aware of. This is one of the most basic (and entertaining) among them.
This is a topic that fits into two clearly defined forums on this site…Texturing & Lighting AND Composition, Visual Effects & Rendering. Due to the recode of Blender’s rendering pipeline in v.2.42 this is one area which belongs to both of these forums and can not be separated.
In order to help you get your brain wrapped around this subject you might want to download the following file:
http://uploader.polorix.net//files/89/RenderLayerTechniques.blend
The following was coppied and pasted from the v.2.42 release notes that can be found here:
http://www.blender.org/development/release-logs/blender-242/render-pipeline/
“” Shadow and ray-tracing
It is important to realize that shadowbuffers and the Octree (for ray-tracing visibility) get generated in a preprocess, so these are identical for all RenderLayers as indicated.
That means you can separate a foreground from a background with RenderLayers, but still get a combined image as if it was rendered in a single pass. “”
What this means to you is this: If you have objects on a render layer that can “See” objects on a scene layer that do not actually get rendered with the render layer itself, the reflections and shadows of those “Seen” objects will be rendered in that renedr layer’s objects due to their being seen. This can have a dramatic effect on your lighting setups.
What? OK, I can feel your pain. Open up the .blend file. Notice that the lamp is on layer 2 with the plane and is set to only light the layer that it is on. The sphere and the cube are on layer 1 and should receive no light because they have no light of their own and the lamp set to layer 2 will not light them. Press F12 to render. Now you would expect that the plane would be rendered and there should be black shapes where the sphere and cube are because they are receiving no light. Well, the sphere got a little bit of light anyway. Why? Because it has ray-mirror enabled. Remember: shadows and reflections are rendered in a pre-process. It does not matter that the light is set to layer due to this fact. Press F8 and click on the little arrows on the world tab and select the world from it’s pop-up and re-render. Now there is a lot more reflection in the sphere because we just added ambient lighting to the scene.
Now, on the render layer tab, click the little check mark next to render layer 1 to disable it, click the arrows beside the previous check, select render layer 2 and enable it’s check mark. This layer contains a circle on layer 4 and an area light on layer 5. All geometry in the scene can be “Seen” by the circle and the light. Render the scene. Here we see that the light is able to cast shadows onto the circle because both objects can see the geometry in the scene layers.
Now lets try the same experiment in reverse. Disable render layer 2 and enable render layer 3. Be sure to click the x next to the world on the world tab (F8) if you still have it enabled. All scene geometry (except for the square plane on layer 2) is enabled to render on the render layer and all of this geometry can “See” the lights in the scene layers though none are enabled on the render layer. Do a test render. Ah, the process doesn’t seem to work in reverse.
Now disable render layer 3 and enable render layer 4. Again we have the same set up only this time we added scene layer 5 to the mix which contains a single area light. Test render. Now we’ve got shadows from the area light. Finally disable render layer 4 and enable render layer 5. Same setup but this time we disabled scene layer 5 and enabled scene layer 6 which contains a single hemi light. These lights do not cast shadows. Test render. As you can see the scene does not render with shadows because no lights were rendered which are able to cast them.
This is the process by which you can selectively group lights in your scene in order to gain maximum control of the overall look and feel of your scenes. But don’t be fooled, these tricks do NOT work across multiple scenes. Another thing to note is that this is BAD practice when using the z-combine node. The edges of the mask applied to the depth channel act like an alpha channel when selectively lighting layers in this manner and will seem to cut holes through objects in the background. In that case either use light groups or set your lights to the “Layer” only option. Hopefully this will change in future versions.
Thanks a lot:yes:. But my graduation exam starts on next wednesday. I must learn:spin: so I havent time to read your answer now. I hope you understand.
You were expecting me come dashing in on my gallant steed to show you the magic lighting rig button maybe?
Orrrrrr…(this ones a bit more romantic) maybe a HAHO jump from 30,000 feet at 1100 hours with an eight man squad, infrared strobes and night vision, para-sail for 20 miles, circle wagons, stow our gear, do weapons checks, trek 6 miles over rugged terrain, B&E your home without tripping the alarm, MP5s at the high ready, SAW on rear security, hack your computer (because it’s off-line of course), fix the whole thing while you sleep, then steal away like the tooth-fairy, haul all of our dirty, smelly asses (it’s a wonder the stench didn’t wake you up) back to the sea (another 11 mile trek), swim 3 miles, clack the sticks 3 times to signal our arrival at the rendezvous point, spend 3 hours in open water waiting on the sub’s arrival, get our first hot meal in 36 hours, clean and stow our gear, shit (those of us who hadn’t already done it in our wet suits), shower, shave, spend 2 hours in debriefing, call it a good days work, and grab a 4 hour power nap B4 being deployed on your next crisis?
yes please.
Dream on tigger.