Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Bright exterior and completely dark interior

Discussion in 'High Definition Render Pipeline' started by djorgri, Apr 21, 2021.

  1. djorgri

    djorgri

    Joined:
    Jan 3, 2011
    Posts:
    17
    Hello,

    I am discovering HDRP since a few weeks and i am stuck at trying to combine a very bright exterior with a very dark interior.
    With what i saw on forums and video tutorials i manage to get something close to what i aim at,
    but not exactly.

    I have a global volume with hdri sky and visual environment set for the outside world,
    it perfectly fits my needs for the slightly blue color, luminance and not very dark shadows:

    clear sky.png

    I have a local volume for an inside structure, which must be completely dark;
    I don't see any other solution than overriding the visual environment,
    but by doing so, it also affects the outside.
    I tried to only override exposure, blending, different hdri skies and a lot of other settings ( i don't remember all my tries sorry...), but it never works as i expect to.
    I am also using a reflection probe to simulate outside light blending, in addition to the naturally working directional light coming in:

    interior.png

    We can see darken outside,
    and this is the same problem from the outside, the inside structure is not dark as long as i am not in the local volume:

    exterior.png

    Have i missed a concept or a good practice?
    I am sorry if this has been correctly explained elsewhere.

    Thank you for your time and sorry if my english may be inaccurate!
    Jordy
     
  2. altepTest

    altepTest

    Joined:
    Jul 5, 2012
    Posts:
    1,052
    first you have a blend distance of 10 meters in the local volume, which will gradually darken the image while you approaching the volume from any sides. maybe this is not what you want.

    second I think, but not sure, is that the volumes affects how the scene looks depending on which one you are in or near in a certain moment.

    so if you have a volume that adds a pink overlay to the entire screen then the "outside" will be pink.

    so in your case the outside is dark because of the volume you are in.

    maybe this can help

     
  3. djorgri

    djorgri

    Joined:
    Jan 3, 2011
    Posts:
    17
    Hello dorusoftware,

    thank you for your comment, this tutorial is one the many i have watched.
    I am using the blend distance as advised but it does not solve the current problem:

    having a stronger shadow intensity in a local volume, without the camera being in it or without affecting the whole scene when being inside of it.

    I can't believe i am reaching a limit here.
     
  4. SebLazyWizard

    SebLazyWizard

    Joined:
    Jun 15, 2018
    Posts:
    220
    Volumes only really work well with fully enclosed areas.
    If you want to simulate indoor and outdoor areas at the same time you have to set up some proper global illumination via light-mapping, light/reflection probes or Enlighten(the only option for dynamic GI atm).
     
  5. djorgri

    djorgri

    Joined:
    Jan 3, 2011
    Posts:
    17
    Hello SebLazyWizard,

    thank you for your answer,
    I did not worked with light mapping yet indeed, this will be my next lead,
    i will post my results if it can help someone else.
     
  6. Deleted User

    Deleted User

    Guest

    Maybe u can use darker coloured area lights in interior and use ambient light from skybox or indirect intensity slider for brighter exterior... Most easy way is baking but u won't be able to have realtime effects or u can use enlighten realtime GI.... You can also try using AO
     
  7. Deleted User

    Deleted User

    Guest

    If u want darker coloured lights u can use this hack https://answers.unity.com/questions/375857/pure-black-lighting.html
    But i don't know if it works with HDRP
    U can also use AO slot from shader graph by connecting value node to it and changing to higher values for darker results but u will need another material for interior and another material for the exterior part of building....... or u can use vertex colors somehow to achieve the results by vertex painting interior with darker colour and than multiplying it with your texture in shader graph
     
  8. djorgri

    djorgri

    Joined:
    Jan 3, 2011
    Posts:
    17
    Thank you EagleG for your answer,
    your approach is interesting but might be overkill for my needs here as i should tweak a lot of places for my scenes.
    I tried the baked lighting approach, and results are quite good !
    See here a dark interior being baked with:
    - A local volume with visual environment set to none (for complete dark ambiance)
    - A reflection probe to smooth entrance transition
    - Red light is realtime and casts shadows
    - Sun light is realtime and directional, present in another scene

    screen1.png

    My goal now, is to find how to handle the hdrp global and local volumes,
    because fog and skybox does not blend, effects just pop in or pop out.

    Skybox sudden appearance (compared to above):
    screen2.png

    Fog suddenly disappear in one step (mostly visible in the background, behind the green guizmo volume:
    screen3.png screen4.png

    Please note i encountered problems with non static objects not being darken indoor,
    this was caused by bad settings in one of my scenes (i currently have 3 loaded at the same time),
    be sure to check lighting settings for each scene:
    screen5.png

    I am also about to have another problem to solve,
    i need to have my world with three different day times,
    so 3 baked lightmaps i guess, but this will be another thread when i'm on it :)
     
    Last edited: May 15, 2021