How can I matte out an object with multiple materials on it show in other object reflections? The Vray Material Wrapper requires a base materiel otherwise the object shows up black in reflections. But what if that object has multiple vray materials and there is only one slot for the base material in the material wrapper? works fine for object with 1 materiel but in this example i have two materials on the building, blue and green.
this works well. I have a slight issue though. when a cosmos asset is put in the vray properties node and it overlaps with another layer, the Alpha is not accurate. normal geomatry works just fine. Have you encoutered this issue and if so, is there a fix for using on cosmos assets?
master layer
tree, grass and curb layer
street layer
composite
I don’t think its a cosmos asset issue vs regular geo. It appears this particular tree you are using has opacity mapped leaves/twigs. In older vray there was 3 opacity modes, I believe you have to set it to either clip or stochastic, in order for the geo to accurately produce the alpha. Here is my quick test with cosmos asset and opacity mapped firs, it creates a correct alpha in object properties.
with that said, I don’t think this is a correct way of compositing layers. The issue is that you will never be able to get a proper layering setup this way if the FG tree is cutout from BG road in the alpha since the pixel pre-multiplication along the edges will always produce halo effect. The correct way to layer this is to render the trees and anything above ground with the BG with primary visibility off, then render the BG with tree primary visibility off.
In a case where you have some objects overlapping each other, best method is to only matte (cutout) one object by another, there by limited number of premultiplication pixels.
Am I understanding this correctly:
using the scene in my first post as an example the best method would be the following:
I render the sky
Then the ground and buildings except for one that over laps with a sphere in the background and turn of primary visibility for the spheres and override the background to black
then render the spheres with with primary visibility off for the buildings and ground and override the background to black
then render the one overlapping building and turn of primary visibitliy for everything else and override the background to black
Does that sound correct?
My goal is to render the buildings once and then render moving spheres as an animation to save render time.
Sky
ground and buildings except for overlap
spheres
overlapping building
composite
Yes technically speaking this is correct, if you don’t have a camera move this would work. However if you have camera moves, where sphere goes in front, then behind buildings and camera moves around with it, then it’s simpler to put all buildings as a holdout for that sphere. In theory only one layer should be acting as a holdout (cutout) to avoid multi pixel premultiplications I mentioned earlier.
However this gets a bit tricky, for example the sphere shadows. If you have a case where you are changing animation, then the sphere shadows would have to be updated. This is where it gets a bit hard, since you need to have shadows produced by the sphere rendered separately to composite over top of your buildings.
Okay, thank you so much. You’ve been very helpful.













