I followed this video, which helped me a lot setting up my own materials in the node editor. I am eagerly awaiting further videos on Pbr node materials.
What I can´t figure out is, how to create Emissive Materials as node materials. In the PBR Material node, there is no Emissive input. I also can´t find any extra node for emissive. The ready-made pbr Material has an emissive texture slot and a multiply value, that´s why I am wondering.
The emissive strength of this pbr material unfortunately has no effect on the post process glow in the Editor. Is this somehow possible in the windows editor, or only via code?
And is it possible to create a shadow catcher material with the node editor?
We didn’t add the emissive input to the PBR block material because it is already a fat block and because emissive is really easy to add by hand: just add a Add block to compose the lighting output with your emissive color.
The glow layer default working mode expects a emissiveTexture property to exist. For node materials it doesn’t, so you must take extra steps. There’s another great video by @PatrickRyan about this:
And is it possible to create a shadow catcher material with the node editor?
Node materials can already be used to receive shadows, if it’s what you mean?
Thanks for the help. I was able to build my own emissive material and solve the shadow problem.
With shadow catcher I meant a shader which renders only the shadow cast on it into alpha and cuts out everything else.
The problem is /was: I have an photomapped environment. It has Lighting “baked” into it in the photo textures and I don´t want it to get the environment lighting from my scene, so it hast to be emissive/unlit. But I have a car which should cast shadows from a directional light (sun) on it. It was hard to get the look I wanted the environment to have (to fit my .env file) and still having the shadow of the sun visible. But I was able to build a shader in nodes which works good enough, so I don´t need a shadow catcher.
As for the glow: I tried to build a node shader exactly like in the video for my car headlights, but it doesn´t affect the glow. It is just white. What am I missing?
@DIO, I agree with @Evgeni_Popov that we will likely need to see a PG to determine what is going on with your material and scene. And the second part of the video you linked above will be going out tomorrow. Out of pure coincidence, I added an unlit shadow catcher like you had described above in the project, so it may have a technique that you might like.
In terms of emission on PBR, I have another demo that does this technique that will come in a video series after the current one. In the mean time, you can dig into the project and look at the shader to see how I added emission to the PBR node material. It is done for the UI that is projected on the device in this sample product page demo. The code for the project is not in a playground since we needed to set up a complete html solution, but it is all available on github for you to download and run locally. Looking into the screen node material will have the specific parts you are looking for in how to combine an emissive contribution with the PBR node.
You can see that I used the UI texture that I passed into the shader to block out the diffuseDir and diffuseInd contributions so I could add in the emissive texture and not alter the colors that I had specified in the UI texture:
You will want to use the individual channel contributions to add in your emissive color, but remember that these outputs are linear outputs so you will need to convert your emissive color to linear to combine, then convert the product of those operations back to gamma space to pass to the FragmentOut. Hope this helps!
@PatrickRyan thank you for the tips. It helps a lot setting up my emissive environment material. Looking forward to the second part of the video with the shadow catcher material
My remaining problems are that the node materials don´t find their textures after building the scene in the editor (@julien-moreau is aware of the problem) and the shadow of the directional light, which looks fine in editor but looks jagged and works only on part of the shadow casting meshes in the build scene.
But the main thing are the problems with the opactiy masks of my environment meshes. There are sorting errors everywhere. Between different meshes and on one and the same mesh using an opacity mask. It seems I don´t really have control over that in the editor so far.
@sebavan thank you. Unfortunately it won´t be public. I am checking out how far I can get the graphical fidelity and what is currently possible.
@DIO I totally agree that your scene looks amazing (sad that it’ll not be public, would do an awesome example of “Made with the Editor” ahah). I’m fixing just an issue on morph targets in the Editor and it’ll be deployed ASAP. The next version will embed the fix for the node material serialized textures we recently encountered.