There is no plan for that. We plan to keep energy conservation for regular material. And diffuse is encoded into as few bits as possible for efficiency so it would not allow a large value range.
Toon shader is different in that regard indeed, as of today and might change, considering the diffuse ramp that do not have any clamped color.
alright, it would be REALLY helpful to be able to boost the diffuse lighting on the toon BSDF for certain important objects/characters in stylized games that have a lot of dark areas
@SebHillaire Hello there Since Substrate now uses F0 and F90 for the reflectance, i had to convert my own material function for the Complex IOR (for metals via their IOR n and k values). I was made aware by other commenters on a Youtube tutorial about Substrate, that there is already a “Substrate-IOR-To-F0” node, for those, who want use IOR values.
My question would be, could you also include such a function for the “Complex IOR”, for metals? I attached my material functions code as a text file, if you want take a look at it.
Hello! In our mainline, we added a “Substrate IOR-to-F0 (Conductor)” material function(counter part of the dieletric version “Substrate IOR-to-F0”). The sRGB to linear has been left out, but you can use the sRGBToLinear node if you want to have it. This will be available in 5.8.
@Charles That sounds awesome And i included that sRGB2Linear, because without it, the colors looked way off, way to bright. I first thought, that i needed the other node (Linear2sRGB), but somehow, that formula required the sRGB2Linear to look correct.
Here is a comparsion, left the same materials from the previous post, right its the same, but the sRGB2Linear is inactive. Looks wrong, too bright ^.^ Maybe you just add a note or description, that it might need the sRGB2Linear node to look right in some setups Oh, and we would need 3 sRGB2Linear nodes, since the nodes themselfes are just scalar, not vectors, so one node for each color would be required.
I am also curious to know if there will be AGX tonemapper in future to choose. because it would great to have option to choose different tonemapper that supports post process effects like color lut, vignette, sharpness out of the box.
This way we can use otline on upcomming toon bsdf based material and materail with other bsdf. we can mix toon shaded material and realistic with outline common in all.
and it would be nice to have a outline features like:
outline color
outline opacity
outline thickness
option to set outline inside or outside object shape
Tonemapping: this has nothing to do in this substrate thread. You will have to look at our OCIO pipeline I guess to replace the tonemapper.
Yes, outlines is a feature we would like to eventually provide built in with the toon BSDF. Thanks for the suggestion!
There will be an implementation that will have to scale between our supported platforms. The parameterization you propose does not fit in the legacy GBuffer so that is already out of the range of possibilities for some platforms. Let’s see, this is still TBD - no ETA.
Thanks for pointing out the OCIO.
regarding outline, wouldn’t it be possible to make the outline part of the main node so we can use the outline feature with any shader, not just toon bsdf, just like the AO input, which is part of the main material node?
I looked Into OCIO and it’s for Color space but I want to replace the tonemapper using the option “Replacing Tonemapper“, blenable location in post process material. I am curious if my code is good and especially if I need Gamma Correction at the end. and also if there is better way to make it compatible with post process exposure setting so it scale with it.
And I found a bug:
When I set the Scalar parameter’s UI Control type to Enumeration and assign an Enumeration. it adds an extra option with the name of Enumeration asset along with a post fix “Max“.
Feature Request:
Please make all the post process effect intact with the replace tonemapper feature. right now effects like local exposure, vignette, sharpen and color grading and film control breaks when i set my post process material’s blenable location at “Replacing Tonemapper“. if this is intentional than there should be a blenadable location to replace tonemapper where every post process effect and feature should woork instead of breaking.
Hello developers, I recently tried the “Ray Tracing Quality Switch” node on Substrate slabs, and it gives an interesting warning: “Please reach out to the development team for feedback and if you want support to be added.”
Static Switch can not connect to Front Material at all
Other switches give the same warning as Ray Tracing Quality Switch
Are those features coming soon or on the roadmap? It would be great to use switch nodes for both visual effects and performance. I also hope for a “static switch” that can be toggled in material instance.
Yes some switch work and some do not. The main reason behind that is “can we know the substrate tree statically when we translate the shader”. If the choice is dynamic it cannot work because substrate can only deal with static material topology.
Quality Switch and Static Switch should work if you do not use a dynamic branch (dynamic test at runtime but static selection). I will check if there is an error or something I forgot about the error you mention for StaticSwitch.
Static parameter switches should also work.
RayTracingQualitySwitch for instance cannot work since at translation time we do not what the shader will be used for. It only once it is compiled for your GPU that we will know that and it is too late for any high level work (substrate or any other) at this stage.
Thank you for reporting: I will update the error message to be more specific for the Switch nodes.
Edit: I confirm that the only switch node supported are the following (tested for 5.8)
the other one cannot be supported. I will udpate the message error message. Otherwise you have the select node that can be interesting to select a substrate subtree (parameter blending only) based on a bool. That can be driven dynamically (but only one slab can flow through each selectable path).
Thanks for a detailed explanation! I’m glad to hear that static switch gonna work in 5.8
Here’s another tiny issue about user experience - some substrate nodes have been localized, but we can not search for their original English names.
(Maybe this is not the best channel for UX feedback, but blueprint editor has a good multilingual search function. I’d like to see that in material editor)
It’s really helpful that you clarified that, thank you. In that case, do you have any tips for winning back RT performance while using substrate? I know a lot of automatic simplification is already happening below the hood, but the RT-quality switch replace node made a big difference, and I’m concerned that it won’t be possible to make certain scenes performant/in-memory.
@piggest_pig Thanks for that extra note. This has now been reported.
@jblackwellAll substrate material in raytracing land are fully simplified to a single slab as you noticed. As in: all operators are forced to be parameter blended (not for path tracing). So performance wise it should not be too bad.
For game performance at 60hz:
A single slab is recommended anyway for this case. And input parameters are dealt with before hand (and we want to improve the material attribute workflow to improve dealing with this case).
Operators + parameter blending is heavier as compared to that since we have to do general blending of Slabs. But useless instructions should still be optimised out by the compiler.
Keep in mind that RTQualitySwitch node will work on regular data, just not on SubstrateData purple links. So this is still the same level of control as before, but now a single Substrate slab will have to be your output instead of the root node.
Thinking about it further, maybe there is something we can do to have a node where the substrate tree is evaluated for the non RT path normally, while the other path is fully simplified anyway for RT so we will know it will be single slab + features tracking. Such node will however not work for Path Tracing (or we would have to introduce another tier of material simplification with specific substrateTree and processing in bettwen Normal and FullySimplified). Some avenue but TBD.
This leads me to a dumb Q… Functionally what’s the difference between these two (a binary value picks between T/F), and will support for the bottom one be added?
All the 3 nodes on this image are supported and can flow substrate data.
The Switch at the top does not create any shader permutation. It is basically a static if with one of the path removed out by the compiler if the input value is know at compile time.
The bottom switch automatically create a static bool parameter and a shader permutation (so an optimised shader will be compiled for the true and false path, path value is selectable on a material instance or can be set from gameplay).
Top Switch node + StaticBoolParam == bottom StaticSwitchNode as far as I know.
Good day,
Simple issue here I have not noticed before which hopefully has simple answer.
Examples below show the following:
-A non Substrate material which blends colours using fresnel. Exaggerated Normal Texture to show its effect.
-A substrate material with the same inputs but it seems to ignore the PixelNormals and hence the Colours only blend based on geometric Normals.
I must be doing something wrong but cant figure it out. Would love some help. Cheers
UE Version: 5.7.0
Hi, my architecture studio is slowly switching to 5.7.4, and I am testing all the master materials we used in 5.6 to see how they behave in 5.7.4 and if any modifications are needed. Before asking my question, I need to explain the lighting system that we use, we have created a custom plugin to serve our needs for lighting which consists of two sky meshes, the visible one is called the backdrop mesh and the one contributing to the lighting is called the sky mesh. In all situations, we must be able to see the backdrop mesh, cause there are scenarios in which we have to reduce the saturation of the skylight (to achieve the lighting we are looking for) but we don’t want the visible sky to become desaturated. By default, whenever we have a substrate glass material, we see the sky mesh (which is understandable since the sky mesh is affecting the reflections and global illumination) but to bypass this, we used to enable “is thin surface” for the glass material and reduce the IOR to 0. This effectively made the glass invisible keeping only the reflections, and the best part about it was that we were able to see the backdrop hdri instead of the sky mesh through the glass. Meaning that changing the sky saturation did not change the visible sky that we see through the glass. However I noticed in 5.7 this behavior is changed. Regardless of any value I set for the glass material, I cannot see the backdrop mesh, I only see the sky mesh. Beside that, changing the IOR to 0 will somehow make the glass material to emit light. So we made a new master material for the glass to check if we are missing something. We realized if we set the MFP scale to 1, and base color to black, we can prevent the glass material to be white and emitting light, however this does not solve the issue of not seeing the backdrop mesh. So my question is, how can we get the same behavior we had in 5.6? (Short explanation for the attached photos: The picture where the sun is not visible through the cube, we are looking at the skymesh through the glass material which is not the wanted behavior, the second screenshot shows the backdrop mesh which has the sun which we would like to see). One final note: we only use path tracing.