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

Terrain and Light Problem:Only half of the radius of pointlight and spotlight touch/cast the terrain

Discussion in 'Getting Started' started by MenMen, Nov 16, 2015.

  1. MenMen

    MenMen

    Joined:
    Jun 7, 2015
    Posts:
    16
    *Please see the attached image, the image itself can explain my question.
    I have two light, which is point light and spotlight. Both of them are set in important, has a soft shadow type, and Baking is set to realtime.

    For this problem I tried to solve it using the knowledge I get from other forums. So here are the following things I tweak:
    1. I changed the value of Pixel Light Count, I put it on "10" (still have the problem).
    2. I tried to play with rendering path, forward rendering and deferred rendering (this isn't solve my problem).
    3. I also increased the "Scale in Lightmap" to "128" (nothing happened).
    4. Tried to play with Color Space, linear and gamma but I still have the problem.
    5. I changed the baking from realtime to baked. This solved my problem. But the problem is, I need it to be realtime because my player is using flashlight.

    here is the link for the image: https://drive.google.com/file/d/0B1vRoOkOP-y8bTJHOThkMnBiMTA/view?usp=sharing
    edb37c0d016698a1addd421911247f68.jpg

    I hope you can help me, thanks in advance!

    [fixed image - med]
     
    Last edited by a moderator: Nov 19, 2015
  2. MenMen

    MenMen

    Joined:
    Jun 7, 2015
    Posts:
    16
    in addition to my problem, here is the link to my video that shows the glitch of light: https://drive.google.com/file/d/0B1vRoOkOP-y8MTBMdnJTQ2hDekk/view?usp=sharing

    0:00:00-0:00:26 > my setting to my spotlight and to the quality of the project
    0:0026-0:00:58 > only half of the radius of the spotlight cast a light on the terrain. Moving the spotlight to X and Z axis, still have the problem.
    0:00:58-0:01:12 > rotating a bit the spotlight in +Z axis the light is okay
    0:01:12 -0:01:53 > rotating to -Z axis, no light on the terrain
    0:01:53-0:02:05 > rotating to +X axis, the light is okay
    0:02:05-0:02:16 > rotating to -X axis, no light on the terrain
    0:02:16-0:02:37 > rotating a bit the spotlight on +Z axis and move the spotlight in both +Z and -Z axis, the light is okay.
    0:02:37-0:02:43 > rotating a bit the spotlight on +X axis and move the spotlight in both +X and -X axis, the light is okay
    0:02:43-0:03:11 > rotating a bit the spotlight on -Z axis and move the spotlight in both +Z and -Z axis, no light on the terrain.
    0:03:11-0:03:35 > rotating a bit the spotlight on -X axis and move the spotlight in both +X and -X axis, no light on the terrain.
     
  3. Adam-Buckner

    Adam-Buckner

    Joined:
    Jun 27, 2007
    Posts:
    5,664
    Can you reproduce this in a new empty scene? Or is this only happening in your existing scene? What it the object you are using as a floor? You say "terrain" but this looks like standard geometry to me.

    Can you tell us more about your scene setup?

    I cannot reproduce this in a new empty scene...
     
    MenMen likes this.
  4. MenMen

    MenMen

    Joined:
    Jun 7, 2015
    Posts:
    16
    I'm sorry for the late reply. I actually reproduce it a while ago but I have still the problem. The object that I'm using is the terrain of the unity. I used the terrain for my floor because I used the feature of terrain that allows the artist to add details on terrain by painting different textures on terrain. So in short, I intentionally made the terrain looks like that (flat).
     
  5. Adam-Buckner

    Adam-Buckner

    Joined:
    Jun 27, 2007
    Posts:
    5,664
    Can you reproduce this is a simple new project with nothing but 1 terrain and 1 light?

    If so can you tell us how you set it up?

    Can you post some details about your terrain mesh? Can you either give us the details of your terrain? Or can you post the relevant inspectors as screenshots?
     
  6. Exbleative

    Exbleative

    Joined:
    Jan 26, 2014
    Posts:
    216
    Just had the same thing - in case anyone else comes across this, check your normal maps are setup correctly!
     
    WhatsThatFunction likes this.
  7. Kiwi2112

    Kiwi2112

    Joined:
    Jun 30, 2017
    Posts:
    7
    You just saved my game, seeing how simple this was got me hanging my head in shame lol thank you!
     
    Exbleative likes this.