RawGlobalIllumination * DiffuseFilter do not match GI elements.

VRayMax 2.30.01 is used.

This scene, SSS2 material apply to teapot.

VRayGlobalIllumination elements and (VRayRawGlobalIllumination * DiffuseFilter) do not match.
fringe seen to the surroundings of teapot.

Of course, it is composite at 32 bits. (Nuke and Pdplayer checked)

Where is a cause?

It’s a problem with the mathematics of compositing and how the raw passes are made. Other people have had more luck by taking the global illumination pass and dividing it by the diffuse filter to make their own Raw GI pass which has no edge issues.

So it isn’t just me then, I would love a solution to this problem but it looks like I will just have to continue manually cloning out the edges, not ideal by any means but it seems that people have been looking for a solution to this for years and nothing has developed

Do the above and you’ll get correct edges. I think Vlado’s working on it at the minute but in the interim it seems most people either use the above as in this discussion ( http://www.chaosgroup.com/forums/vbulletin/showthread.php?67327-Comping-render-elements-to-exactly-match-vray-beauty-without-fringing ) or alternatively don’t bother with the raw passes. I asked a few other artists who’d tend to use a lot of nuke on their renders and the majority of them seem to get by with the standard GI, light, ref and spec passes and keep working on the 3d render for longer rather than trying to make big changes that’d need the raw passes. Their though is to keep nuke for the things that only nuke can do and let the 3d be as close as possible in the render rather than trying to fix it after.

Thanks for the response Jo but changes to product colour are vital to our company’s workflow and we cant be rendering out 30+ seperate images when only a tweak to the diffuse is necessary. Whether we comp with the raw passes straight from vray or extract them from the vraylight and vraygi there is still very obvious fringing. It’s the diffuse which is vital for us but we cant be adjusting lighting and gi at the same time otherwise we might as well be using the beauty pass and not compositing at all :frowning:

I’ve posted in every thread I can found relating to this problem and there is no solution, I keep reading that people have had success (no fringing) when extracting raws from the light and gi but this just gives a different kind of fringing, hardly a solution

I totally understand that, and you’re right that using the rawlighting that comes from the vray frame buffer is unusable. In the thread above though, if you divide the normal global illumination pass by the diffuse filter pass you’ll take away the diffuse colour contribution and be left with only what the light values of the GI added which is the same as the RawGI pass, except this time it won’t have the edge issue. Admittedly you have to make your own RawGI and Raw ref passes using this method, so if you’ve got to do some kind of configurator you’ll still be able to do your RawGI x colour corrected Diffuse filter pass. The lovely folks of Aardman in the thread linked above have a diagram of how it all works!

Sorry Jo maybe I didnt make my reply very clear, I am doing exactly what Aardman are doing, but it simply doesn’t work, I am dividing the GI by the diffuse which gives me the RawGI, but there is still fringing

Here is the difference…

Fringing when extracting the raw’s as Aardman are doing

Notice the clear fringe

Thanks for the speedy response by the way, much appreciated :wink:

ps - there are no alpha’s anywhere which might need unpremultiplying/premultiplying


Hmm - I’m grasping at straws here but I think I read in a thread earlier that if you use SSS2 materials, they also get included in the GI pass as well as the sss2 pass, so you might be getting a contribution from the SSS2 in your GI that isn’t being taken into account in your Diffuse filter pass - if you try the same thing with a normal vray material do you get the same issue?

Just had a quick look at the scene you’ve uploaded - is that the one you’re testing with at the minute?

No SSS2 mats being used, all vray standard mats, linear workflow, full float, no AA (have tried AA as well (all filters)), Universal Settings (Have also tried IM/LC), unclamped (tried clamping too) and no sub-pixel mapping (you guessed it - I’ve tried checking it too)

I felt so close to removing the fringing, this is the last remaining spanner in our machine, everything else we do workflow wise feels pretty bullet proof, but the compositing just lets it down. We end up painting out edge after edge after edge and one of our projects at the minute is likely to result in around 500 images being produced, all of which will need paintovers once they are comped

Headscratcher? Headbanger!

Thank you though Jo you are the first to try and help

Bugger, I’m a bit stumped by this - I’ll have to sit down and look at your scene later but it sounds like you’ve exhausted most options - I’m not sure if vray for Maya has included any different maths about how the raw passes are derived :confused:

Just had a quick look at the scene you’ve uploaded - is that the one you’re testing with at the minute? This one doesn’t have a gamma workflow in place and there’s an vray fast sss 2 material on the teapot? I’ll have a fiddle hopefully tomorrow with the dividing and see what results I get over here.

Thanks Jo, hopefully Vlado can shed some light as to whether the maths behind raw passes has been or will be tweaked or if there is a solution which doesn’t involve maths

In the meantime - we have edges to paint out :frowning:

sorry. I had overlooked the following posts.
http://www.chaosgroup.com/forums/vbulletin/showthread.php?50626-Render-elements&p=434183#post434183

Without using rawGlobalIllumination, a theory uses ( globalIllumination/diffuseFilter) .

It solved.
Thank you!

Here some tips, I am not sure if 100 percent correct but take a look,

Things to keep in mind:
-use linear color mapping
-avoid multiply
-do not clamp render elements
-export in full float 32 bit
-in Nuke, use scanline based exr files instead of bucket based exr’s, vray renders exr’s as bucket format
(you can convert bucket to scanline with nuke output node, or render vrimg and convertr vrimg to scanline exr with vrayimg2exr tool)

Here are two ways to comp your passes, the simpler way with a beauty pass, and a more complex way with you direct and indirect lighting pass.

math beauty:
bck
overlay beauty
+ ( (rfl flt x (rfl / rfl filter) )
+ ( (rfr flt x (rfr / rfr filter) )
+ spc

math full:
bck
overlay ( (clr x (prm lght / clr) ) + (clr x scnd lght / clr) )
+ ( (rfl flt x (rfl / rfl filter) )
+ ( (rfr flt x (rfr / rfr filter) )
+ spc

That’s not my scene Jo sorry, the teapot scene belongs to FLAT (thread starter)

Here is my scene if you fancy having a play, I’m still to find any convincing argument that the fringing can be solved

http://www.anthony-fraine.com/wp-content/uploads/2012/02/Fringe\_Testing\_Scene.zip

Quick and cheery update, the ‘aardman method’ as I am now calling it does work as people have been suggesting. The test scene I was using just happened to be an exception (if anybody wants specifics then I’ll be more than happy to divulge)

Since moving on from the test scene and going over some old projects which had mega fringing issues, I have had a 100% success rate (the fringing is dead)

Just to confirm for anyone who hasn’t been reading this thread or the countless others on this subject, the workflow for comping elements to fully match the rgb render (to the pixel) is:

VrayLighting/DiffuseFilter = Proper RawLight
VrayGI/DiffuseFilter = Proper Raw GI

Proper Raw GI + Proper Raw Lighting
*
diffuseFilter
+
Reflection
+
Refraction
+
specular
+
any other elements
=
beautifully adjustable comp which matches the RGB!

Was it a shader specific issue or a gamma / colour mapping issue? Was thinking with the likes of the hand made raw light passes that dividing by diffuse filter and multiplying by the same diffuse filter should cancel the two out (save for tiny rounding errors) - however would making large colour corrections cause any kind of edge issues?

Good to hear you’re sorted!

Can anyone recommend any books or sites about this? I understand “the formula” but I wish I knew more about whats going on underneath to come up with this end result.

There’s a few principles that you need to understand and then you’re fine.

Rule 1: Any pass that’s driven by light is added.

So for example the vray lighting, Global illumination, specular, self illumination, SSS and reflection passes. For example if you had two lights with a multiplier of 1 in a scene pointed at the same object, the object would get 1 from each light for a sum of 2.

If you wanted to do a really simple vray multipass comp you could get away with the following:

Global illumination (indirect light)
Lighting (direct light)
Specular
Reflection
Refraction

And then add all of those on top of each other. Want less bounce light? Fine, either colour correct the GI pass darker (so it adds less) or drop down it’s opacity. Same with any of the other elements.

This is maybe a bit blunt however. Say for example you want to change the colour of the GI light that was hitting your scene without also affecting all of your material colours, or say for example you’re doing some kind of car configurator where you’d like to be able to change the colour of a car without affecting it’s lighting, then the raw passes start to come in. What happens with the raw passes is they separate the two parts that make up the final pass - in the case of the lighting pass for example, it’s the colour of the objects being lit, and then the amount of light that actually hits them.

In the help docs they’ve examples of each so if we take the lighting pass - Chaos: Industry-leading design and visualization software you’ve got two parts making this. One is the colours of the objects, two is the amount of light hitting each object. If we break the two apart, you get the flat or diffuse colours of the objects - Chaos: Industry-leading design and visualization software and then the amount of light hitting each object - Chaos: Industry-leading design and visualization software - If you were to multiply one by the other, they add up to the regular lighting pass. Big deal says you, but what’s nice about this is it allows you to get that totally flat colour pass, and then change it’s diffuse colour to any other value but still keep your lighting intact. Very handy if you have to do 20 colour variations of the same product.

What’s also very powerful is the raw reflection pass - unfortunately spot 3d doesn’t have an example pic of this. In your normal reflection element, you get the final reflections on each object in your scene, but say for example the reflections are very weak or even non existent in certain areas of an object, you’ll end up getting black in that section of the element. If you try to add more reflection by brightening the reflection element you’ll end up with gaps where there was nothing to work with. With the raw reflection element, you’ll get a 100% reflection for every object in your scene that had any kind of reflection amount in it’s material, almost as if you’d put a mirror material on it. You then also have a second pass called reflection filter, and the reflection filter is a bit like a photoshop layer mask which will dial down the chrome pass to the final amount in your main render. The nice thing about this is that you’ve got tonnes of reflection information to work with now, and you can colour correct the reflection filter pass to control how your reflection falls off over the surface of an object - it’s a bit like having a fresnel option in your compositor to get things just right.

For compositing when you’re putting an object into a scene this comes in really handy since you might not get the colour of all the light sources exactly right in your main render, so you can tweak your raw passes for a better match quickly after!

Hi Jo, I’ll post a thorough explanation when I get chance, bit busy at work at the minute

It wasn’t down to any render settings, gamma issues or compositing methods, basically there was an area behind the sphere in my scene which didn’t have any bounced light and no direct light, though it seemed to have some pixel information which was not contained in any of the elements, except for the diffuse. When extracting the Raw passes (clean versions) using the divide method, neither my VrayGI or VrayLight elements could account for this extra bit of information which only the diffuse contained, this left an ‘edge’ which was very easy to mistake for the typical Halo when compositing with straight raw passes (from the frame buffer).

The testing scene was very basic, clearly too basic as none of our images in-studio ever have an area lacking in both GI and Direct Light, as soon as I began testing with an actual lit scene, I knew the extracted raw pass approach was spot-on, nuke tells me that the composite and the rgb are an exact match down to the pixel - which is awesome!

Hope that helps somebody

I’ll post some images which should clarify my point when I get chance

Cheers

Ah I getcha. What I find happening in a lot of passes is that if I’ve got an area of very low sampling (say for example a spec pass where the spec is really really weak on a certain object) I’ve seen some dodgy pixel values - it’s like vray early termination has kicked in and you get left with some bonkers colours or values, and often at the edges of objects where for example fresnel reflections are really strong and so there’s very little sampling done on the Lighting or GI pass. There might have been something that vray was gaining up when making the diffuse pass? Was it the diffuse filter pass that had the oddities in it?