Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

Currently I am creating a forest scene in the dark, and the trees are shining far away, but when I get close they are fine. I have the shaders set to "Nature/Tree Soft Occlusion [bark/leaves]", but they are still rendering strange far away, but close they are fine.

enter image description here

I tried placing the trees in a folder named "Ambient-Occlusion" like said here, but no luck. Also fog is turned off. Thanks in advance.

UPDATE

When I looked at the trees using the "Render Paths" camera, they appeared red while everything else was green.

picture

UPDATE 2

I have tried re-installing the package I downloaded these from, but still no luck.

UPDATE 3

I have added some trees manually, and they work fine, but when adding them by painting on the terrain I get the problem.

FINAL UPDATE

I tried building the game to see if this had the effect on the .exe, and it didn't. So I just have to ignore when I am debugging it, as it works fine on the build. Thanks for all the help, it just seems like an error with unity. Picture of build:

image

share|improve this question
    
Not familiar with Unity, so I'll write as comment - maybe you have Fog enabled? –  Krom Stern Sep 30 '12 at 17:16
    
No, I had that effect so I turned it off, worked fine for a while, and now it is doing it without fog turned on –  Kinected Sep 30 '12 at 17:23
    
So what happens if you turn fog on? –  Laurent Couvidou Oct 1 '12 at 8:58
1  
It's because the trees are happier the further away from you they are. –  Nick Wiggill Oct 9 '12 at 23:27
1  
Haha, too bad I can't say terrain1.trees.mood == Moods.Happy; :) –  Kinected Oct 10 '12 at 3:11
show 7 more comments

2 Answers 2

up vote 4 down vote accepted

Turns out that it was rendered fine in the builds of the project, just not in the debugger in unity. I am planning on reporting this as an error on unity's site, as it was messed up in the debugger only, not the game.

share|improve this answer
add comment

I fixed the problem by adding fog with the properties:

  • Color: R: 0 G: 0 B: 0 A: 255
  • Mode: Exp2
  • Density 0.03

I know this doesn't solve the problem, but I wanted to use fog in my game anyway and this was an easy solution. I am not going to accept this as the answer since it doesn't actually solve the question, I just wanted to say what ended up working. Picture:

picture

It also adds that scary/mysterious feel to it, which I am happy about. I would still love to have an actual answer to how to fix this.

share|improve this answer
9  
Unity terrain trees are rendered out to textures at a given distance which is what you are seeing. You would have to dig into the shader that is used to render the billboarded textures at distance and see how it's being affected by your lighting setup. –  Rubber Mallet Oct 2 '12 at 3:01
2  
@Kinected Hit the checkmark next to your answer, to maintain your Accept Rate at 100%. –  Nick Wiggill Oct 9 '12 at 23:29
    
@RubberMallet Actually Rubber Mallet has it right. The trees are shiny because they rendered without being affected by light. I think he should add an answer and get accepted. –  Zehelvion Oct 10 '12 at 4:13
    
Nice, I can't see anything on that Screenshot. It's just black. In your question I was able to see at least some trees :D –  bummzack Oct 10 '12 at 11:38
    
@bummzack Turn up your monitor contrast then you'll be able to see that both pictures have very dark content. However, the OP should definitely consider that not everyone has a super-bright screen like his/hers. –  Rushyo Oct 10 '12 at 12:11
show 5 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.