Home Unity

Unity Scene : Trying to improve my lighting/rendering skills

polycounter lvl 18
Offline / Send Message
capone polycounter lvl 18
I'm trying to imitate this concept as a way to help get better at lighting in Unity.

upload_2017-12-26_12-11-44png

Very early days but here is a blockout with no textures. I have a reflection probe at the front. My neon is made in substance and has area lights to help push it's neon onto the baked textures.

As a test, my substance floor (just grey for now) is set to standard>roughness setup. No roughness, no metallic. So as expected it's mirroring the neon etc as desired but without the same intensity as the concept. I've noticed that if I pull metallic from no metallic (black) to have some amount of metallic it starts to look correct BUT that goes against the rules, unless unknown to me that water=metallic when it comes to substance/unity?

Anyway, first things first. I want to nail that ground first but just want to understand how to deal with water puddles. 

upload_2017-12-26_12-11-33png

Replies

  • capone
    Options
    Offline / Send Message
    capone polycounter lvl 18
    Update, starting to blockout the asphalt. I think there is a distortion of reality going on in the original concept, am realizing I'll need to create extra lights to get the reflections appearing where I want them to. 

    I might need to do some kind of vertex material blending to get rid of that tiling. Texture is already at 2K.


  • WiktorWasowski
    Options
    Offline / Send Message
    WiktorWasowski polycounter lvl 3
    First of all, to address your first doubt - water can't be metallic.
    There are two reasons the reflections are so strong in the concept (aside from artistic choices). First, the camera is lower than on your renders, so the fresnel effect is stronger. Second, the neons are simply more emissive. Of course it's just a concept and you should take it with a grain of salt.
    Also, your current ground texture has too big differences in roughness. It rained so even areas not covered by puddles should be wet = very shiny.
    Another thing to point out is that the concept's "camera" has a pretty low field of view. Adjust yours - it also has an effect on how reflections appear.
    Finally, try using Screen Space Reflections - it should work very well with your scene. You can find it in the official post processing stack here.

    EDIT: Although water is not metallic, there is some special physics magic going on wet surfaces, so you most likely won't achieve perfectly realistic results with default shaders. That doesn't mean you can't get really close though.
  • capone
    Options
    Offline / Send Message
    capone polycounter lvl 18
    Thanks for the feedback.

    For now I'm ignoring the puddles and just trying to get a good general roughness to make the concrete look 'wet' without any collected water.  I adjusted the camera to more closely imitate the original reference. 



    Above is without extra point light. Had to make the surface really low roughness (0.2) to get that neon to show at all. Yet stick a realtime light in there and it's suddenly super reflective (for the real time light)



    If I make it baked light it obviously gets more blurred out, which is what is happening with my emissive. I have to go with baked lights, but can't quite figure out what to do next. 



    Because if I take roughness down more the normal map starts to get really noisy.



    My current roughness





    I don't know how my neon could be any more intense. So I'll leave that for now, I could try a thinner 'hot' (white) line.


  • WiktorWasowski
    Options
    Offline / Send Message
    WiktorWasowski polycounter lvl 3
    Why aren't you using the Standard Shader? You should use it for all environmental elements on your scene (including the neon) or create your own shader that is also PBR. Standard Shader is physically correct and also has an emission value that you can use with bloom image effect or GI baking.

    I made a very quick and rough test to show you that what you aim for is definitely possible. Those reflections come from Screen Space Reflections. One warning though. Sharp SSR generally doesn't work well with Temporal Anti-Aliasing found in the Post Processing Stack (causes crazy flickering), so you will have to use a different AA method, like Fast Approximate AA also present in the Stack. You can't use hardware Multisampling, because Screen Space Reflections require the usage of Deferred Rendering Path (which in turn doesn't support MSAA).


  • capone
    Options
    Offline / Send Message
    capone polycounter lvl 18
    Thanks for the support.

    Have added the post effects package you linked to as well as make all materials standard shader now. This means I have to put my roughness into the alpha of the metal texture, there used to be a plugin button within Substance Designer that did this for you but it seems to be gone from the latest versions so I've done it manually. When I click on the alpha channel of the metallic texture in unity I see the roughness so I think it's setup correctly but it's clearly wrong in viewport/camera. Need to investigate that more, am trying to reach out to Unity to see where that button went. Perhaps it was doing more than just the metal alpha procedure. 

    So for the post effects I have screen space reflections turned on but it makes no difference at all, probably down to my substance concrete texture not working properly. I enabled bloom and that really helped push the neon, I also pushed the neon emissive from 1 to 1.5 in the material.

    Whilst I figure out the texture issue, would be curious how you got those soft 'pools' of light within the neon? With mine it's very uniform. Also your skybox seems to have more depth. Mine is just handmade in photoshop with a 6 sided cube. I'm guessing you use a tool/script within unity to make your own with gradients and apply as a cylindrical map?

  • WiktorWasowski
    Options
    Offline / Send Message
    WiktorWasowski polycounter lvl 3
    It's quite funny how you said that my skybox and neon look better, since I just left the default Unity skybox and my neons are just cylinders with a uniform emissive material (no texture). ;)

    For the skybox I just lowered the sun so it's just after sunset and I set its intensity to 0 so it doesn't shine on the normal bumps of the ground texture from below.

    As for the neons, their irregular bloom was probably a glitch caused by the fact that my post processing stack was outdated. I downloaded the newest version (2.0 beta) and the problem is gone.

    Regarding your roughness problems - just use a .sbsar instead of precomputed textures. My ground texture was also made in Substance Designer (it's one of placeholders I made for my game project) and it works just fine. You don't have to bother making Unity-specific outputs when using a .sbsar. Just create regular metallic and roughness outputs - don't manually plug roughness to alpha.


    Anyways.. I got hooked in and started to play with this scene more. It's quite fun! By the way - the skybox is no longer the default one. I created a skybox material in unity and played with its options to get something I like. I also added fog, which is obviously very important here. For the foliage I just used Broadleaf from Unity Standard Assets (Assets -> Import Assets -> Environment). Everything else is just primitives.


  • capone
    Options
    Offline / Send Message
    capone polycounter lvl 18
    Wow you're absolutely nailing what I'm going for, very inspiring. I'm still struggling with a few core technical issues.

    1. You suggest I just use the sbsar without any conversions but the standard shader doesn't have a roughness slot? That's why I was using the 'standard - roughness setup' from before. I think we've crossed wires here and you thought I was previously using some fancy shader and mentioned you just use the standard shader. You probably meant the 'standard - roughness setup' shader rather than the bare basic 'standard shader'?

    2. You say you lowered the sun to just after sunset. Do you mean the direction/rotation of the directional light? or is there some kind of skybox setting where you alter the placement of the sun? If the former, is my direction below considered 'after sunset'? Are you using the 6 sided type of skybox? 




  • WiktorWasowski
    Options
    Offline / Send Message
    WiktorWasowski polycounter lvl 3
    2. Procedural skyboxes in Unity (for example that default one that is active in the startup scene) are affected by directional light's (sun's) rotation. You can change the time of day by manipulating it. You can plug one to that skybox in the lighting tab (Sun Source field), though if you don't, it just takes one of your directional lights automatically and ties it to your procedural skybox.
    You can also make your own skybox in Unity that has different atmosphere / sun parameters than the default one. That's what I did to get a more "Mars like" atmosphere. Just create a material with Skybox/Procedural shader and play with its settings.

    1. The outputs I have in my graph are just regular Metallic workflow outputs (I also have AO and Height, but I don't really need them in this scene):



    In Unity I just use the default shader that Unity generates for .sbsar files I didn't change anything except procedural properties of the texture:



  • WiktorWasowski
    Options
    Offline / Send Message
    WiktorWasowski polycounter lvl 3
    Oh and one other important thing - change your project's color space to Linear if you haven't yet. Gamma sucks and kills realism.
    Edit -> Project Settings -> Player


    PS.
    Made a couple more tweaks. That reference is really cool. I didn't expect to end up making this scene as well. Just wanted to help and got hooked in by accident. :wink:
    Keep asking questions if you have more doubts.



  • capone
    Options
    Offline / Send Message
    capone polycounter lvl 18
    Thanks. Getting to a place where I can start focusing on really starting this. Great call on the GAMMA setting! I had switched it to linear on older projects and had forgotten to switch it on for this project!

    1. Substance Designer IS automatically setting up, i.e roughness in the alpha of the metallic but I've noticed the roughness looks different compared to how it looks in substance. Curious if it's different for you?

    Substance



    Unity (alpha of metallic)



    2. Something you mentioned earlier, "For the skybox I just lowered the sun so it's just after sunset and I set its intensity to 0 so it doesn't shine on the normal bumps of the ground texture from below." ;

    Do you mean you set the intensity of the sun/directional light to 0 intensity? or the skybox? (Intensity Multipler)

    WIP 

  • WiktorWasowski
    Options
    Offline / Send Message
    WiktorWasowski polycounter lvl 3
    I meant the sun light's intensity. That's because when you rotate it to be below the horizon (so you can get the correct time of day reflected on the skybox) it still casts light from below.

    As for your roughness map.. Looks a bit weird. Those values don't even have much to do with values you see in Designer. I mean, it's not even an inversion. Are you sure you have correct outputs setup in Designer?

    Go to your scene view in Unity and set it to debug specularity:


    Your ground should have a uniform dark grey value. If it doesn't, you probably have your metalic output messed up in some way.

    PS. You should also debug Smoothness. Maybe this will give you a clue on what's wrong with your material. Also, have you tried adding another material instance in your .sbsar in Unity so it creates a new one with purely default settings?
  • capone
    Options
    Offline / Send Message
    capone polycounter lvl 18
    Aha, you were right it was my setup. There was a parameter that I exposed a while ago in my roughness and had adjusted in Unity. Moral of the story, if a substance isn't coming out as expected in Unity, add 'Check for exposed parameters' to the troubleshooting.

    Anyway, the material is finally 'working' as I more or less expect. I need to further tweak it obviously  with more pronounced pools, cracks etc. Are you really getting those results with 256x256 maps? Mine are currently 2048x2048, might also look into reducing noise. Guess I need to decide if to go for detailed photo real or a more flat stylistic approach. This project was always about lighting/rendering so I'm thinking more towards flat/stylistic in which case I may as well reduce my textures. Where I work we've recently been exploring low res stylistic substances so it makes sense for me to practice with this type of look.


  • WiktorWasowski
    Options
    Offline / Send Message
    WiktorWasowski polycounter lvl 3
    As you can see on my screenshot, I used 1024x1024 resolution in Unity. It's showing 256x256 in Designer because I have the material's outputs resolution set to relative to parent, meaning I can change resolution inside Unity.
  • capone
    Options
    Offline / Send Message
    capone polycounter lvl 18
    I'm needing to do something with lighting I think before getting even remotely close to what you have, I want to understand what the post effects screen space thing is doing. However, for some reason I deleted main camera and made a new one and now I can't get that post effects menu like before. I've gone through the documents of how to set it up but it just isn't showing under effects or in the search when add component







    This is what I'm trying to follow;

    https://docs.unity3d.com/Manual/PostProcessing-Stack-SetUp.html




  • Prot
    Options
    Offline / Send Message
    Prot polycounter lvl 6
    Hi,

    It's strange. Restart unity if you didn't or try to download again the post processing stack from the asset store.
  • capone
    Options
    Offline / Send Message
    capone polycounter lvl 18
    Yeah tried restarting/deleting/reimporting multiple times. Something is screwed up so am currently trying to get support from Unity forums. The only error I have is 

    "Assets/Editor/CrossPlatformInput/CrossPlatformInputInitialize.cs(88,34): error CS0619: `UnityEditor.BuildTargetGroup.WebPlayer' is obsolete: `WebPlayer was removed in 5.4, consider using WebGL'"

    Not sure if that could be related or not. On a side note I noticed in the document it says "Using the deferred rendering path is also recommended (as required for some effects, such as Screen Space Reflection)."

    When I finally get this working should I switch to deferred? I noticed mine was set to something else. Perhaps that was why it wasn't working before (when the post processing stack actually worked).
  • Prot
    Options
    Offline / Send Message
    Prot polycounter lvl 6
    It appear in the menu with the script " PostProcessingFactory " at line 10 " [MenuItem("Assets/Create/Post-Processing Profile", priority = 201)] ". You can check if you have this.
    It's a warning saying webplayer is deprecated. PostProcessing doesn't use this.

    On camera you should have " Use Graphics Settings " which is forward rendering by default. ( in Edit => Project Settings => Graphics, in tier settings you can see it's Forward). You can switch directly on camera too.
    They are many differences between the two paths, some few informations in unity doc.
  • WiktorWasowski
    Options
    Offline / Send Message
    WiktorWasowski polycounter lvl 3
    Yes, you need Deferred rendering path for Screen Space Reflections to work at all and for Ambient Occlusion to have more realistic results.
  • capone
    Options
    Offline / Send Message
    capone polycounter lvl 18
    Been working on other substances a while but had some time today to readdress the floor of this scene today. Obviously still not finished, tried to make it more photoreal. Probably shooting myself in the foot here.



  • capone
    Options
    Offline / Send Message
    capone polycounter lvl 18

    Been working on other substances a while but had some time today to readdress the floor of this scene today. Obviously still not finished, tried to make it more photoreal. Probably shooting myself in the foot here.

    @WiktorWasowski examples.I don't think it's down to textures/materials necessarily but more how there is less light hitting the floor and more clever things going on with lighting/post effects I'm not considering. 




Sign In or Register to comment.