Hi guys, I'm struggling a bit with the examples in the docs. I have a node 
where I'm processing for RGB but in order to do so I need the depth of each 
sample.

The pertinent parts of my code look like this:

   virtual void in_channels(int, ChannelSet& channels)
   {
      if (channels & Mask_RGB)
      {
         channels += Mask_RGB;
         channels += Chan_Z;
      }
   }

   virtual void processSample(/* args... */) const
   {
      RGB attenuation, inscattering;
      bool processed = false;
      foreach(z, channels)
      {
         if ((z == Chan_Red || z == Chan_Green || z == Chan_Blue) && 
channels.contains(Chan_Z))
         {
            // do stuff...
         }
         else
         {
            output.push_back(deep_pixel.getUnorderedSample(sample_no, z));
         }
      }
   }

My trouble is the channels I'm given never seem to contain the Z channel. 
Trying to access it anyway causes an abort (obviously). How do I tell Nuke that 
I absolutely need depth along with the r, g, b channels?

Cheers,

Anders

Anders Langlands
VFX Supervisor
MPC Film
C: +1 514 882 6247
London - Vancouver - Los Angeles - Bangalore  - Montréal
moving-picture.com/film<http://moving-picture.com/film>
_______________________________________________
Nuke-dev mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-dev

Reply via email to