Announcement

Collapse
No announcement yet.

SDK: Accessing other render elements..?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • SDK: Accessing other render elements..?

    Hi,

    is there any way to modify the result of other render elements while rendering?

    We want to do some color corrections for the render elements at rendertime (for preview things)... for example some color corrections at the reflectionLayer.

    Right now I am doing this by just accessing and modifying the other elements from within my own renderElements' applyLookupCurve-method.

    Code:
    void ColorLookupRenderElement::applyLookupCurve(VUtils::Color inColor, VUtils::Color &outColor, VR::VRFragment *frag, VR::ColorMapper *colorMapper, VUtils::FragmentBlendMode blendMode, double x, double y, BOOL gammaCorrection)
    {
      [...]
      outColors[i] = (VUtils::Color*)frag->getChannelDataPtrByAlias(aliasList[i]); //Alias list is the list of renderElements
      [...]
    }
    It's working, but.. the results are somehow strange... it seems as if the colors are modifyied by Vray after I change them.

    If I set the color of the Lighting-element to 1.0/1.0/1.0 (white), the result element has a color of something about 1.6/1.2/1.6.... why?

    Aya~

  • #2
    You can modify the final colors in the storeSample() method of your own render elements, but it might not be a very good idea to modify other elements directly (or at least you have to make sure that your element is the last one, so that its storeSample() method is called after all the others). If you you wish to do color corrections, it might be a better idea to implement a custom V-Ray color mapper, but it depends on what you want to do, of course.

    Best regards,
    Vlado
    I only act like I know everything, Rogers.

    Comment

    Working...
    X