GPUOpen-LibrariesAndSDKs / RadeonProRenderBlenderAddon

This hardware-agnostic rendering plug-in for Blender uses accurate ray-tracing technology to produce images and animations of your scenes, and provides real-time interactive rendering and continuous adjustment of effects.
https://gpuopen.com/radeon-prorender-suite/
Apache License 2.0
485 stars 57 forks source link

RPRBLND-2222: Add all Toon Shader inputs #581

Closed VascoPi closed 1 year ago

VascoPi commented 1 year ago

PURPOSE

Add all Toon Shader inputs.

EFFECT OF CHANGE

RPR Toon node UI. image

Added features: Mid Color as Albedo - shows the mid color on albedo AOV instead of base color. 5 Colors - allows set additional 2 colors Shadow Color 2, Highlight Color 2. Light - light link setting: we can choose 1 light from the scene to lit its material. Transparency - make it transparent by blending toon and transparent material.

TECHNICAL STEPS

Added support for input type MaterialNodeSetInputLightDataByKey. Adjusted light.sync, now it returns rpr_light. It returns already existing rpr_light or newly created. Added new features to RPRShaderNodeToon.

VascoPi commented 1 year ago

1, 2, 3, 4 Done image

  1. Changed UI label to "Linked Light" and added a description. According to the feature description from core team: "Toon light link setting: we can choose 1 light from the scene to lit its material. (RPR_MATERIAL_INPUT_LIGHT on RPR_MATERIAL_NODE_TOON_CLOSURE) now we can't set emissive object to it but only light object"

  2. The five colors are a representation of the color ramp (discussed with RPR Maya team) image

bsavery commented 1 year ago

So the input to this "ramp" is the light level?

I'm a bit confused because I don't see the "shadow level" or "highlight level 2" inputs.

Here's my thoughts.

  1. Shadow color 2 -> Rename to "Shadow Color"
  2. Shadow Color -> "Mid Shadow Color"
  3. Highlight Color -> Rename to "Mid Highlight Color"
  4. Highlight Color 2 -> Rename to "Highlight Color"

Just in the UI.

Then reorder the inputs to correspond to the order:

  1. Shadow Color
  2. Mid shadow level
  3. Mid Shadow Color
  4. Mid Level
  5. Mid Color etc
VascoPi commented 1 year ago

image

Shadow Color 2 -> Shadow Color Shadow color -> Mid Shadow Color Highlight Color 2 -> Highlight Color Highlight Color -> Mid Highlight Color

Added new sockets: Highlight Level -> MATERIAL_INPUT_POSITION_HIGHLIGHT Highlight Level Mix -> MATERIAL_INPUT_RANGE_HIGHLIGHT Mid Shadow Level -> MATERIAL_INPUT_POSITION_SHADOW Mid Shadow Level Mix -> MATERIAL_INPUT_RANGE_SHADOW