← All ideas
  • Published 20 Dec 2019

(Material / Shader) Access and Ignore World-Settings in Object Shader Editor

This feature is meant to complement Shader-to-RGB node.

As great of a node Shader-to-RGB is, it doesn't give you predictable behaviour over a varied production pipeline, because it isn't just influenced by the lights in the scene but also the World settings. Meaning, if you create (perhaps) a Toon-Shaded material with Shader-to-RGB and Color-Ramp, in might look fine in the default settings, but the moment you change the world-color, strength and even HDRI, everything goes out the window.

This is because stylization in this case is working backwards from PBR, causing unnecessary complexity which ideally shouldn't have to be dealt with. Sure, we could work-around all this by just compositing it later, but this isn't a good option when you're working on a live real-time project.

One of the ways to counter this is by creating node-sockets (perhaps as Input Nodes) in the Object Shader Editor, allowing you to not only access World Settings to apply it manually later, but also allow the shader to completely ignore it in the initial stages (or, alternatively, a creating a shader that ignores the world-settings by default).

Here's what the process would look like:

  1. Assume that World Settings will influence the shadows of the object.
  2. Add a shader, or input-node that informs the shader, to ignore all the World Settings, and create a stylized material that can work predictably across all World-Settings.
  3. Now create a new node that can allow you to access the World-Settings separately (if you view it via Node-Wrangler, you should be able to see how the settings affect your object as if there are no actual light-objects in the scene).
  4. In the latter stages, control HOW the World-Settings affect the shader / object (such as, only the shadows you created and function predictably work as "masks" for the World-Setting color or HDR-lights affecting the object, etc.).

This permits you various degrees of control that you wouldn't otherwise have with just Shader-to-RGB, and can be very useful for Stylized Rendering in real-time.

So please make it possible to access the World-Settings in the Object Shader Editor, that would be super-helpful !

100%

Development Status: Open

Upvote 7 Downvote 0
tushantin
20 Dec 2019

4 Comments

3dcinetv

I will try this challenge of yours. I am sure it can be done. Cycles only though with path trace only. But I was trying so hard with eevee, that the only way I've found - so far, it's doing this by separated passes. I too hit a brick wall this weekend when trying to find a global parameter for self shadow in Eevee. And there´s currently no way to drive a shadow except by post.

1
tushantin Author

* @3dcinetv * Do let me go how it goes!

1
Lauloque

Why not a "is World ray" in the Lightpath node (and support for eevee)?
Or even better, a World Lighpath that seperates diffuse, indirect, .... but for the world only?

tushantin Author

* @-L0Lock- * That's actually a good point... Though we would also need a way to completely de-link / switch-off the World settings directly from the shaders we use so that we can add it later even with "is World ray".