# Why are trees shining in background?

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.

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.

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:

• Not familiar with Unity, so I'll write as comment - maybe you have Fog enabled? – Kromster says support Monica 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
• It's because the trees are happier the further away from you they are. – Engineer Oct 9 '12 at 23:27
• Haha, too bad I can't say terrain1.trees.mood == Moods.Happy; :) – Kinected Oct 10 '12 at 3:11

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.

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:

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.

• 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. – Chuck D Oct 2 '12 at 3:01
• @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. – wolfdawn 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
• @Rushyo I can't since I was viewing this on an iPad. So let's just hope he doesn't plan to target iOS ;) So yeah, the OP needs to crank up the brightness or add an in-game option to adjust it. Some sort of "calibration" when the game first starts would be a clever idea. – bummzack Oct 10 '12 at 12:29