View Full Version : Occlusion Pass on Render Farm

01-26-2009, 12:30 PM
I am using Butterfly net render and I have a scene that I want to submit simultaneously with the regular render and simply swap the objects used in the original scene for the occluded objects in another object file and save the scene with an "_occlusion" at the end as not to confuse butterfly. I just saved my object file with an "_Occlusion" at the end and enabled node editor and added the "Occlusion_I" node to my diffuse shading slot. My question is a little more specific, because when I get to the point where I want to swap my objects for the occluded objects I find that I have to replace each layer by hand. I have tried using the "Replace Object" but it only works when you have all the layers loaded in your scene (I do not use all layers in each shot so this doesnt apply). Also the layer you select to "Replace Object" must be the first layer in the object file and as I said before I do not have all layers in each shot so this does not always apply.

Simply put my question is what is the best way to replace the regular objects with the occluded objects in another object file when I dont have all layers in each submitted scene. Help would be greatly appreciated.

01-26-2009, 12:33 PM
buzzing newtek !!!

saving renderpasses (like occlusion) is long overdue!!!

01-26-2009, 12:57 PM
So your question has more to do with Object Replacement than it does with AO.

From what I understand, in order for LightWave's Object Replacement function to work correctly - for it to replace your "normal" object file with your "occulsion" object file - it needs two things:

- It needs the layers to match up in each object file, tit for tat. So if you have Peach on layer 01 and Worm on layer 02 in the "normal" LWO, then that needs to hold true in the "occlusion" LWO as well.

- As the Object Replacement does it's mojo, it runs down your list of layers in both object files, linearly, and replaces the first layer in LWO A with the first layer in LWO B, and so on.

I believe the problem you're running in to is that Object Replacement isn't smart enough to know how to properly handle empty layers and layers that you aren't using in your scene file. It doesn't understand how to skip a layer during the replacement process. So like if you've got stuff on layers 1-10, but layer 4 is either empty or it contains something that you don't necessarily want in your scene file, you're going to get negative results during the Object Replacement.

Anyone aware of a work-around?

01-26-2009, 01:15 PM
I found out my problem lies in the first layer. I am not using my first layer in any scenes but the first few so in order to replace an object I have to have that layer. ???

01-26-2009, 01:23 PM
Ok, I was wrong. Turns out Object Replace IS, in fact, smart enough to know how to skip empty layers and layers that you're not using in Layout. HOWEVER, Object Replace requires that Layer 01 in both object files be present in your scene file. Apparently it needs Layer 01 as a starting point or something. Just make that layer invisible to camera if you don't want to render it, but keep it in your scene file.


01-26-2009, 01:29 PM
My scenes that are saved out in sections already are missing the layer as of now. If I add in the first layer of the object file and save it, Save all objects, save again just incase and then re-open the scene file I still cannot replace all the layers with another object. Now it is only replacing the selected layer (first layer in object file) with the first layer in the occluded object file. Im not sure what is the missing link. Any ideas?

01-26-2009, 02:18 PM
Object replace can get confused if the layers are not all contiguous in the scene file, such as if you've done heavy editing, added/removed layers at different times, etc...

I'll typically do this... to force it to update all layers... if I run into problems...
Rename the existing object by adding "HIDE" to the end...
Reload the scene and select the new object each time it asks to find the object...

or sometimes I'll select the first layer of the object in the scene, save that object to a new object using the final name I want. Replace the newly saved object with the real one with that name. Then reload that scene...

or use a text editor to search/replace the object name in the scene file...

01-26-2009, 03:06 PM
Thanks for your help! I will try the first method out. I dont get what you mean in the second option about save the first layer in the scene file as another name and then replace it. I got a few ideas from reading your post so I will see what works. Thanks again and very creative work around.:thumbsup:

01-26-2009, 03:09 PM
We did all our pass object replacing for Iron Man in notepad as LW would take forever to do it with the scene open.

01-26-2009, 03:21 PM
Problem solved! so your advice worked. I simply renamed my original object file so layout could not find it when the scene is loaded. I then selected my occlusion object file when it asked if I wanted to choose another object file. This works like a charm and seemed to be the quickest fix compared to the other options. Thanks again!

01-27-2009, 01:24 PM
what we do here is we duplicate and rename the folder containing the objects one normal and one with _occlusion added to it's name