I have three texture mapped objects in a scene. The rendering of each needs to effect just one color channel of the final image. I’m currently able to accomplish this by assigning each to a separate render layer and combining them the compositor. Is it possible to achieve this with just shader logic?

The hope is to produce a reasonable looking image in the 3D view.

The objects are currently using Emissive Transparent materials to give “Shadeless” behavior.

An example blender file is available at: https://github.com/BrianSwift/JunoCam/blob/master/Juno3D/P00_102c.blend

Additional solutions that work in BI or EEVEE would are also appreciated, but Cycles is needed because BI doesn’t have the equirectangular (panoramic) camera model.

  • $\begingroup$ maybe related? blender.stackexchange.com/questions/39508/… $\endgroup$ – user1853 Feb 5 '19 at 1:50
  • $\begingroup$ FWIW, in Apple's SceneKit I get the desired effect by setting each materials colorBufferWriteMask property which is basically exposing the functionality of OpenGL's glColorMask() render state setting function. Searching Blender's source code shows the few calls to glColorMask() all have constant parameters, so there is no method for the users to specify the mask. $\endgroup$ – Brian Swift Feb 14 '19 at 8:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.