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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Unity 4 pro light and shadow issue.

Discussion in 'Editor & General Support' started by HildePedroni, Aug 17, 2013.

  1. HildePedroni

    HildePedroni

    Joined:
    Apr 10, 2013
    Posts:
    1
    I'm using Unity 4.2 pro version and i'm having some problems with lights and shadows. When i put a point light on my scene and set it to cast shadows, i receive the message that says "Only directional lights can have shadows in forward rendering". So, then I go to the player settings, and set the lights to deferred, voilá, the lights just disappear from my scene. Then i click in the option to use directx 11 and the lights appears again but without shadows. Is that a bug in unity 4.2?

    My GPU is a Geforce gtx 770m, and i have directx 11 installed.

    how to solve this issue?
     
  2. Caine_00

    Caine_00

    Joined:
    Aug 1, 2013
    Posts:
    13
    Having same problem here with my laptop, although when I run the build on my desktop shadows appear there.
     
  3. mokiban

    mokiban

    Joined:
    Nov 24, 2013
    Posts:
    1
    I Have GTX 770m on my laptop, and GTX 560 on my desktop. I have EXACTLY the same issues as you guys that shadows are only missing on my new laptop with deferred lighting.
    My desktop works beautifully as ever with lighting. WHY?!?!

    This is really frustrating. I bought my laptop specifically to work on projects outside home :(
     
  4. alauger07

    alauger07

    Joined:
    Nov 19, 2012
    Posts:
    1
    I don't know if you are still having problems or not but I was able to figure it out in my situation. The computer I was having issues on was a Alien ware 17 With the Intel I7-4700mQ and the GTX770m. That particular computer has a on board graphics processor along with the graphics card. So it was trying to run the unity exe with the onboard graphics, which did not support the deferred lighting or shadows. Inside the nVidia control panel there was a option in 3D settings called "Manage 3D settings", inside that in the "Global Settings" there is a "Preferred Graphics Processor". I changed that from auto select to the GTX 770m and everything started to run Beautifully. If that doesn't work you can also make a custom setting for your Unity Exe.

    Path to the setting that needs changed
    Nvidea Control Panel ->Manage 3D Settings -> Global Settings ->Preferred Graphics Processor -> GTX770m
     
  5. JeanSimonet

    JeanSimonet

    Joined:
    Nov 23, 2012
    Posts:
    31
    I'm having a very similar issue actually, but the Preferred Graphics Processor is set correctly. And it seems the problem is related to Unity's GPU detection in DX11 mode. I have a Gigabyte P34G with an Intel HD4600 and a GeForce 760m.

    When I set the player settings to use DX11, I lose all shadows. Looking at the Editor log, I can see that Unity thinks that my GPU has 0 VRAM and no depth texture caps. Since it sees no depth texture capabilities, Unity turns off shadows!

    When I set the player settings to use DX9, the shadows come back. Looking at the Editor log, I can see that Unity sees proper VRAM amount and caps for my HD4600 (although it nevers sees the GeForce, but maybe that's normal). I can toggle the preferred GPU and see a significant difference in FPS, but no shadows, and no GeForce detected in the log...

    Sadly, I'm using Tessellation, so DX11 is a must. This really sucks, especially since I got this laptop just so I could show my game around...
     
    tomi-trescak likes this.
  6. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,960
    Found a solution on how to force Nvidia Optimus drivers to correctly work in DX11.
    First of all, assign a GFX processor tu use for your Player *in Nvidia control pannel.
    Then, right click on a Player Icon, and choose "Program Compatibility troubleshooter".
    Start it from there with "Try suggested settings" *(or something like this) I'm using italian windows, so it could be that names aren-t thee same as in italian)
    This will force a correct GFX selection with DX11.
    Only problem is that you will have to do It on every start. It can't be saved (and don't save it).
     
  7. tomi-trescak

    tomi-trescak

    Joined:
    Jul 31, 2013
    Posts:
    78
    Did you guys manage to solve this problem? I have exactly the same problem as Jean Simonet, that I have corretly selected to run the app with NVidia, but no shadows. Turning off DirectX 11 helps, but this is a no go, for all other reasons. Thanks.
     
    Last edited: Nov 7, 2014
  8. LadyAth

    LadyAth

    Joined:
    Jan 17, 2014
    Posts:
    158
    I have the same issue. Alienware MX17R4 with integrated HD4000 and NVIDIA 660M. I was also hoping to use my laptop for Unity, but all I do now is create scripts & prorotyping and do the level design on my desktop PC. Everything looks 'garish' when displayed on the laptop despite setting the preferred GPU in the NVIDIA control panel. Shadows seem to be a luxury and only displays without DX11.

    Next laptop I buy will have to be without any integrated HD crap. Some games also gives me similar issues. *sigh*
     
  9. tomi-trescak

    tomi-trescak

    Joined:
    Jul 31, 2013
    Posts:
    78
    SOLVED! I managed to turn off the Intel Card by clicking "fn+f5" this rebooted my system with only NVidia Card enabled and all is running great! When I run dxdiag now no annoying Intel card is present ;)
     
  10. LadyAth

    LadyAth

    Joined:
    Jan 17, 2014
    Posts:
    158
    +1 @tomi - sorted out my problem as well! Not only does Unity work properly with my NVidia card, but so do the games that had similar problems (not Unity related). :)

    On the Alienware laptops it is F7 (I/D GFX).
     
  11. FairGamesProductions

    FairGamesProductions

    Joined:
    Mar 8, 2014
    Posts:
    81
    Guys, guys. No.
    If you want shadows in real-time from point lights you need to change the render mode.
    Edit -> Project Settings -> Player -> Other Settings -> Render Path
    Try the different render modes and choose the one best for your needs.